Skip to content

Commit

Permalink
Improve description
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Aug 30, 2019
1 parent 7337cb8 commit 3fb9ce7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@
alt="Nano ID logo by Anton Lovchikov" width="180" height="94">

A tiny, secure, URL-friendly, unique string ID generator for JavaScript.
Supports Node.js, React Native, and [all browsers].

* **Small.** 141 bytes (minified and gzipped). No dependencies.
[Size Limit] controls the size.
* **Safe.** It uses cryptographically strong random APIs
and tests distribution of symbols.
[Size Limit] controls the size.
* **Safe.** It uses cryptographically strong random APIs.
Can be used in clusters.
* **Fast.** It’s 16% faster than UUID.
* **Compact.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`).
So ID size was reduced from 36 to 21 symbols.
So ID size was reduced from 36 to 21 symbols.

```js
var nanoid = require('nanoid')
model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"
```

The generator supports Node.js, React Native, and [all browsers].

[all browsers]: http://caniuse.com/#feat=getrandomvalues
[Size Limit]: https://github.com/ai/size-limit

Expand Down

0 comments on commit 3fb9ce7

Please sign in to comment.