Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

types.js

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

types.js - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

test/SpecRunner.html

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc