This release CONTAINS BREAKING CHANGES to expected behavior, hence the bump to 2.0. The altered behavior only appeared in last night's v1.1.1 release, though, so hopefully this won't be too disruptive.
- Rather than immediately resolving the "parent" deferred and returning its promise when passed an empty array or object,
jQuery.deferredEach()
now rejects it. This triggers failure callbacks rather than success callbacks. - All completion callbacks get the collection (array or object) passed to
jQuery.deferredEach()
as their first argument. This includes failure callbacks added with.fail()
or with a second function passed to.then()
. - All completion callbacks also get a second argument,
message
-- a string stating why the iteration succeeded or failed. Useful in.fail()
callbacks to figure out what went wrong.
See README.md
for more details.