Skip to content
Myr

Reduce size

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andrey Sitnik · committed by Andrey Sitnik · parent 5a7ba48 · Browse files · 3 files+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+4 added−4 removed

  • other:+4 added−4 removed

3 files+4 added−4 removed

modified:index.browser.js+1 added-1 removed
modified:package.json+1 added-1 removed
1{2 "name": "nanoid",3 "version": "2.1.11",4 "description": "A tiny (119 bytes), secure URL-friendly unique string ID generator",4 "description": "A tiny (115 bytes), secure URL-friendly unique string ID generator",5 "keywords": [6 "uuid",7 "random",8 "id",
167 unmodified lines
modified:README.md+2 added-2 removed
3 unmodified lines
4 alt="Nano ID logo by Anton Lovchikov" width="180" height="94">56A tiny, secure, URL-friendly, unique string ID generator for JavaScript.78* **Small.** 118 bytes (minified and gzipped). No dependencies.8* **Small.** 115 bytes (minified and gzipped). No dependencies.9 [Size Limit] controls the size.10* **Safe.** It uses cryptographically strong random APIs.11 Can be used in clusters.12* **Fast.** It’s 16% faster than UUID.
52 unmodified lines
65661. Nano ID uses a bigger alphabet, so a similar number of random bits67 are packed in just 21 symbols instead of 36.682. Nano ID code is 4 times less than `uuid/v4` package:69 118 bytes instead of 435.69 115 bytes instead of 435.703. Because of memory allocation tricks, Nano ID is 16% faster than UUID.717273## Benchmark
315 unmodified lines