Class Index | File Index

Classes


Function Namespace Pot.some


Defined in: <potlite.js>.

Function Namespace Summary
Constructor Attributes Constructor Name and Description
 
Pot.some(object, callback, (context))
Tests whether some element in the object passes the test implemented by the provided function.
Function Namespace Detail
Pot.some(object, callback, (context))
Tests whether some element in the object passes the test implemented by the provided function. This method like Array.prototype.some
  function isBigEnough(value, index, array) {
    return (value >= 10);
  }
  var passed = Pot.some([2, 5, 8, 1, 4], isBigEnough);
  // passed is false
  passed = Pot.some([12, 5, 8, 1, 4], isBigEnough);
  // passed is true
Parameters:
{Array|Object|*} object
A target object.
{Function} callback
A callback function.
{*} (context)
(Optional) Object to use as `this` when executing callback.
Returns:
{Boolean} Return the Boolean result by callback.

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