stream-json
Advanced tools
Comparing version 1.2.1 to 1.3.0
{ | ||
"name": "stream-json", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"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", |
@@ -81,3 +81,3 @@ 'use strict'; | ||
_transform(chunk, encoding, callback) { | ||
_transform(chunk, _, callback) { | ||
this._buffer += chunk.toString(); | ||
@@ -84,0 +84,0 @@ this._processInput(callback); |
@@ -46,2 +46,3 @@ # stream-json | ||
* [withParser()](https://github.com/uhop/stream-json/wiki/withParser()) helps to create stream components with a parser. | ||
* [Batch](https://github.com/uhop/stream-json/wiki/Batch) batches items into arrays to simplify their processing. | ||
* [Verifier](https://github.com/uhop/stream-json/wiki/Verifier) reads a stream and verifies that it is a valid JSON. | ||
@@ -89,3 +90,4 @@ | ||
* [stream-csv-as-json](https://www.npmjs.com/package/stream-csv-as-json) streams huge CSV files in a format compatible with `stream-json`: rows as arrays of string values. If a header row is used, it can stream rows as objects with named fields. | ||
* [stream-csv-as-json](https://www.npmjs.com/package/stream-csv-as-json) streams huge CSV files in a format compatible with `stream-json`: | ||
rows as arrays of string values. If a header row is used, it can stream rows as objects with named fields. | ||
@@ -101,10 +103,15 @@ ## Installation | ||
The whole library is organized as a set of small components, which can be combined to produce the most effective pipeline. All components are based on node.js [streams](http://nodejs.org/api/stream.html), and [events](http://nodejs.org/api/events.html). They implement all required standard APIs. It is easy to add your own components to solve your unique tasks. | ||
The whole library is organized as a set of small components, which can be combined to produce the most effective pipeline. All components are based on node.js | ||
[streams](http://nodejs.org/api/stream.html), and [events](http://nodejs.org/api/events.html). They implement all required standard APIs. It is easy to add your | ||
own components to solve your unique tasks. | ||
The code of all components is compact and simple. Please take a look at their source code to see how things are implemented, so you can produce your own components in no time. | ||
The code of all components is compact and simple. Please take a look at their source code to see how things are implemented, so you can produce your own components | ||
in no time. | ||
Obviously, if a bug is found, or a way to simplify existing components, or new generic components are created, which can be reused in a variety of projects, don't hesitate to open a ticket, and/or create a pull request. | ||
Obviously, if a bug is found, or a way to simplify existing components, or new generic components are created, which can be reused in a variety of projects, | ||
don't hesitate to open a ticket, and/or create a pull request. | ||
## Release History | ||
- 1.3.0 *added `Batch`, a bugfix in `Verifier`.* | ||
- 1.2.1 *the technical release.* | ||
@@ -111,0 +118,0 @@ - 1.2.0 *added `Verifier`.* |
@@ -22,3 +22,4 @@ 'use strict'; | ||
require('./test_verifier'); | ||
require('./test_batch'); | ||
unit.run(); |
@@ -106,4 +106,3 @@ 'use strict'; | ||
if (!match) { | ||
if (index < this._buffer.length && this._done) return callback(this._makeError('Verifier cannot parse input: expected a value')); | ||
if (this._done) return callback(this._makeError('Verifier has expected a value')); | ||
if (index < this._buffer.length || this._done) return callback(this._makeError('Verifier cannot parse input: expected a value')); | ||
break main; // wait for more input | ||
@@ -110,0 +109,0 @@ } |
Sorry, the diff of this file is not supported yet
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
208659
48
4216
155
239