Comparing version 1.2.2 to 1.2.3
{ | ||
"name": "types.js", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "A tiny Javascript type-check library", | ||
@@ -5,0 +5,0 @@ "main": "types.min.js", |
@@ -94,3 +94,3 @@ // Generated by CoffeeScript 1.8.0 | ||
'Array': function(value) { | ||
return (typeof value === 'object') && (value instanceof Array); | ||
return value instanceof Array; | ||
}, | ||
@@ -104,3 +104,3 @@ 'RegExp': function(value) { | ||
'Object': function(value) { | ||
return (typeof value === 'object') && !(value instanceof Array) && !(value instanceof RegExp) && !(value === null); | ||
return (typeof value === 'object') && !(value instanceof Array) && !(value instanceof RegExp) && !(value instanceof Date) && !(value === null); | ||
}, | ||
@@ -107,0 +107,0 @@ 'NaN': function(value) { |
@@ -1,1 +0,1 @@ | ||
(function(){"use strict";var n,r,t,e,u,i;n={parseIntBase:10};e={Boolean:false,String:"",Number:0,Object:{},Array:[],Function:function(){}};t=function(r){var t;t=function(t){switch(r){case"Number":if(n.notNaN(t=parseInt(t,n.parseIntBase))){return t}break;case"String":if(n.isStringOrNumber(t)){return t+""}break;default:if(n["typeof"](t)===r.toLowerCase()){return t}}return false};return function(u,i){if(i==null){i=u}if(n["is"+r](u)){return u}if(false!==(i=t(i))){return i}return e[r]}};u=function(n,r,t){var e,u,o;if(t==null){t=[]}if(t.length<1){if(n===i.Undefined){return true}return false}for(u=0,o=t.length;u<o;u++){e=t[u];if(n(e)===r){return r}}return!r};i={Undefined:function(n){return n===void 0},Null:function(n){return n===null},Boolean:function(n){return typeof n==="boolean"},String:function(n){return typeof n==="string"},Function:function(n){return typeof n==="function"},Number:function(n){return typeof n==="number"&&n===n},Array:function(n){return typeof n==="object"&&n instanceof Array},RegExp:function(n){return n instanceof RegExp},Date:function(n){return n instanceof Date},Object:function(n){return typeof n==="object"&&!(n instanceof Array)&&!(n instanceof RegExp)&&!(n===null)},NaN:function(n){return typeof n==="number"&&n!==n}};i.StringOrNumber=function(n){return i["String"](n)||i["Number"](n)};r=true;(function(){var o,f,a;a=[];for(o in i){f=i[o];a.push(function(i,o){n["is"+i]=o;n["not"+i]=function(n){return!o(n)};n["has"+i]=function(){return u(o,r,arguments)};n["all"+i]=function(){return u(o,!r,arguments)};if(i in e){return n["force"+i]=t(i)}}(o,f))}return a})();n["typeof"]=function(n){var r,t;for(t in i){r=i[t];if(r(n)===true){return t.toLowerCase()}}return"unknown"};if(typeof window!=="undefined"&&window!==null){window.Types=n}else if(module){module.exports=n}}).call(this); | ||
(function(){"use strict";var n,r,t,e,u,i;n={parseIntBase:10};e={Boolean:false,String:"",Number:0,Object:{},Array:[],Function:function(){}};t=function(r){var t;t=function(t){switch(r){case"Number":if(n.notNaN(t=parseInt(t,n.parseIntBase))){return t}break;case"String":if(n.isStringOrNumber(t)){return t+""}break;default:if(n["typeof"](t)===r.toLowerCase()){return t}}return false};return function(u,i){if(i==null){i=u}if(n["is"+r](u)){return u}if(false!==(i=t(i))){return i}return e[r]}};u=function(n,r,t){var e,u,o;if(t==null){t=[]}if(t.length<1){if(n===i.Undefined){return true}return false}for(u=0,o=t.length;u<o;u++){e=t[u];if(n(e)===r){return r}}return!r};i={Undefined:function(n){return n===void 0},Null:function(n){return n===null},Boolean:function(n){return typeof n==="boolean"},String:function(n){return typeof n==="string"},Function:function(n){return typeof n==="function"},Number:function(n){return typeof n==="number"&&n===n},Array:function(n){return n instanceof Array},RegExp:function(n){return n instanceof RegExp},Date:function(n){return n instanceof Date},Object:function(n){return typeof n==="object"&&!(n instanceof Array)&&!(n instanceof RegExp)&&!(n instanceof Date)&&!(n===null)},NaN:function(n){return typeof n==="number"&&n!==n}};i.StringOrNumber=function(n){return i["String"](n)||i["Number"](n)};r=true;(function(){var o,f,a;a=[];for(o in i){f=i[o];a.push(function(i,o){n["is"+i]=o;n["not"+i]=function(n){return!o(n)};n["has"+i]=function(){return u(o,r,arguments)};n["all"+i]=function(){return u(o,!r,arguments)};if(i in e){return n["force"+i]=t(i)}}(o,f))}return a})();n["typeof"]=function(n){var r,t;for(t in i){r=i[t];if(r(n)===true){return t.toLowerCase()}}return"unknown"};if(typeof window!=="undefined"&&window!==null){window.Types=n}else if(module){module.exports=n}}).call(this); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
132326
10
1842
1