nanoid-generate
v1.1.0
Published
Nanoid generate with custom dictionaries
Downloads
3,096
Readme
nanoid-generate
Custom nanoid generate functions with predefined character sets. Uses nanoid-dictionary as a dictionary.
Usage
Install nanoid-generate
npm i nanoid-generate -S
Then pick a desired generator and set its' output string length
const generate = require('nanoid-generate');
const englishRandomString = generate.english(10);
Or instead require a specific generator
const nolookalikes = require('nanoid-generate/nolookalikes');
const nolookalikesRndString = nolookalikes(10);
Generators
numbers
Numbers from 0 to 9
const numbers = require('nanoid-generator/numbers');
lowercase
Lowercase English letters.
const englishLowercase = require('nanoid-generator/lowercase');
uppercase
Uppercase English letters.
const englishUppercase = require('nanoid-generator/uppercase');
alphanumeric
Uppercase and lowercase English letters with numbers.
const alphanumeric = require('nanoid-generator/alphanumeric');
english
English alphabet.
const englishUppercase = require('nanoid-generator/english');
nolookalikes
Numbers and english alphabet without lookalikes: 1
, l
, I
, 0
, O
, o
, u
, v
const nolookalikes = require('nanoid-generator/nolookalikes');