Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/7c/whois2json
whois2json library
https://github.com/7c/whois2json
Last synced: about 1 month ago
JSON representation
whois2json library
- Host: GitHub
- URL: https://github.com/7c/whois2json
- Owner: 7c
- Created: 2023-03-24T10:31:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-25T15:10:56.000Z (over 1 year ago)
- Last Synced: 2023-08-25T19:50:26.022Z (over 1 year ago)
- Language: TypeScript
- Size: 68.4 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# whois2json
library to whois certain TLDs. We use whoisserver-world library to parseDomain and tests. More importantly we take whoisServers from this library. Make sure it is up2date.## API
`npm i --save https://github.com/7c/whois2json````
## to get parsed whois
import { whois2json,parseDomain } from '7c/whois2json'
let domain = parseDomain('www.example.com')
let result = await whois2json(domain.name)
``````
## to get raw whois
import { rawWhois } from '7c/whois2json'
console.log(await rawWhois('example.com'))
```## CLI
`npm i -g https://github.com/7c/whois2json`--raw : will output raw whois
--scan : will scan all known parsers (development only)### dist/tldinfo
shows information about top-level-domain such as `sampleDomains`### dist/whois2json
whois given hostname`s domain and outputs as json