# unique-string

> Generate a unique random string

Latest version **3.0.0** (published 2021-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install unique-string
pnpm add unique-string
yarn add unique-string
bun add unique-string
```

## Health

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

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2021-04-05 |
| First published | 2016-11-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/unique-string) |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 1 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 89 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | unique, string, random, text, id, identifier, slug, hex |

## Links

- npm: https://www.npmjs.com/package/unique-string
- Repository: https://github.com/sindresorhus/unique-string
- Homepage: https://github.com/sindresorhus/unique-string#readme
- Issues: https://github.com/sindresorhus/unique-string/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/unique-string

## Dependencies (1)

- [crypto-random-string](https://npm.io/package/crypto-random-string.md) ^4.0.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

- 3.0.0 (latest) — 2021-04-05
- 2.0.0 — 2019-04-29
- 1.0.0 — 2016-11-14

## README

# unique-string

> Generate a unique random string

## Install

```
$ npm install unique-string
```

## Usage

```js
import uniqueString from 'unique-string';

uniqueString();
//=> 'b4de2a49c8ffa3fbee04446f045483b2'
```

## API

### uniqueString()

Returns a 32 character unique string. Matches the length of MD5, which is [unique enough](https://stackoverflow.com/a/2444336/64949) for non-crypto purposes.

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