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

json-colorz

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-colorz - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

24

lib/engine.js

@@ -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",

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