Comparing version 1.6.0 to 1.6.1
@@ -109,3 +109,9 @@ // Load modules | ||
if (Object.keys(object).length === 0) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
keys = keys.concat(Object.getOwnPropertySymbols(object)); | ||
} | ||
if (keys.length === 0) { | ||
return '{}'; | ||
@@ -121,6 +127,2 @@ } | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
keys = keys.concat(Object.getOwnPropertySymbols(object)); | ||
} | ||
var keyLengths = Hoek.clone(keys); | ||
@@ -127,0 +129,0 @@ internals.indentLevel = internals.indentLevel + 1; |
{ | ||
"name": "purdy", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "pretty print objects in real purdy colors. Allows clearer visualization of objects than you get from most pretty printers due to colors. It will also print out the complete path to an object, something that's extremly useful for debugging. Purdy will also print out the path to access a variable using Hoek format making it useful on accessing values.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -291,3 +291,16 @@ var Code = require('code'); | ||
}); | ||
it('prints only symbols', { skip: Object.getOwnPropertySymbols === undefined }, function (done) { | ||
var blah = Symbol('blah'); | ||
var obj = {}; | ||
obj[blah] = 'symbol'; | ||
var out = Purdy.stringify(obj, { arrayIndex: false, plain: true }); | ||
expect(out).to.equal('{\n Symbol(blah): \'symbol\'\n}'); | ||
done(); | ||
}); | ||
}); | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
466
108304