daleharvey/jquery.couch.js — pull request #4 by Prinzhorn (2011-12-10 11:30:25+00:00)
Title: Added a "afterAllApps" callback to "allApps", because "eachApp" is not enough for most cases

When calling "allApps" you need to pass a "eachApp" callback. This is ok for printing out all apps, but for most cases it's not because:

-You don't know if there are apps at all (the callback will just not fire)
-You don't know how many apps will come

That's why I added a second callback named "afterAllApps" which gets called after all iterating is done. It gets passed an array of all apps and iterating is up to the caller.

Example usage:

```js
$db.allApps({
eachApp: $.noop,
afterAllApps: function(list) {
for(var i = 0; i < list.length; i++) {
alert(list[i].appName);
}
}
});
```