json-colorz
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -7,11 +7,23 @@ var colorz = require('colorz') | ||
function kindOf (value) { | ||
return typeof value === 'object' | ||
? Object.prototype.toString.call(value) | ||
.replace(/^\[object |\]$/g, '') | ||
.toLowerCase() | ||
: typeof value | ||
if (value === null) return 'null' | ||
if (value === undefined) return 'undefined' | ||
if (Array.isArray(value)) return 'array' | ||
if (typeof value === 'string') return 'string' | ||
if (typeof value === 'boolean') return 'boolean' | ||
if (typeof value === 'number') return 'number' | ||
if (typeof value === 'function') return 'function' | ||
var type = value.constructor.name | ||
if (type === 'Object') return 'object' | ||
if (type === 'RegExp') return 'regexp' | ||
if (type === 'Date') return 'date' | ||
return type.toLowerCase() | ||
} | ||
function isObject (obj) { | ||
return Object.prototype.toString.call(obj) === '[object Object]' | ||
return obj.constructor.name === 'Object' | ||
} | ||
@@ -18,0 +30,0 @@ |
{ | ||
"name": "json-colorz", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "display a json or javascript object in the console with colorz", | ||
@@ -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
16618
244