@aller/site-id
v4.1.0
Published
Site ID to host and vice versa
Downloads
308
Keywords
Readme
site-id
Site ID to host and vice versa
Usage
import { getHost, getSiteId, siteIds, hosts, isExternalUrl } from '@aller/site-id';
console.log(getHost(1)); // 'dagbladet.no'
console.log(getSiteId('dagbladet.no')); // '1'
console.log(siteIds); // [ '1', '2', ..., '141', '207' ]
console.log(hosts); // [ 'dagbladet.no', 'dinside.no', ..., 'topp.no', 'vi.no' ]
console.log(isExternalUrl('https://www.dagbladet.no/nyheter/lege-svarer-om-coronaviruset/72191280')); // false
console.log(isExternalUrl('https://direkte.vg.no/coronaviruset/videos/193213?wide')); // true