Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/iamnnort/smart-id

ID generator for Node.js - Unique - Smart - Short
https://github.com/iamnnort/smart-id

crypto generator guid id identifier random uid unique uuid

Last synced: 10 days ago
JSON representation

ID generator for Node.js - Unique - Smart - Short

Awesome Lists containing this project

README

        

## Info

ID generator for Node.js - Unique - Smart - Short.

## Installation

```bash
yarn install @iamnnort/smart-id
```

## Usage

```javascript
import { generate } from "@iamnnort/smart-id";

console.log(generate()); // AmLXmSwfJmUxoTbP
console.log(generate({ prefix: "cli" })); // cli_0Y3xbmodn37AUQkx
console.log(generate({ prefix: "cli", size: 32 })); // cli_Yhar8gzYEiU2Buf5dse3ZxBCI9Zr9VYg
```

## Parameters

| Parameter | Description |
| --------- | ---------------------- |
| `prefix` | Group or entity prefix |
| `size` | Hash length |