@f/array-to-promise

Convert array to a promise.

Stats

StarsIssuesVersionUpdatedCreatedSize
@f/array-to-promise
001.2.16 years ago6 years agoMinified + gzip package size for @f/array-to-promise in KB

Readme

array-to-promise

Build status Git tag NPM version Code style

Convert array to a promise.

Installation

$ npm install @f/array-to-promise

Usage

var arrayToPromise = require('@f/array-to-promise')

arrayToPromise([1, Promise.resolve(2)]).then(function (res) {
  res // => [1, 2]
})

API

arrayToPromise(array)

  • array - array of promises and non-promises

Returns: array with all promises resolved

License

MIT

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.