Socket
Socket
Sign inDemoInstall

prettyjson

Package Overview
Dependencies
1
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.1 to 0.4.0

test/prettyjson_spec.js

5

History.md

@@ -0,1 +1,6 @@

### 0.4.0 — *February 24, 2012*
* Now prettyjson uses Mocha test framework instead of jasmine-node
* Fixed leak in a "key" variable
### 0.3.1 — *February 15, 2012*

@@ -2,0 +7,0 @@

5

lib/prettyjson.js

@@ -106,6 +106,7 @@ // Package for formatting JSON data in a coloured

var maxIndexLength = Utils.getMaxIndexLength(data);
var key;
for(var i in data) {
// Prepend the index at the beginning of the line
var key = Utils.indent(indentation) + (i + ': ')[options.keysColor];
key = Utils.indent(indentation) + (i + ': ')[options.keysColor];

@@ -112,0 +113,0 @@ // If the value is serializable, render it in the same line

2

lib/utils.js

@@ -14,2 +14,4 @@

var maxWidth = 0;
var key;
for (key in input) {

@@ -16,0 +18,0 @@ if (key.length > maxWidth) {

@@ -5,3 +5,3 @@ {

"description": "Package for formatting JSON data in a coloured YAML-style, perfect for CLI output",
"version": "0.3.1",
"version": "0.4.0",
"homepage": "http://rafeca.com/prettyjson",

@@ -20,3 +20,3 @@ "keywords": [

"scripts": {
"test": "./node_modules/jasmine-node/bin/jasmine-node spec"
"test": "./node_modules/mocha/bin/mocha"
},

@@ -33,6 +33,7 @@ "bin": {

"devDependencies": {
"jasmine-node": "1.0.x",
"releasetools": "0.1.x",
"step": "0.0.x"
"step": "0.0.x",
"mocha": "~0.12.0",
"should": "~0.5.1"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc