Simplify _.size.

Former-commit-id: a7d3338cbd5784ec6b9b6a25e18acd9507f4b21c
This commit is contained in:
John-David Dalton
2012-08-31 17:04:06 -07:00
parent 2c31411ffb
commit ce5ae1dfdd
6 changed files with 46 additions and 61 deletions

View File

@@ -1304,10 +1304,6 @@
})
});
test('should work with an object that has a `length` property', function() {
equal(_.size({ 'length': 3 }), 1);
});
test('should work with jQuery/MooTools DOM query collections', function() {
function Foo(elements) { Array.prototype.push.apply(this, elements); }
Foo.prototype = { 'length': 0, 'splice': Array.prototype.splice };