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

ez-streams

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

ez-streams - npm Package Compare versions

Comparing version 0.2.1 to 1.0.0

build.js

52

API.md

@@ -5,53 +5,51 @@ # ez-streams

* [ez-streams/lib/devices/array](lib/devices/array.md)
* [ez-streams/src/devices/array](lib/devices/array.md)
Array readers and writers
* [ez-streams/lib/devices/buffer](lib/devices/buffer.md)
* [ez-streams/src/devices/buffer](lib/devices/buffer.md)
In-memory buffer streams
* [ez-streams/lib/devices/child_process](lib/devices/child_process.md)
* [ez-streams/src/devices/child_process](lib/devices/child_process.md)
EZ Stream wrappers for node child processes
* [ez-streams/lib/devices/console](lib/devices/console.md)
* [ez-streams/src/devices/console](lib/devices/console.md)
Console EZ streams
* [ez-streams/lib/devices/file](lib/devices/file.md)
* [ez-streams/src/devices/file](lib/devices/file.md)
File based EZ streams
* [ez-streams/lib/devices/galaxy](lib/devices/galaxy.md)
Stream constructors for galaxy
* [ez-streams/lib/devices/generic](lib/devices/generic.md)
* [ez-streams/src/devices/generic](lib/devices/generic.md)
Generic stream constructors
* [ez-streams/lib/devices/http](lib/devices/http.md)
* [ez-streams/src/devices/http](lib/devices/http.md)
HTTP EZ Streams
* [ez-streams/lib/devices/net](lib/devices/net.md)
* [ez-streams/src/devices/net](lib/devices/net.md)
TCP and socket EZ Streams
* [ez-streams/lib/devices/node](lib/devices/node.md)
* [ez-streams/src/devices/node](lib/devices/node.md)
EZ Stream wrappers for native node streams
* [ez-streams/lib/devices/queue](lib/devices/queue.md)
* [ez-streams/src/devices/queue](lib/devices/queue.md)
Queue device
* [ez-streams/lib/devices/std](lib/devices/std.md)
* [ez-streams/src/devices/std](lib/devices/std.md)
EZ wrappers for standard I/O streams
* [ez-streams/lib/devices/string](lib/devices/string.md)
* [ez-streams/src/devices/string](lib/devices/string.md)
In-memory string streams
* [ez-streams/lib/devices/uturn](lib/devices/uturn.md)
* [ez-streams/src/devices/uturn](lib/devices/uturn.md)
Special device that transforms a writer into a reader
* [ez-streams/lib/helpers/binary](lib/helpers/binary.md)
* [ez-streams/src/helpers/binary](lib/helpers/binary.md)
helpers for binary streams
* [ez-streams/lib/mappers/convert](lib/mappers/convert.md)
* [ez-streams/src/mappers/convert](lib/mappers/convert.md)
Encoding mappers
* [ez-streams/lib/mappers/json](lib/mappers/json.md)
* [ez-streams/src/mappers/json](lib/mappers/json.md)
JSON mappers
* [ez-streams/lib/node-wrappers](lib/node-wrappers.md)
* [ez-streams/src/node-wrappers](lib/node-wrappers.md)
Wrappers for node.js streams
* [ez-streams/lib/reader](lib/reader.md)
* [ez-streams/src/reader](lib/reader.md)
EZ Streams core reader API
* [ez-streams/lib/transforms/csv](lib/transforms/csv.md)
* [ez-streams/src/transforms/csv](lib/transforms/csv.md)
Stream transform for CSV files
* [ez-streams/lib/transforms/cut](lib/transforms/cut.md)
* [ez-streams/src/transforms/cut](lib/transforms/cut.md)
Transform to cut string and binary streams
* [ez-streams/lib/transforms/json](lib/transforms/json.md)
* [ez-streams/src/transforms/json](lib/transforms/json.md)
"Simple" JSON streams
* [ez-streams/lib/transforms/lines](lib/transforms/lines.md)
* [ez-streams/src/transforms/lines](lib/transforms/lines.md)
Stream transform for line-oriented text streams
* [ez-streams/lib/transforms/multipart](lib/transforms/multipart.md)
* [ez-streams/src/transforms/multipart](lib/transforms/multipart.md)
Stream transform for MIME multipart
* [ez-streams/lib/transforms/xml](lib/transforms/xml.md)
* [ez-streams/src/transforms/xml](lib/transforms/xml.md)
Simple XML parser and formatter
* [ez-streams/lib/writer](lib/writer.md)
* [ez-streams/src/writer](lib/writer.md)
EZ Streams core writer API
"use strict";
module.exports = require('./lib');
module.exports = require('./lib/' + require('streamline-runtime').runtime);
{
"name": "ez-streams",
"description": "EZ streams for node.js",
"version": "0.2.1",
"version": "1.0.0",
"license": "MIT",
"author": "Bruno Jouhier",
"repository": {

@@ -13,7 +15,12 @@ "type": "git",

"dependencies": {
"streamline": "^0.10.15",
"streamline-fs": "^0.1.1"
"streamline-runtime": "^1.0.12"
},
"author": "Bruno Jouhier",
"devDependencies": {
"babel": "^5.8.0",
"babel-plugin-streamline": "^1.0.8"
},
"scripts": {
"prepublish": "node build.js || nodejs build.js"
},
"main": "index.js"
}

@@ -11,4 +11,2 @@ # Easy Streams for node.js

EZ streams are also compatible with [galaxy](https://github.com/Sage/galaxy). See [Galaxy-support](#galaxy-support) below for details.
<a name="installation"/>

@@ -222,3 +220,3 @@ ## Installation

The array functions are nice but they have limited power. They work well to process stream entries independently from each other but they don't allow us to do more complex operation like combining several entries into a bigger one, or splitting one entry into several smaller ones, or a mix of both. This is something we typically do when we parse text streams: we receive chunks of texts; we look for special boundaries and we emit the items that we have isolated between boundaries. Usally, there is not a one to one correspondance between the chunks that we receive and the items that we emit.
The array functions are nice but they have limited power. They work well to process stream entries independently from each other but they don't allow us to do more complex operation like combining several entries into a bigger one, or splitting one entry into several smaller ones, or a mix of both. This is something we typically do when we parse text streams: we receive chunks of texts; we look for special boundaries and we emit the items that we have isolated between boundaries. Usually, there is not a one to one correspondance between the chunks that we receive and the items that we emit.

@@ -297,3 +295,3 @@ The `transform` function is designed to handle these more complex operations. Typical code looks like:

<a name="node-interop"/>
## Interoperabily with native node.js streams
## Interoperability with native node.js streams

@@ -477,41 +475,2 @@ `ez-streams` are fully interoperable with native node.js streams.

<a name="galaxy-support"/>
## Galaxy support
EZ streams is the recommended streams package for [galaxy](https://github.com/Sage/galaxy). The API is overloaded to facilitate integration with generator functions.
If you develop with galaxy, you should use the API as follows:
* add a `Star` postfix to the _reducer_ methods (the methods that have `_` as first parameter: `forEach`, `every`, `some`, `reduce`, `pipe`, `toArray`). You should also `yield` on these `Star` calls.
* add a `G` (for generator/galaxy postfix to the non _reducer_ methods.
* pass generator functions (`function*(...) { ... }`) instead of regular asynchronous functions (`function(_, ...) { ...}`) to the methods that expect a callback (`forEach`, `map`, `filter`, `transform`, ...).
For example, instead of:
``` javascript
console.log("pi~=" + 4 * numberReader(10000).filter(function(_, n) {
return n % 2; // keep only odd numbers
}).map(function(_, n) {
return n % 4 === 1 ? 1 / n : -1 / n;
}).reduce(_, function(_, res, val) {
return res + val;
}, 0));
```
you would write:
``` javascript
console.log("pi~=" + 4 * (yield numberReader(10000).filterG(function*(n) {
return n % 2; // keep only odd numbers
}).mapG(function*(n) {
return n % 4 === 1 ? 1 / n : -1 / n;
}).reduceStar(function*(res, val) {
return res + val;
}, 0)));
```
_Note:_ do not forget the `*` after `function` in the functions inside your chains; and do not forget to `yield` on reducers (`reduceStar` in the example above).
See the [galaxy unit test](test/server/galaxy-test.js) for more examples.
<a name="api"/>

@@ -518,0 +477,0 @@ ## API

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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