1.1.3 • Published 8 years ago

@f/object-to-promise v1.1.3

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

object-to-promise

Build status Git tag NPM version Code style

Convert an object to a promise.

Installation

$ npm install @f/object-to-promise

Usage

var objectToPromise = require('object-to-promise')

objectToPromise({
  1: Promise.resolve(1),
  2: Promise.resolve(2)
}).then(function (obj) {
  console.log(obj) // => { 1: 1, 2: 2 }
})

API

objectToPromise(object)

  • object - an object of "resolavables"

Returns: a promise

License

MIT

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago