json-stream-stringify
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -84,2 +84,4 @@ 'use strict'; | ||
module.exports = JSONStreamify; | ||
module.exports = function (obj) { | ||
return new JSONStreamify(obj); | ||
}; |
{ | ||
"name": "json-stream-stringify", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "JSON.Stringify as a readable stream", | ||
@@ -12,2 +12,3 @@ "repository": { | ||
"devDependencies": { | ||
"coveralls": "2.11.9", | ||
"istanbul": "0.4.3", | ||
@@ -14,0 +15,0 @@ "expect.js": "0.3.1", |
@@ -24,3 +24,3 @@ # JSON Stream Stringify | ||
new JSONStreamify({ | ||
JSONStreamify({ | ||
aPromise: Promise.resolve(Promise.resolve("text")), // Promise may resolve more promises and streams which will be consumed and resolved | ||
@@ -72,2 +72,7 @@ aStream: ReadableObjectStream({a:1}, 'str'), // Stream may write more streams and promises which will be consumed and resolved | ||
## Practical Express + Mongoose Example | ||
```javascript | ||
app.get('/api/users', (req, res, next) => JSONStreamify(Users.find().stream()).pipe(res)); | ||
``` | ||
## TODO | ||
@@ -74,0 +79,0 @@ - Space option |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16889
284
108
4