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

5.0.9 • 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.0.9650,664latest

Version History

VersionDownloads (Last 7 Days)Published
5.0.9650,664
3.3.88,198,477
5.0.8485,564
5.0.7868,510
5.0.695,821
5.0.521,779
5.0.439,265
5.0.373,574
3.3.721,786,975
5.0.226,856
5.0.114,099
5.0.033
3.3.66,158,347
3.3.517,183
4.0.2713,178
4.0.150,469
4.0.0174,139
3.3.45,918,904
3.3.33,019,445
3.3.2281,132
3.3.11,662,314
3.3.031,486
3.2.0538,758
3.1.3254,395
3.1.31140,309
3.1.301,490,722
3.1.29114,471
3.1.28135,947
3.1.2722
3.1.2641
3.1.25719,469
3.1.246,633
3.1.23980,178
3.1.22244,745
3.1.21394,042
3.1.201,270,603
3.1.19654
3.1.1820,465
3.1.172,791
3.1.16103,898
3.1.153,653
3.1.147
3.1.131,375
3.1.12171,754
3.1.11654
3.1.107,812
3.1.93,864
3.1.822
3.1.7587
3.1.621
3.1.51,149
3.1.4215
3.1.31,480
3.1.286
3.1.19
3.1.010
3.0.2939
3.0.1142
3.0.07,683
2.1.111,902,799
2.1.1038,215
2.1.99,195
2.1.811,249
2.1.712,863
2.1.6391,086
2.1.571
2.1.43,831
2.1.31,869
2.1.23,260
2.1.19,287
2.1.03,083
2.0.41,226
2.0.322,438
2.0.2520
2.0.111,121
2.0.018,784
1.3.4180,465
1.3.382
1.3.28
1.3.1988
1.3.0636
1.2.62,425
1.2.583
1.2.442
1.2.31,507
1.2.2342
1.2.14,921
1.2.0329
1.1.127
1.1.0893
1.0.72,351
1.0.66
1.0.5133
1.0.4157
1.0.3959
1.0.210,138
1.0.1330
1.0.0992
0.2.226,148
0.2.17
0.2.09
0.1.1181
0.1.0579

Package Sidebar

Install

npm i nanoid

Weekly Downloads

44,883,040

Version

5.0.9

License

MIT

Unpacked Size

11 kB

Total Files

11

Last publish

Collaborators

  • ai