Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binocarlos/from2-array
Create a from2 stream based on an array of source values
https://github.com/binocarlos/from2-array
Last synced: 10 days ago
JSON representation
Create a from2 stream based on an array of source values
- Host: GitHub
- URL: https://github.com/binocarlos/from2-array
- Owner: binocarlos
- License: mit
- Created: 2014-04-21T11:36:15.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-06T20:38:31.000Z (over 9 years ago)
- Last Synced: 2024-09-19T02:44:04.855Z (2 months ago)
- Language: JavaScript
- Size: 158 KB
- Stars: 17
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
from2-array
===========[![NPM](https://nodei.co/npm/from2-array.png?global=true)](https://nodei.co/npm/from2-array/)
[![Travis](http://img.shields.io/travis/binocarlos/from2-array.svg?style=flat)](https://travis-ci.org/binocarlos/from2-array)
Create a [from2](https://github.com/hughsk/from2) stream based on an array of source values
Useful when you want to create a Readable stream with some values you already have in an array
## example
```js
var from = require('from2-array')
var through = require('through2')from.obj([{
name:'a'
},{
name:'b'
},{
name:'c'
}]).pipe(through.obj(function(chunk, enc, cb){
console.log('found: ' + chunk.name)
cb()
}))```
## license
MIT