UNPKG

iking-utils-pro

Version:

金合前端工具库

2 lines (1 loc) 434 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const t=[];for(let e=0;e<=15;e++)t[e]=e.toString(16);let e=0;exports.buildShortUUID=function(t=""){const r=Date.now(),o=Math.floor(1e9*Math.random());return e++,t+"_"+o+e+String(r)},exports.buildUUID=function(){let e="";for(let r=1;r<=36;r++)e+=9===r||14===r||19===r||24===r?"-":15===r?4:20===r?t[4*Math.random()|8]:t[16*Math.random()|0];return e.replace(/-/g,"")};