Update vendors, minified files, and docs.

Former-commit-id: 018dfcade1386aa84492f60c8404ea00c01cbe11
This commit is contained in:
John-David Dalton
2012-12-01 13:24:40 -08:00
parent 9010a7ddbc
commit 5271c2e08f
12 changed files with 357 additions and 262 deletions

View File

@@ -418,6 +418,13 @@ $(document).ready(function() {
var numbers = _.toArray({one : 1, two : 2, three : 3});
equal(numbers.join(', '), '1, 2, 3', 'object flattened into array');
// test in IE < 9
try {
var actual = _.toArray(document.childNodes);
} catch(ex) { }
ok(_.isArray(actual), 'should not throw converting a node list');
});
test('size', function() {

View File

@@ -34,8 +34,10 @@ $(document).ready(function() {
// To test this with a modern browser, set underscore's nativeBind to undefined
var F = function () { return this; };
var Boundf = _.bind(F, {hello: "moe curly"});
equal(new Boundf().hello, undefined, "function should not be bound to the context, to comply with ECMAScript 5");
var newBoundf = new Boundf();
equal(newBoundf.hello, undefined, "function should not be bound to the context, to comply with ECMAScript 5");
equal(Boundf().hello, "moe curly", "When called without the new operator, it's OK to be bound to the context");
ok(newBoundf instanceof Boundf && newBoundf instanceof F, "a bound instance is an instance of the bound and original function");
});
test("bindAll", function() {