UNPKG
crypto-randomuuid
Version:
latest (1.0.0)
1.0.0
Polyfill crypto.randomUUID
crypto-randomuuid
/
index.js
8 lines
(5 loc)
•
156 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
'use strict'
;
const
crypto =
require
(
'crypto'
);
module
.
exports
=
typeof
crypto.
randomUUID
===
'function'
? crypto.
randomUUID
:
require
(
'./polyfill'
);