Class Index | File Index

Classes


Function Namespace Pot.every


Defined in: <potlite.js>.

Function Namespace Summary
Constructor Attributes Constructor Name and Description
 
Pot.every(object, callback, (context))
Tests whether all elements in the object pass the test implemented by the provided function.
Function Namespace Detail
Pot.every(object, callback, (context))
Tests whether all elements in the object pass the test implemented by the provided function. This method like Array.prototype.every
  function isBigEnough(value, index, array) {
    return (value >= 10);
  }
  var passed = Pot.every([12, 5, 8, 130, 44], isBigEnough);
  // passed is false
  passed = Pot.every([12, 54, 18, 130, 44], 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)