Gathering detailed insights and metrics for tld-extract
Gathering detailed insights and metrics for tld-extract
Gathering detailed insights and metrics for tld-extract
Gathering detailed insights and metrics for tld-extract
extract-domain
Extract domain name from URL
extract-tld
Extract the TLD from a URL against the [public suffix list](https://publicsuffix.org/).
mini-css-extract-plugin
extracts CSS into separate files
postcss-modules-extract-imports
A CSS Modules transform to extract local aliases for inline imports
npm install tld-extract
99.4
Supply Chain
99
Quality
78
Maintenance
100
Vulnerability
99.6
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
44 Stars
40 Commits
15 Forks
3 Watching
1 Branches
3 Contributors
Updated on 28 Oct 2024
Minified
Minified + Gzipped
JavaScript (74.55%)
TypeScript (25.45%)
Cumulative downloads
Total Downloads
Last day
7.4%
8,380
Compared to previous day
Last week
3.1%
39,719
Compared to previous week
Last month
-0%
163,705
Compared to previous month
Last year
107.8%
1,775,988
Compared to previous year
4
Extract the TLD/domain/subdomain parts of an URL/hostname against mozilla TLDs official listing.
var parser = require('tld-extract');
console.log( parser("http://www.google.com") );
console.log( parser("http://google.co.uk") );
/**
* >> { tld: 'com', domain: 'google.com', sub: 'www' }
* >> { tld: 'co.uk', domain: 'google.co.uk', sub: '' }
*/
Private TLDs are supported, see chromium source code for specs
console.log( parser("http://jeanlebon.cloudfront.net"));
/**
* >> { tld : 'net', domain : 'cloudfront.net', sub : 'jeanlebon' };
*/
console.log( parser("http://jeanlebon.cloudfront.net", {allowPrivateTLD : true}));
/**
* >> { tld : 'cloudfront.net', domain : 'jeanlebon.cloudfront.net', sub : '' };
*/
By default, unknown TLD throw an exception, you can allow them and use tld-extract as a parser using the allowUnknownTLD
option
parse("http://nowhere.local")
>> throws /Invalid TLD/
parse("http://nowhere.local", {allowUnknownTLD : true}))
>> { tld : 'local', domain : 'nowhere.local', sub : '' }
Using a tld as a direct domain name, or dotless domain is highly not recommended (ICANN and IAB have spoken out against the practice, classifying it as a security risk among other concerns.[34] ICANN's Security and Stability Advisory Committee (SSAC) additionally claims that SMTP "requires at least two labels in the FQDN of a mail address" and, as such, mail servers would reject emails to addresses with dotless domains), and will throw an error in tld-extract
. You can override this behavior using the allowDotlessTLD
option.
parse("http://notaires.fr")
>> throws /Invalid TLD/
parse("http://notaires.fr", {allowDotlessTLD : true}))
>> { tld : 'notaires.fr', domain : 'notaires.fr', sub : '' }
You can update the remote hash table using npm run update
A port of a yks/PHP library
tldextract => bad API, (no need for async, "domain" property is wrong), no need for dependencies
tld => (nothing bad, a bit outdated )
tld.js => no sane way to prove/trust/update TLD listing
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 1/28 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More