Create global function file

This commit is contained in:
TheThomaas 2023-11-13 21:36:04 +01:00
parent 24e18de6e1
commit e6b79a5838

8
src/_data/global.js Normal file
View file

@ -0,0 +1,8 @@
module.exports = {
random() {
const segment = () => {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
};
return `${segment()}-${segment()}-${segment()}`;
}
};