UNPKG
quote-stream
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
0.0.0
transform a stream into a quoted string
github.com/substack/quote-stream
substack/quote-stream
quote-stream
/
test
/
simple.js
14 lines
(11 loc)
•
283 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var
quote =
require
(
'../'
);
var
concat =
require
(
'concat-stream'
);
var
test =
require
(
'tape'
);
test
(
'simple'
,
function
(
t
) { t.
plan
(
1
);
var
q =
quote
(); q.
end
(
'abc'
); q.
pipe
(
concat
(
function
(
body
) { t.
equal
(body.
toString
(
'utf8'
),
'"abc"'
); })); });