Merge git://github.com/documentcloud/underscore into isequal

This commit is contained in:
Kit Cambridge
2011-09-05 17:50:45 -06:00
9 changed files with 250 additions and 141 deletions

View File

@@ -22,6 +22,10 @@ $(document).ready(function() {
test("objects: functions", function() {
var obj = {a : 'dash', b : _.map, c : (/yo/), d : _.reduce};
ok(_.isEqual(['b', 'd'], _.functions(obj)), 'can grab the function names of any passed-in object');
var Animal = function(){};
Animal.prototype.run = function(){};
equals(_.functions(new Animal).join(''), 'run', 'also looks up functions on the prototype');
});
test("objects: extend", function() {