sequential-guid
Node package for generating sequential unique identifiers based on unique guid seed. Generation guids version 1 and 4 cannot be done without node-uuid library, thank you Broofa.
Getting Started
Install it in your browser:
<!-- Don't forget to include 'node-uuid' dependency (https://github.com/broofa/node-uuid) -->
Or in node.js:
npm install sequential-guid
var Uid =
...and create object
var uid =
Creating new instance of guid class cause generation of the seed
console // output guid like this: 6e44dc51-804d-47ab-a933-f94641cf86cf
You can deffer generating seed value by seting deferInit property. Now new object has undefined seed until you call next() method on it, we can also specify value for seed
UidprototypedeferInit = true var iid = iidseed = '00000000-0000-4000-a000-000000000000'
lets generate unique identifiers
console // '00000000-0000-4000-a000-000000000001' console // '00000000-0000-4000-a000-000000000002' console // '00000000-0000-4000-a000-000000000003' console // '00000000-0000-4000-a000-000000000004' console // '00000000-0000-4000-a000-000000000005'
That's all, thanks for reading :)