UNPKG

@matatbread/typia

Version:

Superfast runtime validators with only one line

18 lines 618 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._validateReport = void 0; const _validateReport = (array) => { const reportable = (path) => { if (array.length === 0) return true; const last = array[array.length - 1].path; return path.length > last.length || last.substring(0, path.length) !== path; }; return (exceptable, error) => { if (exceptable && reportable(error.path)) array.push(error); return false; }; }; exports._validateReport = _validateReport; //# sourceMappingURL=_validateReport.js.map