Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sindresorhus/unique-string

Generate a unique random string
https://github.com/sindresorhus/unique-string

Last synced: about 1 month ago
JSON representation

Generate a unique random string

Awesome Lists containing this project

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.