Skip to content

litert/tlds.js

Repository files navigation

LiteRT/TLD

Strict TypeScript Checked npm version License node GitHub issues GitHub Releases

A simple TLD (Top Level Domain) helper library.

Installation

Install by NPM:

npm i @litert/tlds --save

Usage

See 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.