Comparing version 0.0.1 to 0.0.2
16
index.js
@@ -9,4 +9,4 @@ /* | ||
const toString = Object.prototype.toString | ||
const kinds = [ | ||
var toString = Object.prototype.toString | ||
var kinds = [ | ||
'String', | ||
@@ -23,12 +23,12 @@ 'Boolean', | ||
let kindof = module.exports = {} | ||
var kindof = module.exports = {} | ||
let f = (t) => { } | ||
kinds.forEach(k => { | ||
kindof[`is${k}`] = (i) => toString.call(i) === `[object ${k}]` | ||
kinds.forEach(function (k) { | ||
kindof['is' + k] = function (i) { | ||
return toString.call(i) === '[object ' + k + ']' | ||
} | ||
}) | ||
kindof.isNumber = (i) => { | ||
kindof.isNumber = function (i) { | ||
return isNaN(i) ? false : toString.call(i) === '[object Number]' | ||
} |
{ | ||
"name": "iskindof", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "iskindof type in JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
5281
146