开发者

Version 1 UUID Node.js binding?

I was trying to export https://github.com/LiosK/UUID开发者_开发百科.js into a module, but I'm having a rough time - version 4 is worthless to me (use case Cassandra) - does anybody know of a binding for these types of uuids? I can't seem to find one on Google...maybe someone has implemented what's out there?

Thanks!


I think you can just use /dist/uuid.core.js with a slight modification as follows:

add the following line and save:

exports.UUID = UUID;

now in another file use:

var UUID = require("path/to/the/uuid.core.js");

console.log(UUID.generate());

hope that helps J


https://github.com/broofa/node-uuid now supports v1 format IDs. FWIW.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜