diff options
Diffstat (limited to 'app/javascript/flavours/glitch/util/uuid.js')
-rw-r--r-- | app/javascript/flavours/glitch/util/uuid.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/util/uuid.js b/app/javascript/flavours/glitch/util/uuid.js new file mode 100644 index 000000000..be1899305 --- /dev/null +++ b/app/javascript/flavours/glitch/util/uuid.js @@ -0,0 +1,3 @@ +export default function uuid(a) { + return a ? (a^Math.random() * 16 >> a / 4).toString(16) : ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, uuid); +}; |