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 0.1.0 to 0.1.1

.travis.yml

23

index.js

@@ -25,3 +25,4 @@ module.exports = function inspect_ (obj, opts, depth, seen) {

else if (typeof obj === 'function') {
return '[Function' + (obj.name ? ': ' + obj.name : '') + ']';
var name = nameOf(obj);
return '[Function' + (name ? ': ' + name : '') + ']';
}

@@ -49,8 +50,7 @@ else if (typeof HTMLElement !== 'undefined' && obj instanceof HTMLElement) {

for (var key in obj) {
if ({}.hasOwnProperty.call(obj, key)) {
if (/[^\w$]/.test(key)) {
xs.push(inspect(key) + ': ' + inspect(obj[key], obj));
}
else xs.push(key + ': ' + inspect(obj[key], obj));
if (!has(obj, key)) continue;
if (/[^\w$]/.test(key)) {
xs.push(inspect(key) + ': ' + inspect(obj[key], obj));
}
else xs.push(key + ': ' + inspect(obj[key], obj));
}

@@ -77,1 +77,12 @@ return '{ ' + xs.join(', ') + ' }';

}
function has (obj, key) {
if (!{}.hasOwnProperty) return true;
return {}.hasOwnProperty.call(obj, key);
}
function nameOf (f) {
if (f.name) return f.name;
var m = f.toString().match(/^function\s*([\w$]+)/);
if (m) return m[1];
}
{
"name": "object-inspect",
"version": "0.1.0",
"version": "0.1.1",
"description": "string representations of objects in node and the browser",
"main": "index.js",
"dependencies": {
"tape": "~1.0.4"
},
"scripts": {
"test": "tape test/*.js"
},
"testling": {
"files": [ "test/*.js", "test/browser/*.js" ],
"browsers": [
"ie/6..latest",
"chrome/latest",
"firefox/latest",
"safari/latest",
"opera/latest",
"iphone/latest",
"ipad/latest",
"android/latest"
]
},
"repository": {

@@ -7,0 +26,0 @@ "type": "git",

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