| 1 |
# quote-stream |
| 2 |
|
| 3 |
transform a stream into a quoted string |
| 4 |
|
| 5 |
[](https://ci.testling.com/substack/quote-stream) |
| 6 |
|
| 7 |
[](http://travis-ci.org/substack/quote-stream) |
| 8 |
|
| 9 |
# example |
| 10 |
|
| 11 |
``` js |
| 12 |
var quote = require('quote-stream'); |
| 13 |
process.stdin.pipe(quote()).pipe(process.stdout); |
| 14 |
``` |
| 15 |
|
| 16 |
output: |
| 17 |
|
| 18 |
``` |
| 19 |
$ echo beep boop | node example/stream.js |
| 20 |
"beep boop\n" |
| 21 |
``` |
| 22 |
|
| 23 |
# methods |
| 24 |
|
| 25 |
``` js |
| 26 |
var quote = require('quote-stream') |
| 27 |
``` |
| 28 |
|
| 29 |
## var q = quote() |
| 30 |
|
| 31 |
Return a transform stream `q` that wraps input in double quotes and adds escape |
| 32 |
characters to the chunks. |
| 33 |
|
| 34 |
# usage |
| 35 |
|
| 36 |
``` |
| 37 |
usage: quote-stream |
| 38 |
|
| 39 |
Transform stdin to a quoted string on stdout. |
| 40 |
|
| 41 |
``` |
| 42 |
|
| 43 |
# install |
| 44 |
|
| 45 |
With [npm](https://npmjs.org) do: |
| 46 |
|
| 47 |
``` |
| 48 |
npm install quote-stream |
| 49 |
``` |
| 50 |
|
| 51 |
# license |
| 52 |
|
| 53 |
MIT |