Google Domains
Get Google domains.
Requirements
Item | Details |
---|---|
System | GNU/Linux (>=2.6.x), macOS (>=10.10.x), Windows (later than XP) |
Environment | Node.js >= 8.2.0 |
Installation
# under product mode $ npm install google-domains --save # under development mode $ npm install google-domains --save-dev
Quick Start
After you finished the installation above, you will have a package google-domains
in your ./node_modules
directory.
Import
Default module exports in CommonJS style
const GoogleDomains = ;const googleDomains = ;
Usages
googleDomains.fetch()
Returns a Promise object that contains all known Google domains.
Recommanded usage:
let data;try data = await googleDomains; catch error throw error;
or alternatively:
googleDomains ;
googleDomains.random()
Get an object of Google domain information randomly.
Recommanded usage:
let data;try data = await googleDomains; catch error throw error;
or alternatively:
googleDomains ;
googleDomains.randomUrl()
Get a string of Google url randomly.
Recommanded usage:
let data;try data = await googleDomains; catch error throw error;
or alternatively:
googleDomains ;
Tests
To run the test suite, go to the root directory of this package, and install dependencies, and then run npm test
or npm run test
:
$ cd /path/to/google-domains$ npm install$ npm test# or $ npm run test