[Pkg-javascript-commits] [node-jsonstream] 177/214: use var explicitly, and enable strict mode to prevent leaking variables
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 1 12:58:57 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-jsonstream.
commit 1cb4c897cbb4500c137157674f2c2577f54f9b46
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date: Thu Nov 19 15:29:26 2015 +1300
use var explicitly, and enable strict mode to prevent leaking variables
---
index.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/index.js b/index.js
index 6d29224..a9de1b3 100755
--- a/index.js
+++ b/index.js
@@ -1,5 +1,7 @@
#! /usr/bin/env node
+'use strict'
+
var Parser = require('jsonparse')
, through = require('through')
@@ -175,10 +177,9 @@ exports.stringifyObject = function (op, sep, cl, indent) {
//else, what ever you like
- var stream
- , first = true
- , anyData = false
- stream = through(function (data) {
+ var first = true
+ var anyData = false
+ var stream = through(function (data) {
anyData = true
var json = JSON.stringify(data[0]) + ':' + JSON.stringify(data[1], null, indent)
if(first) { first = false ; this.queue(op + json)}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-jsonstream.git
More information about the Pkg-javascript-commits
mailing list