nanoid
TypeScript icon, indicating that this package has built-in type declarations

5.1.5 • Public • Published

Nano ID

Nano ID logo by Anton Lovchikov

English | Русский | 简体中文 | Bahasa Indonesia

A tiny, secure, URL-friendly, unique string ID generator for JavaScript.

“An amazing level of senseless perfectionism, which is simply impossible not to respect.”

  • Small. 118 bytes (minified and brotlied). No dependencies. Size Limit controls the size.
  • Safe. It uses hardware random generator. Can be used in clusters.
  • Short IDs. It uses a larger alphabet than UUID (A-Za-z0-9_-). So ID size was reduced from 36 to 21 symbols.
  • Portable. Nano ID was ported to over 20 programming languages.
import { nanoid } from 'nanoid'
model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"

  Made at Evil Martians, product consulting for developer tools.


Docs

Read full docs here.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
5.1.51,451,949latest

Version History

VersionDownloads (Last 7 Days)Published
5.1.51,451,949
3.3.1113,232,005
5.1.450,279
3.3.10390,524
5.1.3110,142
3.3.91,226,625
5.1.2155,842
5.1.1147
5.1.078,544
5.0.9701,217
3.3.810,692,060
5.0.888,254
5.0.7378,738
5.0.645,239
5.0.510,320
5.0.427,687
5.0.323,722
3.3.710,938,597
5.0.28,230
5.0.13,765
5.0.044
3.3.62,362,056
3.3.59,120
4.0.2438,711
4.0.121,159
4.0.058,955
3.3.41,944,067
3.3.31,443,738
3.3.283,259
3.3.1929,682
3.3.012,604
3.2.0225,448
3.1.3223,870
3.1.3148,911
3.1.30188,996
3.1.2915,514
3.1.2816,788
3.1.2721
3.1.2619
3.1.25275,388
3.1.241,296
3.1.23247,013
3.1.2280,519
3.1.21142,533
3.1.20606,045
3.1.19120
3.1.187,086
3.1.171,196
3.1.1660,347
3.1.15811
3.1.1414
3.1.131,079
3.1.1279,602
3.1.1162
3.1.102,514
3.1.93,520
3.1.821
3.1.7251
3.1.630
3.1.5547
3.1.4735
3.1.39,024
3.1.2116
3.1.113
3.1.026
3.0.21,535
3.0.1119
3.0.05,537
2.1.11689,616
2.1.1020,121
2.1.91,404
2.1.82,843
2.1.72,969
2.1.6137,030
2.1.541
2.1.4311
2.1.32,626
2.1.2607
2.1.11,509
2.1.01,057
2.0.4417
2.0.312,104
2.0.2129
2.0.13,844
2.0.06,143
1.3.468,855
1.3.353
1.3.213
1.3.11,979
1.3.066
1.2.6786
1.2.547
1.2.444
1.2.3518
1.2.2410
1.2.11,766
1.2.049
1.1.117
1.1.0278
1.0.7643
1.0.616
1.0.512
1.0.458
1.0.3470
1.0.22,103
1.0.1187
1.0.0392
0.2.212,284
0.2.115
0.2.018
0.1.1230
0.1.019

Package Sidebar

Install

npm i nanoid

Weekly Downloads

49,938,046

Version

5.1.5

License

MIT

Unpacked Size

12.1 kB

Total Files

11

Last publish

Collaborators

  • ai