Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.editorconfig
.eslintrc
.gitattributes
.gitignore
.travis.yml
index.js
license
package.json
readme.md

readme.md

async-map-stream

NPM version Downloads Build Status Coverage Status Chat Tip

A version of map-stream that supports callbacks, promises, observables, and streams. Always uses objectMode.

Install

$ npm install --save async-map-stream

Usage

var map = require('async-map-stream');

vinylFs
    .src('src/**')
    .pipe(map(function (file) {
        // make observations
        return Observable.just(file);
    }))
    .pipe(map(function (file) {
        // make promises
        return Promise.resolve(file);
    }))
    .pipe(map(function (file, cb) {
        // kick it old-school
        cb(null, file);
    }))
    .pipe(vinylFs.dest('dist'));

API

map([options,] transform [, flush]) : TransformStream

See the through2 documentation for all possible options and arguments.

transform(data [, cb])

flush([cb])

See the async-done documentation for all possible arguments and return types.

Test

$ npm test

Contribute

Tasks

Standards for this project, including tests, code coverage, and semantics are enforced with a build tool. Pull requests must include passing tests with 100% code coverage and no linting errors.


MIT © Shannon Moeller

You can’t perform that action at this time.