Save 2 gzipped bytes by flipping args in math.max

Also, remove some stray whitespace.


Former-commit-id: 98b4711bc7d978ef66a693593d6be108f6bcfd8d
This commit is contained in:
David Murdoch
2012-06-28 09:45:14 -04:00
parent 81b28d005d
commit 2c1ec5fe75
2 changed files with 32 additions and 30 deletions

View File

@@ -986,7 +986,7 @@
} else if (thisArg) {
callback = iteratorBind(callback, thisArg);
}
var result = map(collection, function(value, index) {
return {
'criteria': callback(value, index, collection),
@@ -1479,7 +1479,7 @@
// use `Array(length)` so V8 will avoid the slower "dictionary" mode
// http://www.youtube.com/watch?v=XAqIpGU8ZZk#t=16m27s
var index = -1,
length = Math.max(Math.ceil((end - start) / step), 0),
length = Math.max(0, Math.ceil((end - start) / step)),
result = Array(length);
while (++index < length) {