Skip to content

mock-end/random-domains

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

random-domains

Return a random domain.

MIT License

build:? coverage:?

Install

$ npm install --save random-domains

Usage

For more use-cases see the tests

var randomDomains = require('random-domains');

// API
// - randomDomains([options]);

// options
// - tld
// - level

Return a random domain with a random tld.

randomDomains();
// => 'ase.com'

Optionally specify a tld and the domain will be random but the tld will not.

randomDomains({ tld: 'ie' })
=> 'gotaujo.ie'

Optionally specify the level for the domain:

randomDomains({ level:2 });
// => 'edfyiu.asfc.me'

Or combine them:

randomDomains({ level: 2, tld: 'com' });
// => 'asdl.sssle.com'

Related

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.

About

Return a random domain.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published