shrunk down all of the 'is' functions into a single generation, added isRegExp, added a regexp equality test to isEqual, after grayrest's patch

This commit is contained in:
Jeremy Ashkenas
2009-12-06 22:48:40 -05:00
parent 4bd535e7f1
commit 66dc6c2ac1
3 changed files with 20 additions and 33 deletions

View File

@@ -37,6 +37,7 @@ $(document).ready(function() {
ok(!_.isEqual(5, NaN), '5 is not equal to NaN');
ok(_.isEqual(NaN, NaN), 'NaN is equal to NaN');
ok(_.isEqual(new Date(100), new Date(100)), 'identical dates are equal');
ok(_.isEqual((/hello/ig), (/hello/ig)), 'identical regexes are equal');
});
test("objects: isEmpty", function() {

View File

@@ -35,7 +35,7 @@ $(document).ready(function() {
"compose","defer", "delay", "detect", "each", "every", "extend", "filter", "first",
"flatten", "foldl", "foldr", "forEach", "functions", "head", "identity", "include",
"indexOf", "inject", "intersect", "invoke", "isArray", "isDate", "isElement", "isEmpty", "isEqual",
"isFunction", "isNaN", "isNull", "isNumber", "isString", "isUndefined", "keys", "last", "lastIndexOf", "map", "max",
"isFunction", "isNaN", "isNull", "isNumber", "isRegExp", "isString", "isUndefined", "keys", "last", "lastIndexOf", "map", "max",
"methods", "min", "pluck", "range", "reduce", "reduceRight", "reject", "rest", "select",
"size", "some", "sortBy", "sortedIndex", "tail", "template", "toArray", "uniq",
"uniqueId", "values", "without", "wrap", "zip"];