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

object-inspect

Package Overview
Dependencies
Maintainers
1
Versions
38
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.0.0 to 1.0.1

5

index.js

@@ -34,2 +34,6 @@ module.exports = function inspect_ (obj, opts, depth, seen) {

}
else if (isSymbol(obj)) {
var symString = Symbol.prototype.toString.call(obj);
return typeof obj === 'object' ? 'Object(' + symString + ')' : symString;
}
else if (isElement(obj)) {

@@ -99,2 +103,3 @@ var s = '<' + String(obj.nodeName).toLowerCase();

function isError (obj) { return toStr(obj) === '[object Error]' }
function isSymbol (obj) { return toStr(obj) === '[object Symbol]' }

@@ -101,0 +106,0 @@ function has (obj, key) {

4

package.json
{
"name": "object-inspect",
"version": "1.0.0",
"version": "1.0.1",
"description": "string representations of objects in node and the browser",
"main": "index.js",
"devDependencies": {
"tape": "^2.13.3"
"tape": "^2.14.0"
},

@@ -9,0 +9,0 @@ "scripts": {

@@ -57,1 +57,8 @@ var inspect = require('../');

});
test('symbols', { skip: typeof Symbol !== 'function' }, function (t) {
var sym = Symbol('foo');
t.equal(inspect(sym), 'Symbol(foo)', 'Symbol("foo") should be "Symbol(foo)"');
t.equal(inspect(Object(sym)), 'Object(Symbol(foo))', 'Object(Symbol("foo")) should be "Object(Symbol(foo))"');
t.end();
});
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