UNPKG

n4s

Version:

typed schema validation version of enforce

44 lines (41 loc) 1.43 kB
//#region ../../node_modules/validator/es/lib/util/assertString.js function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") _typeof = function _typeof$1(obj$1) { return typeof obj$1; }; else _typeof = function _typeof$1(obj$1) { return obj$1 && typeof Symbol === "function" && obj$1.constructor === Symbol && obj$1 !== Symbol.prototype ? "symbol" : typeof obj$1; }; return _typeof(obj); } function assertString(input) { if (!(typeof input === "string" || input instanceof String)) { var invalidType = _typeof(input); if (input === null) invalidType = "null"; else if (invalidType === "object") invalidType = input.constructor.name; throw new TypeError("Expected a string but received a ".concat(invalidType)); } } //#endregion //#region ../../node_modules/validator/es/lib/util/merge.js function merge() { var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; var defaults = arguments.length > 1 ? arguments[1] : void 0; for (var key in defaults) if (typeof obj[key] === "undefined") obj[key] = defaults[key]; return obj; } //#endregion Object.defineProperty(exports, 'assertString', { enumerable: true, get: function () { return assertString; } }); Object.defineProperty(exports, 'merge', { enumerable: true, get: function () { return merge; } }); //# sourceMappingURL=merge-Co1t_slP.cjs.map