UNPKG

@beenotung/tslib

Version:
16 lines (15 loc) 409 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.is_uuid = is_uuid; /** * https://en.wikipedia.org/wiki/Universally_unique_identifier */ function is_uuid(s) { const ss = s.split('-'); return (ss.length === 5 && ss[0].length === 8 && ss[1].length === 4 && ss[2].length === 4 && ss[3].length === 4 && ss[4].length === 12); }