From e5c6fb427269c6c69c99122124ba2d1b234aa00a Mon Sep 17 00:00:00 2001 From: tjcrowder Date: Mon, 7 Sep 2009 14:52:38 +0100 Subject: [PATCH] doc: merged old docs for Enumerable#findAll, updated and trimmed examples --- src/lang/enumerable.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lang/enumerable.js b/src/lang/enumerable.js index d5e5b37..2f7acb5 100644 --- a/src/lang/enumerable.js +++ b/src/lang/enumerable.js @@ -284,9 +284,17 @@ var Enumerable = (function() { /** * Enumerable#findAll(iterator[, context]) -> Array + * - iterator (Function): An iterator function to use to test the elements. + * - context (Object): An optional object to use as `this` within + * calls to the iterator. * - * Returns all the elements for which the iterator returned "truthy" value. - * Aliased as [[Enumerable#select]]. + * Returns all the elements for which the iterator returned a truthy value. + * For the opposite operation, see [[Enumerable#reject]]. + * + * ### Example + * + * [1, "two", 3, "four", 5].findAll(Object.isString); + * // -> ["two", "four"] **/ function findAll(iterator, context) { var results = [];