random-enough-id
v1.0.2
Published
Generate "random enough" string IDs without crypto primitives
Readme
random-enough-id
Generate "random enough" string IDs without using crypto primitives.
Installation
npm install random-enough-idUsage
const { generateId } = require('random-enough-id');
const id = generateId();
console.log(id); // e.g., "2k3j4h5g6d7f8s9a"
const customLength = generateId(24);
console.log(customLength); // e.g., "2k3j4h5g6d7f8s9a1b2c3d4e"API
generateId(length = 16)
Generates a random string ID.
length(number): The length of the generated ID. Default: 16. Minimum: 1.
Returns: string
License
MIT
