typia
Version:
Superfast runtime validators with only one line
1 lines • 711 B
Source Map (JSON)
{"version":3,"file":"_randomFormatUuid.mjs","names":[],"sources":["../../src/internal/_randomFormatUuid.ts"],"sourcesContent":["import { _ILengthProps, _randomFormatLength } from \"./_randomStringLength\";\n\nexport const _randomFormatUuid = (props?: _ILengthProps): string =>\n _randomFormatLength(props, () =>\n \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16) | 0;\n const v = c === \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n }),\n );\n"],"mappings":";;AAEA,MAAa,qBAAqB,UAChC,oBAAoB,aAClB,uCAAuC,QAAQ,UAAU,MAAM;CAC7D,MAAM,IAAK,KAAK,OAAO,IAAI,KAAM;CAEjC,QADU,MAAM,MAAM,IAAK,IAAI,IAAO,EAAA,CAC7B,SAAS,EAAE;AACtB,CAAC,CACH"}