Giter Site home page Giter Site logo

google-domains's Introduction

Google Domains

npm version ndoe version github tag monthly downloads license contributions welcome

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 = require('google-domains');
const googleDomains = new GoogleDomains();

Usages

googleDomains.fetch()

Returns a Promise object that contains all known Google domains.

Recommanded usage:

let data;
try {
  data = await googleDomains.fetch();
} catch (error) {
  throw new Error(error);
}

or alternatively:

googleDomains.fetch()
          .then(function (data) {
            // get proxies here
          })
          .catch(function (error) {
            throw new Error(error);
          });
googleDomains.random()

Get an object of Google domain information randomly.

Recommanded usage:

let data;
try {
  data = await googleDomains.random();
} catch (error) {
  throw new Error(error);
}

or alternatively:

googleDomains.random()
          .then(function (data) {
            // get data here
          })
          .catch(function (error) {
            throw new Error(error);
          });
googleDomains.randomUrl()

Get a string of Google url randomly.

Recommanded usage:

let data;
try {
  data = await googleDomains.randomUrl();
} catch (error) {
  throw new Error(error);
}

or alternatively:

googleDomains.randomUrl()
          .then(function (data) {
            // get data here
          })
          .catch(function (error) {
            throw new Error(error);
          });

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

License

MIT

google-domains's People

Contributors

lenconda avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.