Comparing version 1.2.0 to 1.2.1
@@ -29,3 +29,3 @@ // Load modules | ||
indent: 4, | ||
align: 'right', | ||
align: 'left', | ||
arrayIndex: true, | ||
@@ -32,0 +32,0 @@ pathPrefix: '// ' |
{ | ||
"name": "purdy", | ||
"version": "1.2.0", | ||
"version": "1.2.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.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,3 +25,3 @@ # Purdy | ||
* `indent` - defines the number of spaces to indent default: `4` | ||
* `align` - determines how to align object keys. default: `right` | ||
* `align` - determines how to align object keys. default: `left` | ||
@@ -28,0 +28,0 @@ |
@@ -146,3 +146,3 @@ var Hoek = require('hoek'); | ||
object: { another: 'string' } | ||
}); | ||
}, { align: 'right' }); | ||
@@ -177,4 +177,3 @@ expect(out).to.equal('{\n \u001b[1m\u001b[37m array\u001b[39m\u001b[22m: [\n [\u001b[1m\u001b[37m0\u001b[39m\u001b[22m] \u001b[1m\u001b[34m1\u001b[39m\u001b[22m,\n [\u001b[1m\u001b[37m1\u001b[39m\u001b[22m] \u001b[1m\u001b[34m2\u001b[39m\u001b[22m,\n [\u001b[1m\u001b[37m2\u001b[39m\u001b[22m] [\n [\u001b[1m\u001b[37m0\u001b[39m\u001b[22m] \u001b[1m\u001b[34m1\u001b[39m\u001b[22m,\n [\u001b[1m\u001b[37m1\u001b[39m\u001b[22m] \u001b[1m\u001b[34m2\u001b[39m\u001b[22m\n ]\n ],\n \u001b[1m\u001b[37mobject\u001b[39m\u001b[22m: {\n \u001b[1m\u001b[37manother\u001b[39m\u001b[22m: \u001b[33m\'string\'\u001b[39m\n }\n}'); | ||
obj.top = obj; | ||
Purdy.stringify(obj); | ||
var out = Purdy.stringify(obj, { plain: true }); | ||
var out = Purdy.stringify(obj, { plain: true, align: 'right' }); | ||
expect(out).to.equal("{\n a: {\n nested: {\n text: 'repeating object'\n }\n },\n b: {\n alsoNested: [Circular~ a.nested]\n },\n more: [\n [0] [\n [0] 'repeating array'\n ]\n ],\n array: [\n [0] [Circular~ more.0]\n ],\n top: [Circular~]\n}"); | ||
@@ -197,4 +196,3 @@ done(); | ||
var out = Purdy.stringify(obj, { plain: false, path: true }); | ||
var out = Purdy.stringify(obj, { plain: false, path: true, align: 'right' }); | ||
expect(out).to.equal('{\n \u001b[1m\u001b[37mtravel\u001b[39m\u001b[22m: {\n \u001b[34m// \u001b[39m\u001b[34mtravel.down\u001b[39m\n \u001b[1m\u001b[37mdown\u001b[39m\u001b[22m: {\n \u001b[34m// \u001b[39m\u001b[34mtravel.down.a\u001b[39m\n \u001b[1m\u001b[37m a\u001b[39m\u001b[22m: [\n \u001b[34m// \u001b[39m\u001b[34mtravel.down.a.0\u001b[39m\n [\u001b[1m\u001b[37m0\u001b[39m\u001b[22m] {\n \u001b[34m// \u001b[39m\u001b[34mtravel.down.a.0.path\u001b[39m\n \u001b[1m\u001b[37mpath\u001b[39m\u001b[22m: \u001b[33m\'to get here\'\u001b[39m\n }\n ]\n }\n }\n}'); | ||
@@ -201,0 +199,0 @@ expect(obj).to.deep.equal(orig); |
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
19201
355