is-valid-instance
Advanced tools
Comparing version 0.2.0 to 0.3.0
17
index.js
/*! | ||
* is-valid-instance (https://github.com/jonschlinkert/is-valid-instance) | ||
* is-valid-instance <https://github.com/jonschlinkert/is-valid-instance> | ||
* | ||
* Copyright (c) 2016, Jon Schlinkert. | ||
* Licensed under the MIT License. | ||
* Copyright (c) 2016-2017, Jon Schlinkert. | ||
* Released under the MIT License. | ||
*/ | ||
@@ -12,2 +12,3 @@ | ||
var pascal = require('pascalcase'); | ||
var nameCache = {}; | ||
@@ -92,3 +93,6 @@ /** | ||
function isType(val, type, name) { | ||
return val[isName(type)] === true || val._name === type || name === type; | ||
return val.type === type | ||
|| val._name === type | ||
|| name === type | ||
|| val[isName(type)] === true; | ||
} | ||
@@ -98,3 +102,6 @@ | ||
if (!type) return; | ||
return 'is' + pascal(type.toString()); | ||
if (nameCache[type]) return nameCache[type]; | ||
var name = 'is' + pascal(type.toString()); | ||
nameCache[name] = name; | ||
return name; | ||
} | ||
@@ -101,0 +108,0 @@ |
{ | ||
"name": "is-valid-instance", | ||
"description": "Returns true if a value is a valid instance of Base.", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/jonschlinkert/is-valid-instance", | ||
@@ -13,4 +13,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"files": [ | ||
"index.js", | ||
"utils.js" | ||
"index.js" | ||
], | ||
@@ -25,3 +24,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"isobject": "^2.1.0", | ||
"isobject": "^3.0.0", | ||
"pascalcase": "^0.1.1" | ||
@@ -31,6 +30,6 @@ }, | ||
"base": "^0.11.1", | ||
"gulp-format-md": "^0.1.9", | ||
"mocha": "^2.5.3", | ||
"templates": "^0.22.5", | ||
"vinyl": "^1.1.1" | ||
"gulp-format-md": "^0.1.11", | ||
"mocha": "^3.2.0", | ||
"templates": "^1.2.8", | ||
"vinyl": "^2.0.1" | ||
}, | ||
@@ -41,2 +40,3 @@ "keywords": [ | ||
"instance", | ||
"is", | ||
"valid" | ||
@@ -52,9 +52,10 @@ ], | ||
"base", | ||
"base-app" | ||
"base-app", | ||
"base-plugins" | ||
] | ||
}, | ||
"reflinks": [ | ||
"verb", | ||
"base", | ||
"templates", | ||
"verb", | ||
"verb-readme-generator" | ||
@@ -61,0 +62,0 @@ ] |
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
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
9507
4
95
0
131
+ Addedisobject@3.0.1(transitive)
- Removedisarray@1.0.0(transitive)
- Removedisobject@2.1.0(transitive)
Updatedisobject@^3.0.0