# id-management-module

> id-management-module is used to generate unique id(key) based on some rule.This rules are provided as a array of rules JSON.

Latest version **3.0.2** (published 2016-10-17) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install id-management-module
pnpm add id-management-module
yarn add id-management-module
bun add id-management-module
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.2 |
| Published | 2016-10-17 |
| First published | 2016-10-14 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Chandrakant Thakkar |
| Maintainers | chandrakantthakkar-digicorp |
| Keywords | id, management, module |

## Links

- npm: https://www.npmjs.com/package/id-management-module
- Repository: https://github.com/ChandrakantThakkarDigiCorp/id-management-module
- Homepage: https://github.com/ChandrakantThakkarDigiCorp/id-management-module#readme
- Issues: https://github.com/ChandrakantThakkarDigiCorp/id-management-module/issues
- npm.io page: https://npm.io/package/id-management-module

## Dependencies (1)

- [d3](https://npm.io/package/d3.md) 4.2.7

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 3.0.2 (latest) — 2016-10-17
- 3.0.1 — 2016-10-17
- 3.0.0 — 2016-10-17
- 2.0.0 — 2016-10-17
- 1.0.0 — 2016-10-14

## README

## id-management-module
#### Author: Chandrakant Thakkar
##### Created on: 14th Oct 2016

---
###### id-management-module is used to generate unique id(key) based on some rule.This rules are provided as a array of rules JSON.

- This unique key may be consist of from static value,dynamic value,contains current date/time or contains user given date/time and format.

- Rule's array for static value
```javascript  
var keyRule = [{
  type: "static",
  value: "UNIQUEKEY"
}];
var generateUniqueId = require('id-management-module');  
var uniqueKey=generateUniqueId.generateID(keyRule);
```

- Here, it will generate  key with value 'UNIQUEKEY' and return same.

- Rule's array for static value and dynamic value
```javascript  
 var keyRule = [{
   type: "static",
   value: "UNIQUEKEY"
 }, {
   type: "dynamic",
   value: "plantCode"
 }];
 var data={
  plantCode:"3001"
 };
var generateUniqueId = require('id-management-module');  
var uniqueKey=generateUniqueId.generateID(keyRule,data);
```
- Here, it will take static value 'UNIQUEKEY' from static rule and take dynamic value '3001' from plantCode passed into data.And it will return key 'UNIQUEKEY3001'.

- Rule's array for static value and dynamic value with current Date/Time
```javascript  
 var keyRule = [{
   type: "static",
   value: "UNIQUEKEY"
 }, {
   type: "dynamic",
   value: "plantCode"
 }, {
   type: "currdatetime",
   format: "%y%m%d"
 }];
 var data={
  plantCode:"3001"
 };
var generateUniqueId = require('id-management-module');  
var uniqueKey=generateUniqueId.generateID(keyRule,data);
```
- Here, it will take static value 'UNIQUEKEY' from static rule and take dynamic value '3001' from plantCode passed into data and current date/time in YYYYMMDD format.And it will return key 'UNIQUEKEY300120161014'.

- Rule's array for static value and dynamic value with user defined Date/Time
```javascript  
 var keyRule = [{
   type: "static",
   value: "UNIQUEKEY"
 }, {
   type: "dynamic",
   value: "plantCode"
 }, {
   type: "userdatetime",
   format: "%y%m%d",
   value:"2016-10-14"
 }];
 var data={
  plantCode:"3001"
 };
var generateUniqueId = require('id-management-module');  
var uniqueKey=generateUniqueId.generateID(keyRule,data);
```
- Here, it will take static value 'UNIQUEKEY' from static rule and take dynamic value '3001' from plantCode passed into data and user defined date/time in YYYYMMDD format.And it will return key 'UNIQUEKEY300120161014'.

---
_Source: https://npm.io/package/id-management-module · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
