https://github.com/git-marcopitra/unikey
A library to generate unique keys, with great performance
https://github.com/git-marcopitra/unikey
Last synced: 7 months ago
JSON representation
A library to generate unique keys, with great performance
- Host: GitHub
- URL: https://github.com/git-marcopitra/unikey
- Owner: git-marcopitra
- Created: 2023-11-30T01:29:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-28T15:42:24.000Z (over 2 years ago)
- Last Synced: 2024-12-29T05:27:49.527Z (over 1 year ago)
- Language: TypeScript
- Size: 53.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UNIKEY
A library for unique code generation
## Install
For npm:
```bash
npm i unikey
```
For yarn:
```bash
yarn add unikey
```
For pnpm:
```bash
pnpm add unikey
```
## Usage
```js
import unikey from 'unikey';
const key = unikey(); // enf5a8t9
// ...
```
### With length
```js
import unikey from 'unikey';
const key = unikey(16); // tcmd6gud23ga2f5p
// ...
```
### With Options
```js
import unikey from 'unikey';
const mixedKey = unikey(16, { case: 'mixed' }); // riQTUuoZ3iV9RQEH
const upperKey = unikey(16, { case: 'upper' }); // IAYNLQD8T3DJ63GR
// ...
```