random-domains
v1.0.3
Published
Return a random domain.
Downloads
29,479
Maintainers
Readme
random-domains
Return a random domain.
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
- random-tld - Return a random tld(Top Level Domain).
- random-email - Return a random email.
- random-protocol - Return a random protocol.
- random-hashtag - Return a random hashtag.
- random-uri - Return a random url.
- random-ipv4 - Return a random ipv4 address.
- random-ipv6 - Return a random ipv6 address.
- random-avatar - Return a URL to a random avatar from Gravatar.
Contributing
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.