Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 7, 2024 via pnpm

nanoid 3.3.3

A tiny (116 bytes), secure URL-friendly unique string ID generator
Package summary
Share
0
issues
1
license
1
MIT
Package created
6 Aug 2017
Version published
18 Apr 2022
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
nanoid@3.3.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of nanoid 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does nanoid do?

NanoID is a compact, secure, URL-friendly, unique string ID generator developed for JavaScript. It's recognized for its remarkable sense of flawless detail, exhibiting a level of perfectionism that's impossible not to admire. Despite its small size - just 130 bytes when minified and gzipped - it offers impressive features. It is safe, utilizing a hardware random generator so it can be used in clusters. Additionally, by using a larger alphabet than UUID (A-Za-z0-9_-), it manages to reduce the ID size from 36 to 21 symbols. Notably, it has been ported to more than 20 programming languages, making it incredibly versatile.

How do you use nanoid?

Using NanoID is relatively simple and straightforward. First, you need to import the nanoid function from the nanoid package. Afterwards, you can use the nanoid() function to generate a unique string ID. An example of its usage is demonstrated below:

import { nanoid } from 'nanoid'
model.id = nanoid() //=> "V1StGXR8_Z5jdHi6B-myT"

In the above code, nanoid is generating a new unique ID that is assigned to model.id.

Where are the nanoid docs?

The full documentation of NanoID can be found on its GitHub page. There, you can find more detailed information about its features, usage, API description, and more.