master
宇天 2021-06-24 14:04:32 +08:00
parent 24d5287baf
commit 9abf208084
3 changed files with 21 additions and 5 deletions

View File

@ -81,9 +81,17 @@ Helper.uuid = function(pipe = '-') {
__inc__ = 1024
}
inc = (__inc__ + PID + PPID).toString(16).padStart(4, '0')
inc = (__inc__ + PID + PPID).toString(16).padStart(4, '0') + rand.slice(0, 4)
return now + pipe + inc + pipe + rand.slice(0, 4) + pipe + rand.slice(-8)
return (
now +
pipe +
inc.slice(0, 4) +
pipe +
inc.slice(4, 8) +
pipe +
rand.slice(-8)
)
}
/**

View File

@ -81,9 +81,17 @@ export function uuid(pipe = '-') {
__inc__ = 1024
}
inc = (__inc__ + PID + PPID).toString(16).padStart(4, '0')
inc = (__inc__ + PID + PPID).toString(16).padStart(4, '0') + rand.slice(0, 4)
return now + pipe + inc + pipe + rand.slice(0, 4) + pipe + rand.slice(-8)
return (
now +
pipe +
inc.slice(0, 4) +
pipe +
inc.slice(4, 8) +
pipe +
rand.slice(-8)
)
}
/**

View File

@ -1,6 +1,6 @@
{
"name": "crypto.js",
"version": "2.0.3",
"version": "2.0.4",
"description": "原生crypto加密模块的二次封装,简化常用加密函数的使用",
"keywords": [
"md5",