Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

json-stream-stringify

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-stream-stringify - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

0

coStream.js

@@ -0,0 +0,0 @@ 'use strict';

5

jsonStreamify.js

@@ -45,3 +45,6 @@ 'use strict';

yield obj.value.pipe(new Transform({
transform: (data, enc, next) => next(null, JSON.stringify(data.toString()).slice(1, -1))
transform: (data, enc, next) => {
this.push(JSON.stringify(data.toString()).slice(1, -1));
next(null);
}
}));

@@ -48,0 +51,0 @@ yield this.push('"');

{
"name": "json-stream-stringify",
"version": "1.5.0",
"version": "1.5.1",
"description": "JSON.Stringify as a readable stream",

@@ -5,0 +5,0 @@ "repository": {

@@ -37,5 +37,5 @@ # JSON Stream Stringify

```javascript
const JSONStreamStreamify = require('json-stream-stringify');
const JSONStreamStringify = require('json-stream-stringify');
JSONStreamStreamify({
JSONStreamStringify({
aPromise: Promise.resolve(Promise.resolve("text")), // Promise may resolve more promises and streams which will be consumed and resolved

@@ -48,3 +48,3 @@ aStream: ReadableObjectStream({a:1}, 'str'), // Stream may write more streams and promises which will be consumed and resolved

```
Output (each line represents a write from JSONStreamStreamify)
Output (each line represents a write from JSONStreamStringify)
```

@@ -90,3 +90,3 @@ {

```javascript
app.get('/api/users', (req, res, next) => JSONStreamStreamify(Users.find().stream()).pipe(res));
app.get('/api/users', (req, res, next) => JSONStreamStringify(Users.find().stream()).pipe(res));
```

@@ -93,0 +93,0 @@

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

@@ -0,0 +0,0 @@ 'use strict';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc