bevry/cson — pull request #46 by Zearin (2014-07-08 18:36:03+00:00)
Title: Fix #8: Allow standard input

The tools under `bin/` now accept input from STDIN.

* Input can be piped in (`cat file.cson | cson2json -`)
* Input can be redirected (`cson2json - < file.cson`)

There are a few caveats:

* **There are no tests for the executables.**

(I tried, but couldn’t. I’m sure it’s be easy, but I’m continuing to learn Node, and it has a myriad of test frameworks.)

* **Executables only read from STDIN when passing `-` as the only argument.**

* **If `-` is passed without actually piping (or redirecting) anything**, the program waits for input until it receives CTL+D.

(I’d like to fix this in the future. For now, at least it’s consistent with the behavior of `cat - `. Hitting will tell the program to stop waiting.)