# random-id

> a random id generator

Latest version **1.0.4** (published 2020-05-06) · MIT license · 0 weekly downloads

## Install

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

## 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.4 |
| Published | 2020-05-06 |
| First published | 2014-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Austyn Studdard |
| Maintainers | kingcosmic |

## Links

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

## Recent versions

- 1.0.4 (latest) — 2020-05-06
- 1.0.3 — 2018-09-26
- 1.0.2 — 2018-09-26
- 1.0.1 — 2018-07-27
- 1.0.0 — 2018-07-27
- 0.0.2 — 2014-01-25
- 0.0.1 — 2014-01-24
- 0.0.0 — 2014-01-24

## README

# random-id
random id generator

## Installation

`npm install --save random-id`

or with yarn

`yarn add random-id`

## Usage

npm
```js
var randomId = require('random-id');

// length of the id (default is 30)
var len = 30;

// pattern to determin how the id will be generated
// default is aA0 it has a chance for lowercased capitals and numbers
var pattern = 'aA0'

var id = randomId(len, pattern)
```

using it in a script tag it'll add randomId to the window
for global use
```js
// length of the id (default is 30)
var len = 30;

// pattern to determin how the id will be generated
// default is aA0 it has a chance for lowercased capitals and numbers
var pattern = 'aA0'

var id = randomId(len, pattern)
```

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