# gen-id

> Short non-sequential unique id generator in a given format.

Latest version **0.1.1** (published 2013-08-28) · BSD license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2013-08-28 |
| First published | 2013-08-28 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8.x |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dom Udall |
| Maintainers | domudall |
| Keywords | id, uuid, tiny, uid, idgen, short, mongoid, shorten, shortid, bitly, unique |

## Links

- npm: https://www.npmjs.com/package/gen-id
- Repository: http://github.com/domudall/gen-id
- Issues: http://github.com/domudall/gen-id/issues
- npm.io page: https://npm.io/package/gen-id

## Dependencies (1)

- [crc](https://npm.io/package/crc.md) ~0.2.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2013-08-28
- 0.1.0 — 2013-08-28

## README

# GenID [![Build Status](https://secure.travis-ci.org/domudall/gen-id.png)](http://travis-ci.org/domudall/gen-id)

[![NPM](https://nodei.co/npm/gen-id.png?downloads=true)](https://nodei.co/npm/uid-gen/)

````
var genId = require('gen-id')('nnnnnnnc')
  , orderId = genId.generate()

console.log(orderId)
````

Initial available formats:

* n - numeric [0-9]
* a - alphabetical [a-z]
* A - alphabetical (case inclusive) [a-zA-Z]
* h - hexadecimal [0-9a-f]
* x - alpha-numeric [0-9a-z]
* X - alpha-numeric (case inclusive) [0-9a-zA-Z]
* c - checksum

You can change the format at any point by using genId.setFormat()

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