tld.js icon indicating copy to clipboard operation
tld.js copied to clipboard

Minimalist Command Line Interface

Open thom4parisot opened this issue 6 years ago • 1 comments

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": ""
}

thom4parisot avatar Sep 10 '17 16:09 thom4parisot

Great idea! :D Will have a look a bit later.

remusao avatar Sep 10 '17 18:09 remusao