jQuery Deferred Sequence
Allows a value to be sequentially processed through a list of objects, usually Deferred objects that represent asynchronous events.
var value = 0 items = { return value + 1; } { var dfd = $; ; return dfd; } { return value * value; } sequence = $Deferred; sequence;
Methods
- reduce( [ intialValue, ] callbackFunction [, context ] ) Promise
Apply a function against each item in the sequence, optionally calling the function with the specified context.
Properties
-
head Deferred
A deferred object representing the beginning of the sequence. -
items Array, Object
The items given to the sequence on initialization. -
master Deferred
A deferred object which tracks the aggregate state of all the deferreds in the sequence. -
tail Deferred
A deferred object representing the end of the sequence.
License
Copyright (c) 2013 Kyle Florence
Dual licensed under the MIT and GPLv2 licenses.