UNPKG
@torchlight-api/torchlight-cli
Version:
latest (0.1.7)
0.1.7
0.1.6
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.2
0.0.1
A CLI for Torchlight - the syntax highlighting API
@torchlight-api/torchlight-cli
/
src
/
support
/
guid.js
5 lines
(4 loc)
•
209 B
JavaScript
View Raw
1
2
3
4
5
export
default
function
guid
(
) {
const
S4
= (
) =>
Math
.
floor
((
1
+
Math
.
random
()) *
0x10000
).
toString
(
16
).
substring
(
1
)
return
`
${S4()}
${S4()}
-
${S4()}
-
${S4()}
-
${S4()}
-
${S4()}
${S4()}
${S4()}
`
.
toLowerCase
() }