1.0.2 • Published 5 years ago

@bosiu/id-generator v1.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

id-generator

Generates a unique ID from random characters.

Install

npm install @bosiu/id-generator

or

yarn add @bosiu/id-generator

Usage

First you need to import the package :

import randomID from '@bosiu/id-generator';

or

const randomID = require('@bosiu/id-generator');

You can now define the length of generated ID through the method attribute.

example:

randomID(10);

console.log(randomID(10)); // cw5SuwIWzk