INNER CODE UNIT · TypeScript
isMessengerDotCom
sindresorhus/caprine · source/index.ts:535
const isMessengerDotCom = (url: string): boolean => {
const {hostname} = new URL(url);
return hostname.endsWith('.messenger.com');
};
const isTwoFactorAuth = (url: string): boolean => {
const twoFactorAuthURL = 'https://www.facebook.com/checkpoint';
return url.startsWith(twoFactorAuthURL);
};
const isWorkChat = (url: string): boolean => {
const {hostname, pathname} = new URL(url);
if (hostname === 'work.facebook.com' || hostname === 'work.workplace.com') {
return true;
}
if (