Skip to content

AndersDJohnson/jquery-whenObject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery-whenObject

$.when with objects of promises, a la async. Allows referring to results by key, while minimizing parameter mismatch errors.

Install

Via bower as jquery-whenObject.

bower install --save jquery-whenObject

Usage

Include on your page, after jQuery. Supports AMD.

$.whenObject({
  first: firstPromise,
  second: secondPromise
}) // => returns combined promise
  .done(function (results) {
    console.log(results.first);
    console.log(results.second);
  })
  .fail(/* function... */)
  .always(/* function... */)

For details, refer to jQuery.when API.

About

$.when for objects of promises

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published