https://github.com/litert/tlds.js
A simple TLD (Top Level Domain) helper library.
https://github.com/litert/tlds.js
domain tld
Last synced: 2 months ago
JSON representation
A simple TLD (Top Level Domain) helper library.
- Host: GitHub
- URL: https://github.com/litert/tlds.js
- Owner: litert
- License: apache-2.0
- Created: 2020-03-10T04:24:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T22:32:40.000Z (almost 2 years ago)
- Last Synced: 2025-09-29T12:46:01.707Z (9 months ago)
- Topics: domain, tld
- Language: TypeScript
- Homepage: https://fenying.net
- Size: 262 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# LiteRT/TLD
[](https://www.typescriptlang.org)
[](https://www.npmjs.com/package/@litert/tlds "Stable Version")
[](https://github.com/litert/tlds/blob/master/LICENSE)
[](https://nodejs.org/dist/latest-v8.x/)
[](https://github.com/litert/tlds.js/issues)
[](https://github.com/litert/tlds.js/releases "Stable Release")
A simple TLD (Top Level Domain) helper library.
## Installation
Install by NPM:
```sh
npm i @litert/tlds --save
```
## Usage
See [src/examples/demo.ts](./src/examples/demo.ts).
> How to import full TLD list?
>
> 1. Get data from https://publicsuffix.org/list/public_suffix_list.dat
> 2. Parse the data into string array (pay attention to some TLD items like `*.xxx.xx`)
> 3. Now import them into your `TLDManager`.
## Requirement
- TypeScript v3.2.2 (or newer)
- Node.js v10.0.0 (or newer)
## Document
### 简体中文版
- Preparing
## License
This library is published under [Apache-2.0](./LICENSE) license.