nanoid2
A tiny, secure, URL-friendly, unique string ID generator, nanoid with a pure Dart API.
2.0.1
52K downloads/mo
#1444 most downloaded on pub.dev
passsy/nanoid
What this package is like to depend on
Last release 3 years ago
no release in 18 months
Too new to tell
only 2 dated releases
Nearly every release is documented
notes for 2 of 2 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
2 releases · first in 2023
0 releases in the last 12 months
see the full history below
Release timeline
2 releases · Jul 2023 to Jul 2023
2024
2025
2026
Releases
latest 2-
2.0.118 Jul 2023 -
2.0.018 Jul 2023Release notes
Open source →Official Dart 3 support, breaking changes, and new Alphabet API.
Breaking changes:
nanoid(10)is nownanoid(length: 10). Thelengthparameter has been changed from an optional positional to an optional named parameter.- The async API
import 'package:nanoid/async.dart';has been removed. Callawait Future(() {});or before callingnanoid()to achieve the same effect. - Changed package name from
import 'package:nanoid/nanoid.dart';toimport 'package:nanoid2/nanoid2.dart'; - The insecure API
import 'package:nanoid/non-secure.dart';has been removed. Callnanoid(random: Random());instead to force a non-secure (and faster) random number generator.nonoid()automatically usesRandom()instead ofRandom.secure()on platforms that do not provide a cryptographically secure source of random numbers. - Removed the
customAlphabet('custom', 10)API. Usenanoid(alphabet: 'custom', length: 10);instead.
New APIs:
- The
Alphabetclass provides a set of predefined alphabets for various use cases.