A simple TLD (Top Level Domain) helper library.
Install by NPM:
npm i @litert/tlds --save
See src/examples/demo.ts.
How to import full TLD list?
- Get data from https://publicsuffix.org/list/public_suffix_list.dat
- Parse the data into string array (pay attention to some TLD items like
*.xxx.xx
)- Now import them into your
TLDManager
.
- TypeScript v3.2.2 (or newer)
- Node.js v10.0.0 (or newer)
- Preparing
This library is published under Apache-2.0 license.