From df8ebd727f46cd0eae5729606df1df27de9ed41e Mon Sep 17 00:00:00 2001 From: tjcrowder Date: Mon, 7 Sep 2009 15:22:44 +0100 Subject: [PATCH] doc: merge old docs for Enumerable#include. --- src/lang/enumerable.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/lang/enumerable.js b/src/lang/enumerable.js index 9340906..cca54de 100644 --- a/src/lang/enumerable.js +++ b/src/lang/enumerable.js @@ -352,9 +352,22 @@ var Enumerable = (function() { /** * Enumerable#include(object) -> Boolean + * - object (Object): The object to look for. * * Determines whether a given object is in the Enumerable or not, - * based on the `==` comparison operator. Aliased as [[Enumerable#member]]. + * based on the `==` comparison operator (equality with implicit type + * conversion). + * + * ### Examples + * + * $R(1,15).include(10); + * // -> true + * + * ['hello', 'world'].include('HELLO'); + * // -> false ('hello' != 'HELLO') + * + * [1, 2, '3', '4', '5'].include(3); + * // -> true ('3' == 3) **/ function include(object) { if (Object.isFunction(this.indexOf))