New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stream-json

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-json - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

2

package.json
{
"name": "stream-json",
"version": "1.4.0",
"version": "1.4.1",
"description": "stream-json is the micro-library of Node.js stream components for creating custom JSON processing pipelines with a minimal memory footprint. It can parse JSON files far exceeding available memory streaming individual primitives using a SAX-inspired API. Includes utilities to stream JSON database dumps.",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/uhop/stream-json",

@@ -113,2 +113,3 @@ # stream-json

- 1.4.1 *Bugfix: `Stringer` with `makeArray` should produce empty array if no input.*
- 1.4.0 *added `makeArray` functionality to `Stringer`. Thx all who asked for it!*

@@ -115,0 +116,0 @@ - 1.3.3 *Bugfix: very large/infinite streams with garbage didn't fail. Thx [Arne Marschall](https://github.com/Disco1267)!*

@@ -75,2 +75,6 @@ 'use strict';

_arrayFlush(callback) {
if (this._transform === this._arrayTransform) {
delete this._transform;
this._transform({name: 'startArray'}, null, doNothing);
}
this._transform({name: 'endArray'}, null, callback);

@@ -77,0 +81,0 @@ }

@@ -170,2 +170,19 @@ 'use strict';

},
function test_stringer_no_input_as_array(t) {
const async = t.startAsync('test_stringer_no_input_as_array');
const parser = makeParser({jsonStreaming: true}),
stringer = new Stringer({makeArray: true});
let buffer = '';
parser.pipe(stringer);
stringer.on('data', data => (buffer += data));
stringer.on('end', () => {
eval(t.TEST('buffer === "[]"'));
async.done();
});
new ReadString('').pipe(parser);
},
function test_stringer_json_stream_primitives(t) {

@@ -172,0 +189,0 @@ const async = t.startAsync('test_stringer_json_stream_primitives');

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