fixed
parent
24d5287baf
commit
9abf208084
12
index.js
12
index.js
|
@ -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)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
12
index.mjs
12
index.mjs
|
@ -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)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "crypto.js",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"description": "原生crypto加密模块的二次封装,简化常用加密函数的使用",
|
||||
"keywords": [
|
||||
"md5",
|
||||
|
|
Loading…
Reference in New Issue