Skip to content

Commit 848ed62

Browse files
committed
Update README.md
1 parent 20e5d01 commit 848ed62

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ Convert value to JSON string. Returns a readable stream.
3434

3535
## Example Usage
3636
```javascript
37-
const JSONStreamStreamify = require('json-stream-stringify');
37+
const JSONStreamStringify = require('json-stream-stringify');
3838

39-
JSONStreamStreamify({
39+
JSONStreamStringify({
4040
aPromise: Promise.resolve(Promise.resolve("text")), // Promise may resolve more promises and streams which will be consumed and resolved
4141
aStream: ReadableObjectStream({a:1}, 'str'), // Stream may write more streams and promises which will be consumed and resolved
4242
arr: [1, 2, Promise.resolve(3), Promise.resolve([4, 5]), ReadableStream('a', 'b', 'c')],
4343
date: new Date(2016, 0, 2)
4444
}).pipe(process.stdout);
4545

4646
```
47-
Output (each line represents a write from JSONStreamStreamify)
47+
Output (each line represents a write from JSONStreamStringify)
4848
```
4949
{
5050
"aPromise":
@@ -85,7 +85,7 @@ c
8585

8686
## Practical Example with Express + Mongoose
8787
```javascript
88-
app.get('/api/users', (req, res, next) => JSONStreamStreamify(Users.find().stream()).pipe(res));
88+
app.get('/api/users', (req, res, next) => JSONStreamStringify(Users.find().stream()).pipe(res));
8989
```
9090

9191
## TODO

0 commit comments

Comments
 (0)