UNPKG

@httpx/assert

Version:
2 lines 655 B
'use strict';var number_guards_cjs=require('./number.guards.cjs'),string_utils_cjs=require('./string.utils.cjs');var s=t=>typeof t=="string"&&t.trim().length>0,a=/^-?\d+$/,p=t=>{if(typeof t!="string")return false;let e=a.test(t)?Number.parseInt(t,10):t;return number_guards_cjs.isNumberSafeInt(e)},f=t=>{if(!s(t)||t.length!==24||!string_utils_cjs.isoDateTimeZRegexp.test(t))return false;try{return new Date(t).toISOString().toUpperCase()===t.toUpperCase()}catch{return false}};exports.isParsableSafeInt=p;exports.isParsableStrictIsoDateZ=f;exports.isStringNonEmpty=s;//# sourceMappingURL=string.guards.cjs.map //# sourceMappingURL=string.guards.cjs.map