Skip to content

Ahmet-Kutuk/generate-unique

Repository files navigation

License: MIT

Generate Unique 🛠

"Generate Unique" helps you to create unique passwords and ids as you want.

Installation 🚀

yarn add generate-unique

Or

npm i generate-unique

Properties ✨

Name Required Type Description
maxLength true Number Character length of the string you want to create
hasNumber false Boolean String contain numbers
hasSpecial false Boolean String contain special character
hasUpperCharacter false Boolean String contain upper case character
hasLowerCharacter false Boolean String contain lower case character
startWith false String / Number String start with these characters
endWith false String / Number String end with these characters

Usage 🔥

import {generateUnique} from 'generate-unique';

And

<p>
{generateUnique(12,true,false,false,false,'user-')}
</p>

example result: user-7722494
<p>
{generateUnique(12,true,false,false,false,null,'-uuid')}
</p>

example result: 5262402-uuid
<p>
{generateUnique(12,true,true,true,true)}
</p>

example result: N$>BTfWE1R82
<p>
{generateUnique(12,true,true,true)}
</p>

example result: 39OA0$/#I<03
<p>
{generateUnique(12,true,true)}
</p>

example result: 46!0@#22$#**
<p>
{generateUnique(12,true)}
</p>

example result: 628829015038
<p>
{generateUnique(12)}
</p>

example result: this example return empty string because We did not specify what it should contain

About

It allows you to create unique strings as you want.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published