uuid-time
v1.0.0
Published
Get time from uuids
Downloads
20,199
Readme
uuid-time
Get time from uuids
Motivation
So there was this pull-request on the mainline node-uuid
that hasn't been merged since 2012. So I decided to strip it out into a stand-alone module because I needed it.
Usage
//
// Remark: This also works with uuids generated from
// `require('uuid');`, which is a popular fork of `node-uuid`.
//
var uuidTime = require('uuid-time'),
uuid = require('node-uuid');
var v1 = uuid.v1();
var buf = uuid.parse(v1);
console.log('%s (string) created at %s', v1, uuidTime.v1(v1));
console.log('%s (buffer) created at %s', v1, uuidTime.v1(buf));
Attribution
Much of this code was written by Krassimir Fotev in the pull request mentioned in Motivation. It was adapted and re-released under the MIT License.