JSPM

pull-promise-map-done

1.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q50458F
  • License MIT

Map Pull Stream with Promise support and done callback

Package Exports

  • pull-promise-map-done

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pull-promise-map-done) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pull-promise-map-done

This is based on the async-map through stream from the core pull-stream module, but it is designed to work with promise-returning functions and also incorporates a done callback. Either the map or the done callbacks may be omitted.

var asyncMap = require('pull-promise-map-done');

asyncMap(
    function map(data) {
        return promiseReturningFunction(data);
    },
    function done(err) {
        if(err) {
            return promiseReturningErrorReporter(err);
        }
    }
)