check-types
Advanced tools
Comparing version 11.1.2 to 11.2.0
{ | ||
"name": "check-types", | ||
"version": "11.1.2", | ||
"description": "A little library for asserting types and values.", | ||
"version": "11.2.0", | ||
"description": "A little library for asserting types and values, with zero dependencies.", | ||
"homepage": "https://gitlab.com/philbooth/check-types.js", | ||
@@ -32,7 +32,7 @@ "bugs": "https://gitlab.com/philbooth/check-types.js/issues", | ||
"devDependencies": { | ||
"chai": "4.2.x", | ||
"jshint": "^2.9.7", | ||
"mocha": "5.2.x", | ||
"please-release-me": "^2.1.2", | ||
"uglify-js": "3.4.x" | ||
"chai": "^4.3.7", | ||
"jshint": "^2.13.6", | ||
"mocha": "^10.1.0", | ||
"please-release-me": "^2.1.4", | ||
"uglify-js": "^3.17.4" | ||
}, | ||
@@ -45,6 +45,4 @@ "scripts": { | ||
"files": [ | ||
"COPYING", | ||
"HISTORY.md", | ||
"src" | ||
] | ||
} |
@@ -10,3 +10,4 @@ # check-types.js | ||
for asserting types | ||
and values. | ||
and values, | ||
with zero dependencies. | ||
@@ -65,3 +66,3 @@ * [Why would I want that?](#why-would-i-want-that) | ||
24 kb unminified with comments, 7.1 kb minified, 2.5 kb minified + gzipped. | ||
24 kb unminified with comments, 7.3 kb minified, 2.5 kb minified + gzipped. | ||
@@ -82,7 +83,2 @@ ## How do I install it? | ||
If you're into | ||
other package managers, | ||
it is also available | ||
from Bower, Component and Jam. | ||
## How do I use it? | ||
@@ -92,12 +88,8 @@ | ||
If you are running in | ||
Node.js, | ||
Browserify | ||
or another CommonJS-style | ||
environment, | ||
you can `require` | ||
check-types like so: | ||
If you are running in Node.js | ||
or a CommonJS environment, | ||
you can `require` check-types like so: | ||
```javascript | ||
var check = require('check-types'); | ||
const check = require('check-types'); | ||
``` | ||
@@ -449,2 +441,8 @@ | ||
* `check.identical(thing, thang)`: | ||
Deep equality checker. | ||
Returns `true` | ||
if `thing` has all of the same values as `thang`, | ||
`false` otherwise. | ||
#### Array predicates | ||
@@ -988,2 +986,1 @@ | ||
[license]: https://gitlab.com/philbooth/check-types.js/blob/master/COPYING | ||
@@ -52,2 +52,3 @@ /*globals define, module, Symbol, Map, Set */ | ||
{ n: 'like', f: like, s: 'be like {e}' }, | ||
{ n: 'identical', f: identical, s: 'be identical to {e}' }, | ||
{ n: 'array', f: array, s: 'be Array' }, | ||
@@ -375,3 +376,3 @@ { n: 'emptyArray', f: emptyArray, s: 'be empty array' }, | ||
function emptyObject (data) { | ||
return object(data) && !some(data, function () { | ||
return object(data) && ! some(data, function () { | ||
return true; | ||
@@ -447,3 +448,4 @@ }); | ||
* Tests whether `data` 'quacks like a duck'. Returns true if `data` has all | ||
* of the properties of `archetype` (the 'duck'), false otherwise. | ||
* of the properties of `archetype` (the 'duck'), false otherwise. Interrogates | ||
* objects recursively, to arbitrary depth. | ||
*/ | ||
@@ -455,7 +457,7 @@ function like (data, archetype) { | ||
if (hasOwnProperty.call(archetype, name)) { | ||
if (hasOwnProperty.call(data, name) === false || typeof data[name] !== typeof archetype[name]) { | ||
if (! hasOwnProperty.call(data, name) || typeof data[name] !== typeof archetype[name]) { | ||
return false; | ||
} | ||
if (object(data[name]) && like(data[name], archetype[name]) === false) { | ||
if (object(data[name]) && ! like(data[name], archetype[name])) { | ||
return false; | ||
@@ -470,2 +472,38 @@ } | ||
/** | ||
* Public function `identical`. | ||
* | ||
* Tests whether `data` has all of the same properties and values as `archetype`. | ||
* Interrogates objects recursively, to arbitrary depth. | ||
*/ | ||
function identical (data, archetype) { | ||
var name; | ||
for (name in archetype) { | ||
if (hasOwnProperty.call(archetype, name)) { | ||
if (! hasOwnProperty.call(data, name) || data[name] !== archetype[name]) { | ||
return false; | ||
} | ||
if (object(data[name]) && ! identical(data[name], archetype[name])) { | ||
return false; | ||
} | ||
} | ||
} | ||
for (name in data) { | ||
if (hasOwnProperty.call(data, name)) { | ||
if (! hasOwnProperty.call(archetype, name) || archetype[name] !== data[name]) { | ||
return false; | ||
} | ||
if (object(archetype[name]) && ! identical(archetype[name], data[name])) { | ||
return false; | ||
} | ||
} | ||
} | ||
return true; | ||
} | ||
/** | ||
* Public function `array`. | ||
@@ -687,3 +725,3 @@ * | ||
if (not.assigned(data)) { | ||
result[key] = !!predicate.m; | ||
result[key] = !! predicate.m; | ||
} else { | ||
@@ -734,3 +772,3 @@ result[key] = predicate(data[key]); | ||
return !result; | ||
return ! result; | ||
} | ||
@@ -755,3 +793,3 @@ | ||
return !result; | ||
return ! result; | ||
} | ||
@@ -852,3 +890,3 @@ | ||
function notImpl (value) { | ||
return !value; | ||
return ! value; | ||
} | ||
@@ -882,3 +920,3 @@ | ||
function maybeImpl (value) { | ||
if (assigned(value) === false) { | ||
if (! assigned(value)) { | ||
return true; | ||
@@ -905,3 +943,3 @@ } | ||
if (!type(collection)) { | ||
if (! type(collection)) { | ||
return false; | ||
@@ -917,3 +955,3 @@ } | ||
(target !== 'maybe' || assigned(item)) && | ||
!predicate.apply(null, [ item ].concat(args)) | ||
! predicate.apply(null, [ item ].concat(args)) | ||
) { | ||
@@ -920,0 +958,0 @@ // TODO: Replace with for...of when ES6 is required. |
@@ -1,1 +0,1 @@ | ||
!function(n){"use strict";var i,r,e,f,c,t,u,o,a,l,s,b,p,y,m,h,g,d;function v(n){return null!=n}function j(n){return"number"==typeof n&&p<n&&n<y}function E(n){return"number"==typeof n&&n%1==0}function O(n,e){return j(n)&&e<n}function w(n,e){return j(n)&&n<e}function k(n,e){return j(n)&&e<=n}function S(n,e){return j(n)&&n<=e}function I(n){return"string"==typeof n}function N(n){return I(n)&&""!==n}function A(n){return"[object Object]"===a.call(n)}function q(n,e){for(var t in n)if(o.call(n,t)&&e(t,n[t]))return!0;return!1}function x(n,e){try{return n instanceof e}catch(n){return!1}}function T(n,e){var t;for(t in e)if(o.call(e,t)){if(!1===o.call(n,t)||typeof n[t]!=typeof e[t])return!1;if(A(n[t])&&!1===T(n[t],e[t]))return!1}return!0}function F(n){return v(n)&&0<=n.length}function L(n){return m?v(n)&&M(n[Symbol.iterator]):F(n)}function P(n,t){var e,r;if(!v(n))return!1;if(g&&x(n,Set))return n.has(t);if(I(n))return-1!==n.indexOf(t);if(m&&n[Symbol.iterator]&&M(n.values)){e=n.values();do{if((r=e.next()).value===t)return!0}while(!r.done);return!1}return q(n,function(n,e){return e===t})}function D(n,e){return!!v(n)&&(h&&x(n,Map)?n.has(e):!(L(n)&&!j(+e))&&!!n[e])}function M(n){return"function"==typeof n}function R(n,e){for(var t in n)o.call(n,t)&&e(t,n[t])}function V(n,e){var t;for(t=0;t<n.length;t+=1)if(n[t]===e)return e;return!e}function Y(n,e){var t,r;for(t in n)if(o.call(n,t)){if(A(r=n[t])&&Y(r,e)===e)return e;if(r===e)return e}return!e}function _(t,n){return R(n,function(n,e){t[n]=e}),t}function z(u,o){return function(){var e=arguments,n=u.l||u.length,t=e[n],r=e[n+1];return G(u.apply(null,e),N(t)?t:o.replace("{a}",B(e[0])).replace("{e}",B(e[1])).replace("{e2}",B(e[2])).replace("{t}",function(){var n=e[1];return n&&n.name?n.name:n}),M(r)?r:TypeError),e[0]}}function B(n){return function(){return I(n)?'"'+n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"':n&&!0!==n&&n.constructor&&!x(n,RegExp)&&"number"!=typeof n?n.constructor.name:n}}function G(n,e,t){if(n)return n;throw new(t||Error)(e||"assert failed")}function K(n){var e=function(){return C(n.apply(null,arguments))};return e.l=n.length,e}function C(n){return!n}function H(t,r,u){var n=function(){var n,e;if(n=arguments[0],"maybe"===t&&c.assigned(n))return!0;if(!r(n))return!1;n=function(n,e){switch(n){case F:return s.call(e);case A:return l(e).map(function(n){return e[n]});default:return e}}(r,n),e=s.call(arguments,1);try{n.forEach(function(n){if(("maybe"!==t||v(n))&&!u.apply(null,[n].concat(e)))throw 0})}catch(n){return!1}return!0};return n.l=u.length,n}function J(n,e){return Q([n,r,e,""])}function Q(r){var u,o,f;return u=r.shift(),o=r.pop(),f=r.pop(),R(r.pop(),function(n,e){var t=i[n];t&&o&&(t=t.replace("to",o+"to")),Object.defineProperty(f,n,{configurable:!1,enumerable:!0,writable:!1,value:u.apply(null,r.concat(e,t))})}),f}function U(n,e,t){return Q([n,e,{},t])}function W(e,t){u.forEach(function(n){e[n].of=U(t,r[n].of)})}i={},r={},[{n:"equal",f:function(n,e){return n===e},s:"equal {e}"},{n:"undefined",f:function(n){return void 0===n},s:"be undefined"},{n:"null",f:function(n){return null===n},s:"be null"},{n:"assigned",f:v,s:"be assigned"},{n:"primitive",f:function(n){var e;switch(n){case null:case void 0:case!1:case!0:return!0}return"string"==(e=typeof n)||"number"===e||m&&"symbol"===e},s:"be primitive type"},{n:"contains",f:P,s:"contain {e}"},{n:"in",f:function(n,e){return P(e,n)},s:"be in {e}"},{n:"containsKey",f:D,s:"contain key {e}"},{n:"keyIn",f:function(n,e){return D(e,n)},s:"be key in {e}"},{n:"zero",f:function(n){return 0===n},s:"be 0"},{n:"one",f:function(n){return 1===n},s:"be 1"},{n:"infinity",f:function(n){return n===p||n===y},s:"be infinity"},{n:"number",f:j,s:"be Number"},{n:"integer",f:E,s:"be integer"},{n:"float",f:function(n){return j(n)&&n%1!=0},s:"be non-integer number"},{n:"even",f:function(n){return"number"==typeof n&&n%2==0},s:"be even number"},{n:"odd",f:function(n){return E(n)&&n%2!=0},s:"be odd number"},{n:"greater",f:O,s:"be greater than {e}"},{n:"less",f:w,s:"be less than {e}"},{n:"between",f:function(n,e,t){if(e<t)return O(n,e)&&n<t;return w(n,e)&&t<n},s:"be between {e} and {e2}"},{n:"greaterOrEqual",f:k,s:"be greater than or equal to {e}"},{n:"lessOrEqual",f:S,s:"be less than or equal to {e}"},{n:"inRange",f:function(n,e,t){if(e<t)return k(n,e)&&n<=t;return S(n,e)&&t<=n},s:"be in the range {e} to {e2}"},{n:"positive",f:function(n){return O(n,0)},s:"be positive number"},{n:"negative",f:function(n){return w(n,0)},s:"be negative number"},{n:"string",f:I,s:"be String"},{n:"emptyString",f:function(n){return""===n},s:"be empty string"},{n:"nonEmptyString",f:N,s:"be non-empty string"},{n:"match",f:function(n,e){return I(n)&&!!n.match(e)},s:"match {e}"},{n:"boolean",f:function(n){return!1===n||!0===n},s:"be Boolean"},{n:"object",f:A,s:"be Object"},{n:"emptyObject",f:function(n){return A(n)&&!q(n,function(){return!0})},s:"be empty object"},{n:"nonEmptyObject",f:function(n){return A(n)&&q(n,function(){return!0})},s:"be non-empty object"},{n:"instanceStrict",f:x,s:"be instanceof {t}"},{n:"thenable",f:function(n){return v(n)&&M(n.then)},s:"be promise-like"},{n:"instance",f:function(n,e){try{return x(n,e)||n.constructor.name===e.name||a.call(n)==="[object "+e.name+"]"}catch(n){return!1}},s:"be {t}"},{n:"like",f:T,s:"be like {e}"},{n:"array",f:function(n){return b(n)},s:"be Array"},{n:"emptyArray",f:function(n){return b(n)&&0===n.length},s:"be empty array"},{n:"nonEmptyArray",f:function(n){return b(n)&&0<n.length},s:"be non-empty array"},{n:"arrayLike",f:F,s:"be array-like"},{n:"iterable",f:L,s:"be iterable"},{n:"date",f:function(n){return x(n,Date)&&E(n.getTime())},s:"be valid Date"},{n:"function",f:M,s:"be Function"},{n:"hasLength",f:function(n,e){return v(n)&&n.length===e},s:"have length {e}"},{n:"throws",f:function(n){if(!M(n))return!1;try{n()}catch(n){return!0}return!1},s:"throw"}].map(function(n){var e=n.n;i[e]="assert failed: expected {a} to "+n.s,r[e]=n.f}),e={map:function e(r,t){var u;u=b(r)?[]:{};if(M(t))R(r,function(n,e){u[n]=t(e)});else{b(t)||f.object(t);var o=l(r||{});R(t,function(t,n){o.some(function(n,e){return n===t&&(o.splice(e,1),!0)}),M(n)?c.assigned(r)?u[t]=!!n.m:u[t]=n(r[t]):u[t]=e(r[t],n)})}return u},all:function(n){if(b(n))return V(n,!1);return f.object(n),Y(n,!1)},any:function(n){if(b(n))return V(n,!0);return f.object(n),Y(n,!0)}},u=["array","arrayLike","iterable","object"],o=Object.prototype.hasOwnProperty,a=Object.prototype.toString,l=Object.keys,s=Array.prototype.slice,b=Array.isArray,p=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,m="function"==typeof Symbol,h="function"==typeof Map,g="function"==typeof Set,e=_(e,r),f=J(z,G),c=J(K,C),t=J(function(n){var e=function(){return!!c.assigned(arguments[0])||n.apply(null,arguments)};return e.l=n.length,e.m=!0,e},function(n){return!1===v(n)||n}),f.not=U(z,c,"not "),f.maybe=U(z,t,"maybe "),u.forEach(function(n){r[n].of=Q([H.bind(null,null),r[n],r,{},""])}),W(f,z),W(c,K),u.forEach(function(n){t[n].of=Q([H.bind(null,"maybe"),r[n],r,{},""]),f.maybe[n].of=U(z,t[n].of),f.not[n].of=U(z,c[n].of)}),d=_(e,{assert:f,not:c,maybe:t}),"function"==typeof define&&define.amd?define(function(){return d}):"undefined"!=typeof module&&null!==module&&module.exports?module.exports=d:n.check=d}(this); | ||
!function(M){"use strict";var o,r,n,i,c,e,u,f,t,a,l,s,b,p,y,m,R,h;function g(n){return null!=n}function d(n){return"number"==typeof n&&b<n&&n<p}function v(n){return"number"==typeof n&&n%1==0}function j(n,e){return d(n)&&e<n}function E(n,e){return d(n)&&n<e}function V(n,e){return d(n)&&e<=n}function Y(n,e){return d(n)&&n<=e}function O(n){return"string"==typeof n}function _(n){return O(n)&&""!==n}function w(n){return"[object Object]"===t.call(n)}function k(n,e){for(var t in n)if(f.call(n,t)&&e(t,n[t]))return!0;return!1}function S(n,e){try{return n instanceof e}catch(n){return!1}}function z(n,e){for(var t in e)if(f.call(e,t)){if(!f.call(n,t)||typeof n[t]!=typeof e[t])return!1;if(w(n[t])&&!z(n[t],e[t]))return!1}return!0}function I(n,e){for(var t in e)if(f.call(e,t)){if(!f.call(n,t)||n[t]!==e[t])return!1;if(w(n[t])&&!I(n[t],e[t]))return!1}for(t in n)if(f.call(n,t)){if(!f.call(e,t)||e[t]!==n[t])return!1;if(w(e[t])&&!I(e[t],n[t]))return!1}return!0}function N(n){return g(n)&&0<=n.length}function B(n){return y?g(n)&&A(n[Symbol.iterator]):N(n)}function G(n,t){var e,r;if(!g(n))return!1;if(R&&S(n,Set))return n.has(t);if(O(n))return-1!==n.indexOf(t);if(y&&n[Symbol.iterator]&&A(n.values)){e=n.values();do{if((r=e.next()).value===t)return!0}while(!r.done);return!1}return k(n,function(n,e){return e===t})}function K(n,e){return!!g(n)&&(m&&S(n,Map)?n.has(e):!(B(n)&&!d(+e)||!n[e]))}function A(n){return"function"==typeof n}function q(n,e){for(var t in n)f.call(n,t)&&e(t,n[t])}function C(n,e){for(var t=0;t<n.length;t+=1)if(n[t]===e)return e;return!e}function x(n,e){var t,r;for(t in n)if(f.call(n,t)){if(w(r=n[t])&&x(r,e)===e)return e;if(r===e)return e}return!e}function H(t,n){return q(n,function(n,e){t[n]=e}),t}function T(r,u){return function(){var e=arguments,n=r.l||r.length,t=e[n],n=e[n+1];return J(r.apply(null,e),_(t)?t:u.replace("{a}",F(e[0])).replace("{e}",F(e[1])).replace("{e2}",F(e[2])).replace("{t}",function(){var n=e[1];return n&&n.name?n.name:n}),A(n)?n:TypeError),e[0]}}function F(n){return function(){return O(n)?'"'+n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"':n&&!0!==n&&n.constructor&&!S(n,RegExp)&&"number"!=typeof n?n.constructor.name:n}}function J(n,e,t){if(n)return n;throw new(t||Error)(e||"assert failed")}function Q(n){function e(){return!n.apply(null,arguments)}return e.l=n.length,e}function U(n){return!n}function W(t,r,u){function n(){var e,n=arguments[0];if("maybe"!==t||!c.assigned(n)){if(!r(n))return!1;n=function(n,e){switch(n){case N:return l.call(e);case w:return a(e).map(function(n){return e[n]});default:return e}}(r,n),e=l.call(arguments,1);try{n.forEach(function(n){if(("maybe"!==t||g(n))&&!u.apply(null,[n].concat(e)))throw 0})}catch(n){return!1}}return!0}return n.l=u.length,n}function L(n,e){return P([n,r,e,""])}function P(r){var u=r.shift(),f=r.pop(),i=r.pop();return q(r.pop(),function(n,e){var t=o[n];t&&f&&(t=t.replace("to",f+"to")),Object.defineProperty(i,n,{configurable:!1,enumerable:!0,writable:!1,value:u.apply(null,r.concat(e,t))})}),i}function D(n,e,t){return P([n,e,{},t])}function X(e,t){u.forEach(function(n){e[n].of=D(t,r[n].of)})}o={},r={},[{n:"equal",f:function(n,e){return n===e},s:"equal {e}"},{n:"undefined",f:function(n){return void 0===n},s:"be undefined"},{n:"null",f:function(n){return null===n},s:"be null"},{n:"assigned",f:g,s:"be assigned"},{n:"primitive",f:function(n){switch(n){case null:case void 0:case!1:case!0:return!0}return"string"==(n=typeof n)||"number"==n||y&&"symbol"==n},s:"be primitive type"},{n:"contains",f:G,s:"contain {e}"},{n:"in",f:function(n,e){return G(e,n)},s:"be in {e}"},{n:"containsKey",f:K,s:"contain key {e}"},{n:"keyIn",f:function(n,e){return K(e,n)},s:"be key in {e}"},{n:"zero",f:function(n){return 0===n},s:"be 0"},{n:"one",f:function(n){return 1===n},s:"be 1"},{n:"infinity",f:function(n){return n===b||n===p},s:"be infinity"},{n:"number",f:d,s:"be Number"},{n:"integer",f:v,s:"be integer"},{n:"float",f:function(n){return d(n)&&n%1!=0},s:"be non-integer number"},{n:"even",f:function(n){return"number"==typeof n&&n%2==0},s:"be even number"},{n:"odd",f:function(n){return v(n)&&n%2!=0},s:"be odd number"},{n:"greater",f:j,s:"be greater than {e}"},{n:"less",f:E,s:"be less than {e}"},{n:"between",f:function(n,e,t){if(e<t)return j(n,e)&&n<t;return E(n,e)&&t<n},s:"be between {e} and {e2}"},{n:"greaterOrEqual",f:V,s:"be greater than or equal to {e}"},{n:"lessOrEqual",f:Y,s:"be less than or equal to {e}"},{n:"inRange",f:function(n,e,t){if(e<t)return V(n,e)&&n<=t;return Y(n,e)&&t<=n},s:"be in the range {e} to {e2}"},{n:"positive",f:function(n){return j(n,0)},s:"be positive number"},{n:"negative",f:function(n){return E(n,0)},s:"be negative number"},{n:"string",f:O,s:"be String"},{n:"emptyString",f:function(n){return""===n},s:"be empty string"},{n:"nonEmptyString",f:_,s:"be non-empty string"},{n:"match",f:function(n,e){return O(n)&&!!n.match(e)},s:"match {e}"},{n:"boolean",f:function(n){return!1===n||!0===n},s:"be Boolean"},{n:"object",f:w,s:"be Object"},{n:"emptyObject",f:function(n){return w(n)&&!k(n,function(){return 1})},s:"be empty object"},{n:"nonEmptyObject",f:function(n){return w(n)&&k(n,function(){return 1})},s:"be non-empty object"},{n:"instanceStrict",f:S,s:"be instanceof {t}"},{n:"thenable",f:function(n){return g(n)&&A(n.then)},s:"be promise-like"},{n:"instance",f:function(n,e){try{return S(n,e)||n.constructor.name===e.name||t.call(n)==="[object "+e.name+"]"}catch(n){return!1}},s:"be {t}"},{n:"like",f:z,s:"be like {e}"},{n:"identical",f:I,s:"be identical to {e}"},{n:"array",f:function(n){return s(n)},s:"be Array"},{n:"emptyArray",f:function(n){return s(n)&&0===n.length},s:"be empty array"},{n:"nonEmptyArray",f:function(n){return s(n)&&0<n.length},s:"be non-empty array"},{n:"arrayLike",f:N,s:"be array-like"},{n:"iterable",f:B,s:"be iterable"},{n:"date",f:function(n){return S(n,Date)&&v(n.getTime())},s:"be valid Date"},{n:"function",f:A,s:"be Function"},{n:"hasLength",f:function(n,e){return g(n)&&n.length===e},s:"have length {e}"},{n:"throws",f:function(n){if(A(n))try{n()}catch(n){return!0}return!1},s:"throw"}].map(function(n){var e=n.n;o[e]="assert failed: expected {a} to "+n.s,r[e]=n.f}),u=["array","arrayLike","iterable","object"],f=Object.prototype.hasOwnProperty,t=Object.prototype.toString,a=Object.keys,l=Array.prototype.slice,s=Array.isArray,b=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY,y="function"==typeof Symbol,m="function"==typeof Map,R="function"==typeof Set,n=H({map:function e(r,t){var u;u=s(r)?[]:{};{var f;A(t)?q(r,function(n,e){u[n]=t(e)}):(s(t)||i.object(t),f=a(r||{}),q(t,function(t,n){f.some(function(n,e){return n===t&&(f.splice(e,1),!0)}),A(n)?c.assigned(r)?u[t]=!!n.m:u[t]=n(r[t]):u[t]=e(r[t],n)}))}return u},all:function(n){if(s(n))return C(n,!1);return i.object(n),x(n,!1)},any:function(n){if(s(n))return C(n,!0);return i.object(n),x(n,!0)}},r),i=L(T,J),c=L(Q,U),e=L(function(n){function e(){return!!c.assigned(arguments[0])||n.apply(null,arguments)}return e.l=n.length,e.m=!0,e},function(n){return!g(n)||n}),i.not=D(T,c,"not "),i.maybe=D(T,e,"maybe "),u.forEach(function(n){r[n].of=P([W.bind(null,null),r[n],r,{},""])}),X(i,T),X(c,Q),u.forEach(function(n){e[n].of=P([W.bind(null,"maybe"),r[n],r,{},""]),i.maybe[n].of=D(T,e[n].of),i.not[n].of=D(T,c[n].of)}),h=H(n,{assert:i,not:c,maybe:e}),"function"==typeof define&&define.amd?define(function(){return h}):"undefined"!=typeof module&&null!==module&&module.exports?module.exports=h:M.check=h}(this); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
893
57306
5
981