Comparing version 2.2.1 to 2.3.0
11
index.js
@@ -154,5 +154,10 @@ /* ! | ||
// If it is a class, inspect it like an object but add the constructor name | ||
if ('constructor' in value && value.constructor !== Object) { | ||
return inspectClass(value, options) | ||
if ('constructor' in value) { | ||
// If it is a class, inspect it like an object but add the constructor name | ||
if (value.constructor !== Object) { | ||
return inspectClass(value, options) | ||
} | ||
// If it is an object with an anonymous prototype, display it as an object. | ||
return inspectObject(value, options) | ||
} | ||
@@ -159,0 +164,0 @@ |
11
loupe.js
@@ -1180,7 +1180,12 @@ (function (global, factory) { | ||
return inspectHTML(value, options); | ||
} // If it is a class, inspect it like an object but add the constructor name | ||
} | ||
if ('constructor' in value) { | ||
// If it is a class, inspect it like an object but add the constructor name | ||
if (value.constructor !== Object) { | ||
return inspectClass(value, options); | ||
} // If it is an object with an anonymous prototype, display it as an object. | ||
if ('constructor' in value && value.constructor !== Object) { | ||
return inspectClass(value, options); | ||
return inspectObject(value, options); | ||
} // We have run out of options! Just stringify the value | ||
@@ -1187,0 +1192,0 @@ |
{ | ||
"name": "loupe", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "Inspect utility for Node.js and browsers", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/chaijs/loupe", |
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
70355
1663