Skip to content
Myr

Reduce library 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 d9f8b56 · Browse files · 4 files+8 added−9 removed
This commit

State

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

Diff stats

4 files+8 added−9 removed

  • other:+8 added−9 removed

4 files+8 added−9 removed

modified:format.js+2 added-4 removed
modified:index.js+3 added-2 removed
modified:package.json+1 added-1 removed
modified:README.md+2 added-2 removed
8 unmodified lines
910**Safe.** It uses cryptographically strong random APIs11and guarantees a proper distribution of symbols.1213**Small.** Only 258 bytes (minified and gzipped). No dependencies.13**Small.** Only 246 bytes (minified and gzipped). No dependencies.14It uses [Size Limit] to control size.1516**Compact.** It uses more symbols than UUID (`A-Za-z0-9_~`)17and has the same number of unique options in just 22 symbols instead of 36.
44 unmodified lines
62631. Nano ID uses bigger alphabet for ID, so same random bits64 are packed just in 22 symbols instead of 36.652. Code of Nano ID has 2 times smaller size compare to `uuid/v4` package:66 258 bytes instead of 435.66 246 bytes instead of 435.6768## Usage6970### Normal
49 unmodified lines