Skip to content

Commit

Permalink
Corrected formatting and added comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgpelletier committed Nov 13, 2014
1 parent bf5e9ab commit 73ab938
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion json.js
@@ -1,7 +1,8 @@
var printer = require('./printer')
var formatter = require('./formatter') // <- new change
var extend = require('./extend')// <-THIS IS IN PROOF and JSON
// ^^^ this is also module.exports


// 'exports collects properties and attaches them to module.exports if module.exports
// doesn't have something on it already. If there is something attached to module.-
// exports already, everything in exports is ignored.'
Expand Down Expand Up @@ -46,6 +47,8 @@ module.exports = function (out) { // <- takes a stream
})
break
case 'eof':
//var format = formatter(out.write)
//format(object)
// vv this needs to change
console.log(object)
out.write(JSON.stringify(object, null, 2)) // how does this make it to chunks?
Expand Down
2 changes: 1 addition & 1 deletion printer.js
@@ -1,5 +1,5 @@
module.exports = function (func, stream) {
return function(arg) {
stream.write(func(arg))
stream.write(func(arg))
}
}
2 changes: 1 addition & 1 deletion proof.js
Expand Up @@ -17,7 +17,7 @@ var jsonRedux = require('./json')// <- do you want this named something else?
// Moved exports.json to its own file.
function json () {
process.stdin.resume()
parse(process.stdin, jsonRedux(process.stdout))
parse(process.stdin, jsonRedux(process.stdout)) // <- change needed here
}

var colorization = require('./colorization')
Expand Down

0 comments on commit 73ab938

Please sign in to comment.