README
Fluffy IDs
Fluffy and fun IDs for humans.
Example: 55-fluffy-mushroom-dancing-happily
The full id form is of: <count>-<adjective>-<noun>-<verb>-<adverb>
Tested to have 99% unique ids out of 10 million generated. Best not to count on it if you need lots of uuid.
Version
0.1.0
Requirements
Installation
Via npm:
npm install fluffy-ids
Usage
const fluffy = require("fluffy-ids");
id = fluffy.generate();
Config
Change the props on the config object:
const fluffy = require("fluffy-ids");
fluffy.config.separator = "~";
maxCount
- the max number to precede the id (as in 55-fluffy-mushroom-dancing-happily)separator
- the separator between each word. defaults to "-"withNumber
- defaults totrue
, iffalse
removes the number at the start of the id (as in fluffy-mushroom-dancing-happily)isShort
- defaults tofalse
, iftrue
removes the verb and adverb from the id (as in 55-fluffy-mushroom)funMode
- defaults tofalse
, iftrue
uses only animals for the noun and only encouraging words for the adjective (as in 11-stunning-mandrill-killed-eventually).
Please note that changing withNumber
, isShort
, funMode
reduce the number of unique ids we can generate - mathematically speaking.
Credits
This is forked form this repo.
Ariel Benichou <videojr3000@gmail.com>