Comparing version 3.1.0 to 3.1.1
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
module.exports = require('./lib'); |
@@ -120,3 +120,3 @@ 'use strict'; | ||
return '<Buffer ' + buffer.slice(0,25).toString('utf8') + ' ... >'; | ||
return '<Buffer ' + buffer.slice(0, 25).toString('utf8') + ' ... >'; | ||
}; | ||
@@ -176,3 +176,3 @@ | ||
this.indentLevel = this.indentLevel - 1; | ||
return this.colorize('[Object]', 'depth'); | ||
return this.colorize('[Object]', 'depth'); | ||
} | ||
@@ -228,3 +228,3 @@ if (i !== keys.length - 1) { | ||
this.indentLevel = this.indentLevel - 1; | ||
return this.colorize('[Object]', 'depth'); | ||
return this.colorize('[Object]', 'depth'); | ||
} | ||
@@ -252,3 +252,3 @@ if (i !== array.length - 1) { | ||
this.settings.plain = plain; | ||
return obj.replace(/^{/, '{ ' + this.colorize(stack, 'error') ); | ||
return obj.replace(/^{/, '{ ' + this.colorize(stack, 'error')); | ||
}; | ||
@@ -262,3 +262,3 @@ | ||
const firstLine = stackArr.shift(); | ||
stackArr = stackArr.map(function (line) { | ||
stackArr = stackArr.map((line) => { | ||
@@ -303,3 +303,3 @@ return spaces + line; | ||
const props = this.Object(obj, '', null); | ||
return props.replace(/^{/, '{ ' + this.colorize('[Function' + name + ']', 'function') ); | ||
return props.replace(/^{/, '{ ' + this.colorize('[Function' + name + ']', 'function')); | ||
}; | ||
@@ -306,0 +306,0 @@ |
{ | ||
"name": "purdy", | ||
"version": "3.1.0", | ||
"version": "3.1.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.", | ||
@@ -29,12 +29,12 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"code": "1.x.x", | ||
"lab": "6.x.x" | ||
"code": "^4.1.0", | ||
"lab": "^14.3.4" | ||
}, | ||
"dependencies": { | ||
"bossy": "^3.0.4", | ||
"chalk": "0.4.x", | ||
"hoek": "2.x.x", | ||
"joi": "6.x.x", | ||
"moment": "^2.19.3" | ||
"chalk": "^2.4.1", | ||
"hoek": "^4.2.1", | ||
"joi": "^12.0.0", | ||
"moment": "^2.22.2" | ||
} | ||
} |
@@ -17,3 +17,3 @@ 'use strict'; | ||
const funcName = function () {}; | ||
const funcName = function () { }; | ||
const funcNameInfer = funcName.name === 'funcName'; | ||
@@ -69,3 +69,3 @@ | ||
const buffer = new Buffer('some longer string here that we dont actually want to print. maybe.'); | ||
const buffer = new Buffer.from('some longer string here that we dont actually want to print. maybe.'); | ||
const out = Purdy.stringify({ buffer }); | ||
@@ -82,2 +82,3 @@ expect(out).to.match(/<Buffer some longer string here t ... >/); | ||
err = null; | ||
const out = Purdy.stringify({ data }); | ||
@@ -139,3 +140,3 @@ expect(out).to.match(/data.*Buffer/); | ||
const circularObj = { }; | ||
const circularObj = {}; | ||
circularObj.a = circularObj; | ||
@@ -155,3 +156,3 @@ const circ = []; | ||
const mises = function mises () { | ||
const mises = function mises() { | ||
@@ -189,3 +190,3 @@ this.moop = 3; | ||
const out = Purdy.stringify(() => {}); | ||
const out = Purdy.stringify(() => { }); | ||
const expected = '\u001b[36m[Function]\u001b[39m'; | ||
@@ -198,3 +199,3 @@ expect(out).to.equal(expected); | ||
const obj = function () {}; | ||
const obj = function () { }; | ||
@@ -212,3 +213,3 @@ obj.property = 3; | ||
const obj = function Liberty () {}; | ||
const obj = function Liberty() { }; | ||
@@ -349,3 +350,3 @@ obj.property = 3; | ||
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}'); | ||
expect(obj).to.deep.equal(orig); | ||
expect(obj).to.equal(orig); | ||
done(); | ||
@@ -541,2 +542,1 @@ }); | ||
}); | ||
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
357109
12
771
3
+ Added@hapi/address@1.0.1(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedjoi@12.1.1(transitive)
+ Addedsupports-color@5.5.0(transitive)
- Removedansi-styles@1.0.0(transitive)
- Removedchalk@0.4.0(transitive)
- Removedhas-color@0.1.7(transitive)
- Removedhoek@2.16.3(transitive)
- Removedisemail@1.2.0(transitive)
- Removedjoi@6.10.1(transitive)
- Removedstrip-ansi@0.1.1(transitive)
- Removedtopo@1.1.0(transitive)
Updatedchalk@^2.4.1
Updatedhoek@^4.2.1
Updatedjoi@^12.0.0
Updatedmoment@^2.22.2