Wondering what’s next for npm?Check out our public roadmap! »

    @f/to-promise

    1.1.2 • Public • Published

    to-promise

    Build status Git tag NPM version Code style

    Convert container to promise.

    Installation

    $ npm install @f/to-promise
    

    Usage

    var toPromise = require('@f/to-promise')
     
    toPromise({
      a: Promise.resolve(1)
    }).then(function (res) {
      res // => {a: 1}
    })
     
    toPromise([1]).then(function (res) {
      res // => [1]
    })

    API

    toPromise(container)

    • container - A container of some kind to convert (array, object, generator, or thunk)

    Returns: a promise

    License

    MIT

    Keywords

    none

    Install

    npm i @f/to-promise

    DownloadsWeekly Downloads

    29

    Version

    1.1.2

    License

    MIT

    Last publish

    Collaborators

    • avatar