UNPKG
liquor-tree-withoutdragndrop
Version:
latest (0.2.72)
0.2.72
0.2.71
0.2.70
A Vue.js tree component.
github.com/SelectCode/liquor-tree
SelectCode/liquor-tree
liquor-tree-withoutdragndrop
/
src
/
utils
/
uuidV4.js
14 lines
(10 loc)
•
265 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// it is not genuine GUIDs
function
s4
(
) {
return
Math
.
floor
((
1
+
Math
.
random
()) *
0x10000
) .
toString
(
16
) .
substring
(
1
) }
export
default
function
uuidV4
(
) {
return
s4
() +
s4
() +
'-'
+
s4
() +
'-'
+
s4
() +
'-'
+
s4
() +
'-'
+
s4
() +
s4
() +
s4
() }