var createUUID = (function (uuidRegEx, uuidReplacer) { return function () { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase(); }; })(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c == "x" ? r : (r & 3 | 8); return v.toString(16); });
代码中的
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
可以更改为
xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx
就是32位