generate-unique-id
v2.0.3
Published
Generate a unique random ID string.
Downloads
13,857
Maintainers
Readme
Generate Unique ID
Generate a unique random ID string. GUI demo can be found here.
Installation
Using npm:
npm i generate-unique-id
Using yarn:
yarn add generate-unique-id
Using classic "src"
<script src="path/to/the/file/generateUniqueId.js"></script>
Usage
const generateUniqueId = require('generate-unique-id');
// example 1
const id1 = generateUniqueId();
// example 2
const id2 = generateUniqueId({
length: 32,
useLetters: false
});
// example 3
const id3 = generateUniqueId({
includeSymbols: ['@','#','|'],
excludeSymbols: ['0']
});