版本 1 UUID Node.js 绑定?
我试图将 https://github.com/LiosK/UUID.js 导出到模块中,但我过得很艰难 - 版本 4 对我来说毫无价值(用例 Cassandra) - 有人知道这些类型的 uuid 的绑定吗?我似乎无法在谷歌上找到一个...也许有人已经实现了那里的东西?
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
https://github.com/broofa/node-uuid 现在支持 v1 格式 ID。 FWIW。
https://github.com/broofa/node-uuid now supports v1 format IDs. FWIW.
我认为您可以使用 /dist/uuid.core.js 稍作修改,如下所示:
添加以下行并保存:
exports.UUID = UUID;
现在在另一个文件中使用:
var UUID = require("path/to/the/uuid.core.js");
console.log(UUID.generate());
希望有帮助
J
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