# simple-id

> A library for generating short, user-friendly, random IDs.

Latest version **2.0.4** (published 2024-06-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install simple-id
pnpm add simple-id
yarn add simple-id
bun add simple-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 | 2.0.4 |
| Published | 2024-06-25 |
| First published | 2017-07-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Mohamed Akram |
| Keywords | short, user-friendly, random, id |

## Links

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

## 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

- 2.0.4 (latest) — 2024-06-25
- 2.0.3 — 2024-06-25
- 2.0.2 — 2024-06-24
- 2.0.1 — 2024-06-24
- 2.0.0 — 2024-06-24
- 1.0.1 — 2024-01-13
- 1.0.0 — 2017-07-02

## README

# simple-id

A library for generating short, user-friendly, random IDs.

## Install

    npm install simple-id

## Usage

```javascript
const simpleId = require("simple-id");
simpleId();
```

By default, an 8-character random ID is generated using a 31-character alphabet
(`23456789abcdefghjkmnpqrstuvwxyz`) which notably excludes the uppercase
letters and `01ilo` to avoid ambiguity. This gives about 853 billion possible
permutations. A different length and/or alphabet can be passed as follows:

```javascript
simpleId(9);
simpleId(8, "0123456789abcdef");
```

## Implementation

The implementation uses the cryptographically strong `crypto.getRandomValues()`
function and provides uniformly distributed random IDs. It has no other
dependencies.

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