UNPKG

typia

Version:

Superfast runtime validators with only one line

10 lines (9 loc) 424 B
import { _randomFormatLength } from "./_randomStringLength.mjs"; //#region src/internal/_randomFormatUuid.ts const _randomFormatUuid = (props) => _randomFormatLength(props, () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => { const r = Math.random() * 16 | 0; return (c === "x" ? r : r & 3 | 8).toString(16); })); //#endregion export { _randomFormatUuid }; //# sourceMappingURL=_randomFormatUuid.mjs.map