1.0.0 • Published 8 years ago

@micro-js/object-to-promise v1.0.0

Weekly downloads
-
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 @micro-js/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.0.0

8 years ago

0.2.0

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago