Class Index | File Index

Classes


Class Pot.Deferred#some


Defined in: <potlite.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
Pot.Deferred#some(callback, (context))
Tests whether some element in the object passes the test implemented by the provided function.
Field Summary
Field Attributes Field Name and Description
 
Iterates "some" loop with slower speed.
 
Iterates "some" loop with fast speed.
 
Iterates "some" loop with slowest speed.
 
Iterates "some" loop with fastest speed.
 
Iterates "some" loop with default speed.
 
Iterates "some" loop with faster speed.
 
Iterates "some" loop with slow speed.
Class Detail
Pot.Deferred#some(callback, (context))
Tests whether some element in the object passes the test implemented by the provided function. Iteration will use the results of the previous chain. This method like Array.prototype.some
  Pot.Deferred.begin(function() {
    return [2, 5, 8, 1, 4];
  }).some(function(value, index, array) {
    return (value >= 10);
  }).then(function(result) {
    debug(result);
    // @results false
  }).then(function() {
    return [12, 5, 8, 1, 4];
  }).some(function(value, index, array) {
    return (value >= 10);
  }).then(function(result) {
    debug(result);
    // @results true;
  });
Parameters:
{Function} callback
A callback function.
{*} (context)
(Optional) Object to use as `this` when executing callback.
Returns:
{Boolean} Return the Boolean result by callback.
Field Detail
{Function} doze
Iterates "some" loop with slower speed.

{Function} fast
Iterates "some" loop with fast speed.

{Function} limp
Iterates "some" loop with slowest speed.

{Function} ninja
Iterates "some" loop with fastest speed.

{Function} normal
Iterates "some" loop with default speed.

{Function} rapid
Iterates "some" loop with faster speed.

{Function} slow
Iterates "some" loop with slow speed.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Sep 21 2012 19:35:45 GMT+0900 (JST)