Create global function file
This commit is contained in:
parent
24e18de6e1
commit
e6b79a5838
8
src/_data/global.js
Normal file
8
src/_data/global.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
module.exports = {
|
||||
random() {
|
||||
const segment = () => {
|
||||
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
||||
};
|
||||
return `${segment()}-${segment()}-${segment()}`;
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue