We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
var uuidTool = require('/utils/node-uuid/uuid.modified.js'); uuid = uuidTool.v4();
The text was updated successfully, but these errors were encountered:
安卓也无法生成。 原因: uuid 依赖于crypto,crypto 已不支持单独引用,内置在运行环境中(如node或者浏览器),而手机上是没有这个环境的
Sorry, something went wrong.
好吧那只好放弃用这个库了,谢谢 @byg
提供一个算法:
/** * Returns a v4 compliant UUID. * * @returns {string} */ export default function uuid() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { const r = (Math.random() * 16) | 0, v = c === 'x' ? r : (r & 0x3) | 0x8; return v.toString(16); }); }
No branches or pull requests
var uuidTool = require('/utils/node-uuid/uuid.modified.js');
uuid = uuidTool.v4();
The text was updated successfully, but these errors were encountered: