tld.js
tld.js copied to clipboard
Minimalist Command Line Interface
The idea is to bind tldjs.parse()
to the first CLI argument/stdin:
$ echo 'github.com' | tldjs | jq '.tldExists'
> true
$ export SOME_VARIABLE='github.com'
$ tldjs $SOME_VARIABLE
> {
"hostname": "github.com",
"isValid": true,
"tldExists": true,
"publicSuffix": "com",
"domain": "github.com",
"subdomain": ""
}
Great idea! :D Will have a look a bit later.