5.3.0 • Published 9 months ago
@aller/external-id v5.3.0
@aller/external-id
Library for creating an ID from an URL.
Usage
Code:
import getExternalId from '@aller/external-id';
const id = getExternalId(
'https://www.dagbladet.no/nyheter/sjokkerte-allierte-pa-flyet-til-singapore---kim-ma-ikke-fa-se-noen-amerikansk-svakhet/69887776',
);
console.log(id);
Output:
dagbladet.no/69887776
getStrippedHost
import { getStrippedHost } from '@aller/external-id';
const host = getStrippedHost(
'https://www.somedomain.com/some-url/sub-url?query-parameter=123',
);
console.log(id);
Output:
somedomain.com
Running tests
npm run test
Runs linter and testsnpm run test:eslint
Runs linternpm run test:ava
Runs testsnpm run test:verbose
Runs tests with verbose outputnpm run test:watch
Automatically runs tests on savenpm run test:coverage
Checks code coverage
5.3.0
9 months ago
5.2.8
2 years ago
5.2.7
3 years ago
5.2.2
3 years ago
5.2.5
3 years ago
5.2.1
4 years ago
5.2.1-beta.0
4 years ago
5.2.1-beta.1
4 years ago
5.2.0
4 years ago
5.1.2
5 years ago
5.0.2
5 years ago
5.0.1
5 years ago
5.0.0
5 years ago
4.3.2
5 years ago
4.3.1
5 years ago
4.3.0
5 years ago
4.2.1
5 years ago
4.2.0
6 years ago
4.1.2
6 years ago
4.1.1
6 years ago
4.1.0
6 years ago
4.0.16
6 years ago
4.0.15
6 years ago
4.0.14
6 years ago
4.0.13
6 years ago
4.0.12
7 years ago
4.0.11
7 years ago
4.0.10
7 years ago
4.0.9
7 years ago
4.0.8
7 years ago
4.0.7
7 years ago
4.0.6
7 years ago