UNPKG
sew-itools.js
Version:
latest (1.0.6)
1.0.6
前端开发中常用的工具方法
github.com/KeChenH/itools
KeChenH/itools
sew-itools.js
/
src
/
tools
/
uniqueId.js
10 lines
(9 loc)
•
195 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
/** * 不重复ID */
const
uniqueId
= (
) => {
let
time = (+
new
Date
).
toString
(
36
)
let
random =
Math
.
random
().
toString
(
36
).
split
(
'.'
)[
1
]
return
`
${time}
_
${random}
`
}
export
default
uniqueId