Socket
Socket
Sign inDemoInstall

object-inspect

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-inspect - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

.editorconfig

11

index.js

@@ -12,2 +12,5 @@ var hasMap = typeof Map === 'function' && Map.prototype;

var inspectCustom = require('./util.inspect').custom;
var inspectSymbol = (inspectCustom && isSymbol(inspectCustom)) ? inspectCustom : null;
module.exports = function inspect_ (obj, opts, depth, seen) {

@@ -82,4 +85,8 @@ if (typeof obj === 'undefined') {

}
if (typeof obj === 'object' && typeof obj.inspect === 'function') {
return obj.inspect();
if (typeof obj === 'object') {
if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
return obj[inspectSymbol]();
} else if (typeof obj.inspect === 'function') {
return obj.inspect();
}
}

@@ -86,0 +93,0 @@ if (isMap(obj)) {

15

package.json
{
"name": "object-inspect",
"version": "1.3.0",
"version": "1.4.0",
"description": "string representations of objects in node and the browser",
"main": "index.js",
"devDependencies": {
"core-js": "^2.4.1",
"tape": "^4.7.0"
"core-js": "^2.5.1",
"nyc": "^10.3.2",
"tape": "^4.8.0"
},

@@ -13,3 +14,4 @@ "scripts": {

"pretests-only": "node test-core-js",
"tests-only": "tape test/*.js"
"tests-only": "tape test/*.js",
"coverage": "nyc npm run tests-only"
},

@@ -49,3 +51,6 @@ "testling": {

},
"license": "MIT"
"license": "MIT",
"browser": {
"./util.inspect.js": false
}
}

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