@aller/site-id

Site ID to host and vice versa

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@aller/site-id
4.1.0a year ago4 years agoMinified + gzip package size for @aller/site-id in KB

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