UNPKG

ts-data-objects

Version:

Simple lightweight library for enhancing plain JS objects with TypeScript wrappers enabling easy API data assertion and validation

17 lines (16 loc) 860 B
import { D as g } from "./dataError-aVfBT4F-.js"; const n = (t) => typeof t == "string", s = (t) => t == null || typeof t == "string", r = (t) => typeof t == "number", i = (t) => t == null || typeof t == "number", y = (t) => typeof t == "boolean", c = (t) => t == null || typeof t == "boolean", e = (t, o) => typeof t == "object" && t != null && o(t), p = (t, o) => t == null || typeof t == "object" && o(t), l = (t, o) => Array.isArray(t) && Object.keys(t).length === t.length && t.every(o), f = (t, o) => t == null || Array.isArray(t) && Object.keys(t).length === t.length && t.every(o); export { g as DataValidationError, l as isArrayOf, y as isBool, r as isNum, e as isObject, f as isOptionalArrayOf, c as isOptionalBool, i as isOptionalNum, p as isOptionalObject, s as isOptionalStr, n as isStr }; //# sourceMappingURL=common.js.map