# random-domains

> Return a random domain.

Latest version **1.0.3** (published 2016-04-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install random-domains
pnpm add random-domains
yarn add random-domains
bun add random-domains
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2016-04-25 |
| First published | 2016-04-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | bubkoo |
| Maintainers | bubkoo |
| Keywords | domain, tld, web, random, randomly, randomize, chance, test, dice, mock |

## Links

- npm: https://www.npmjs.com/package/random-domains
- Repository: https://github.com/mock-end/random-domains
- Homepage: https://github.com/mock-end/random-domains#readme
- Issues: https://github.com/mock-end/random-domains/issues
- npm.io page: https://npm.io/package/random-domains

## Dependencies (5)

- [clamp](https://npm.io/package/clamp.md) ^1.0.1
- [to-str](https://npm.io/package/to-str.md) ^1.0.0
- [to-length](https://npm.io/package/to-length.md) ^1.0.1
- [random-tld](https://npm.io/package/random-tld.md) ^1.0.2
- [random-lorem](https://npm.io/package/random-lorem.md) ^1.0.3

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2016-04-25
- 1.0.2 — 2016-04-24
- 1.0.1 — 2016-04-18
- 1.0.0 — 2016-04-17
- 0.0.0 — 2016-04-11

## README

# random-domains

> Return a random domain.

[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/mock-end/random-domains/blob/master/LICENSE)

[![build:?](https://img.shields.io/travis/mock-end/random-domains/master.svg?style=flat-square)](https://travis-ci.org/mock-end/random-domains)
[![coverage:?](https://img.shields.io/coveralls/mock-end/random-domains/master.svg?style=flat-square)](https://coveralls.io/github/mock-end/random-domains)


## Install

```
$ npm install --save random-domains
```

## Usage

> For more use-cases see the [tests](https://github.com/mock-end/random-domains/blob/master/test/spec/index.js)

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

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

// options
// - tld
// - level
```

Return a random domain with a random [tld](https://github.com/mock-end/random-tld).

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

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

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

Optionally specify the `level` for the domain:

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

Or combine them:

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


## Related

- [random-tld](https://github.com/mock-end/random-tld) - Return a random tld(Top Level Domain).
- [random-email](https://github.com/mock-end/random-email) - Return a random email.
- [random-protocol](https://github.com/mock-end/random-protocol) - Return a random protocol.
- [random-hashtag](https://github.com/mock-end/random-tld) - Return a random hashtag.
- [random-uri](https://github.com/mock-end/random-uri.git) - Return a random url.
- [random-ipv4](https://github.com/mock-end/random-ipv4) - Return a random ipv4 address.
- [random-ipv6](https://github.com/mock-end/random-ipv6) - Return a random ipv6 address.
- [random-avatar](https://github.com/mock-end/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](https://github.com/mock-end/random-domains/issues/new).

---
_Source: https://npm.io/package/random-domains · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
