Socket
Socket
Sign inDemoInstall

stream-transform

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-transform - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

47

lib/index.js

@@ -1,4 +0,4 @@

// Generated by CoffeeScript 1.8.0
// Generated by CoffeeScript 1.9.2
var Transformer, stream, util,
__slice = [].slice;
slice = [].slice;

@@ -10,5 +10,5 @@ stream = require('stream');

module.exports = function() {
var argument, callback, data, error, handler, i, k, options, result, transform, type, v, _i, _len;
var argument, callback, data, error, handler, i, j, k, len, options, result, transform, type, v;
options = {};
for (i = _i = 0, _len = arguments.length; _i < _len; i = ++_i) {
for (i = j = 0, len = arguments.length; j < len; i = ++j) {
argument = arguments[i];

@@ -48,5 +48,5 @@ type = typeof argument;

process.nextTick(function() {
var row, _j, _len1;
for (_j = 0, _len1 = data.length; _j < _len1; _j++) {
row = data[_j];
var l, len1, row;
for (l = 0, len1 = data.length; l < len1; l++) {
row = data[l];
if (error) {

@@ -63,8 +63,8 @@ break;

transform.on('readable', function() {
var r, _results;
_results = [];
var r, results;
results = [];
while ((r = transform.read())) {
_results.push(result.push(r));
results.push(result.push(r));
}
return _results;
return results;
});

@@ -84,9 +84,9 @@ transform.on('error', function(err) {

Transformer = function(options, transform) {
var _base;
this.options = options != null ? options : {};
this.transform = transform;
Transformer = function(options1, transform1) {
var base;
this.options = options1 != null ? options1 : {};
this.transform = transform1;
this.options.objectMode = true;
if ((_base = this.options).parallel == null) {
_base.parallel = 100;
if ((base = this.options).parallel == null) {
base.parallel = 100;
}

@@ -114,6 +114,6 @@ stream.Transform.call(this, this.options);

if (this.transform.length === 2) {
return this.transform.call(null, chunk, (function(_this) {
this.transform.call(null, chunk, (function(_this) {
return function() {
var chunks, err;
err = arguments[0], chunks = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
err = arguments[0], chunks = 2 <= arguments.length ? slice.call(arguments, 1) : [];
return _this._done(err, chunks, cb);

@@ -123,4 +123,5 @@ };

} else {
return this._done(null, [this.transform.call(null, chunk)], cb);
this._done(null, [this.transform.call(null, chunk)], cb);
}
return false;
} catch (_error) {

@@ -142,3 +143,3 @@ err = _error;

Transformer.prototype._done = function(err, chunks, cb) {
var chunk, _i, _len;
var chunk, j, len;
this.running--;

@@ -149,4 +150,4 @@ if (err) {

this.finished++;
for (_i = 0, _len = chunks.length; _i < _len; _i++) {
chunk = chunks[_i];
for (j = 0, len = chunks.length; j < len; j++) {
chunk = chunks[j];
if (typeof chunk === 'number') {

@@ -153,0 +154,0 @@ chunk = "" + chunk;

{
"version": "0.0.7",
"version": "0.0.8",
"name": "stream-transform",
"description": "Object transformations implementing the Node.js `stream.Transform` API",
"keywords": [ "stream", "transform", "csv", "object" ],
"licenses": [{
"type": "BSD",
"url": "https://github.com/wdavidw/node-stream-transform/blob/master/LICENSE"
}],
"licenses": "BSD-3-Clause",
"repository": {

@@ -11,0 +8,0 @@ "type": "git",

@@ -16,3 +16,3 @@ [![Build Status](https://secure.travis-ci.org/wdavidw/node-csv-parse.png)][travis]

* Synchronous and asynchronous user handler functions
* Accept object, array or JSON as input and output
* Accepts arrays of strings, or arrays of objects as input
* Sequential or user-defined concurrent execution

@@ -53,3 +53,3 @@ * Skip and create new records

To generate the JavaScript files, run `make build`.
To generate the JavaScript files, run `npm run coffee`.

@@ -63,3 +63,3 @@ The test suite is run online with [Travis][travis] against the versions

[examples]: http://csv.adaltas.com/transform/examples/
[csv]: https://github.com/wdavidw/node-csv
[csv_home]: https://github.com/wdavidw/node-csv
[stream-samples]: https://github.com/wdavidw/node-stream-transform/tree/master/samples

@@ -66,0 +66,0 @@ [stream-test]: https://github.com/wdavidw/node-stream-transform/tree/master/test

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