broofa/node-uuid — Issue #12: Possible extension of v1 UUIDs
Author: ctavan
Created: 2011-11-17 14:20:20+00:00
State: open

A thing came in mind when I was running some tests with v1 UUIDs: Should we allow the user of the `v1()` method to optionally specify a timestamp that will be used instead of `Date().getTime()`?

There are two cases in which this might make sense:

1. For testing (clock sequence stuff)
2. If you want to do range selections on a range of v1 UUID's and need to generate the corresponding start- and end-UUID's.

I see that we're getting to a point where we're tempted to make node-uuid bloated which should be avoided IMO. I therefore had the idea of using node-uuid as the underlying fast & lightweight uuid generator for a wrapper similar to uuid-js that provides you with some convenience methods like conversion between string- and buffer-representation, validation, extraction of the timestamp, etc, see my discussion with @pnegri: https://github.com/pnegri/uuid-js/issues/10

He also had the brilliant idea of naming it node-uuid-utils which I really like.

Being able to specify the timestamp when calling `v1()` would be the only addition to node-uuid I can think of right now that would be needed to build node-uuid-utils. What do you think?