@bosiu/id-generator

Generates a unique ID from random characters.

Usage no npm install needed!

<script type="module">
  import bosiuIdGenerator from 'https://cdn.skypack.dev/@bosiu/id-generator';
</script>

README

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