doc: merge old docs for Enumerable#include.

This commit is contained in:
tjcrowder 2009-09-07 15:22:44 +01:00 committed by Tobie Langel
parent ed5456dae0
commit df8ebd727f
1 changed files with 14 additions and 1 deletions

View File

@ -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))