2.0.1 • Published 9 years ago

lite-id v2.0.1

Weekly downloads
24
License
MIT
Repository
github
Last release
9 years ago

lite-id

Build Status A simple nodejs module for generate unique string id.

Installation

npm install lite-id

When should I use lite-id?

You need to generate a simple unique id in code.

API

var id = require('lite-id');
console.log(id());
//Result: J6YgVpwp1929

id(length)

Generates an id. Optional length is set resulting id length. Default length is 10.

Tests

Lite-id have a mocha test to find collisions on generated id's. Test for 3,000,000 unique id's with default length and consist is passed and processed without conflicts.

npm test //standart test with 60K instances
npm run extended_test //extended test with 3M instances

Examples

With default length

var id = require('lite-id');
console.log(id());
//Result: J6YgVpwp1929

With custom length

var id = require('lite-id');
console.log(id(20));
//Result: jXf315M_G10SQKa2786RG
2.0.1

9 years ago

2.0.0

9 years ago

1.3.3

10 years ago

1.3.2

10 years ago

1.3.0

10 years ago

1.2.7

10 years ago

1.2.6

10 years ago

1.2.5

10 years ago

1.2.4

10 years ago

1.1.4

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago