Aliasing _.contains to _.include

This commit is contained in:
Jeremy Ashkenas
2010-07-15 10:18:11 -04:00
parent 9827f87611
commit ef396a9e13
4 changed files with 4 additions and 2 deletions

View File

@@ -111,7 +111,7 @@ $(document).ready(function() {
test('collections: include', function() {
ok(_.include([1,2,3], 2), 'two is in the array');
ok(!_.include([1,3,9], 2), 'two is not in the array');
ok(_.include({moe:1, larry:3, curly:9}, 3), '_.include on objects checks their values');
ok(_.contains({moe:1, larry:3, curly:9}, 3), '_.include on objects checks their values');
ok(_([1,2,3]).include(2), 'OO-style include');
});

View File

@@ -12,7 +12,7 @@ $(document).ready(function() {
test("objects: functions", function() {
var expected = ["all", "any", "bind", "bindAll", "breakLoop", "clone", "compact",
"compose","defer", "delay", "detect", "each", "every", "extend", "filter", "first",
"compose", "contains", "defer", "delay", "detect", "each", "every", "extend", "filter", "first",
"flatten", "foldl", "foldr", "forEach", "functions", "head", "identity", "include",
"indexOf", "inject", "intersect", "invoke", "isArguments", "isArray", "isBoolean", "isDate", "isElement", "isEmpty", "isEqual",
"isFunction", "isNaN", "isNull", "isNumber", "isRegExp", "isString", "isUndefined", "keys", "last", "lastIndexOf", "map", "max",