lodash: Tweak map's result assignment. [jddalton]

Former-commit-id: eb047e50e485fb1df387648fc1815e405b9d18ef
This commit is contained in:
John-David Dalton
2012-04-27 01:11:48 -04:00
parent 358ec3fb39
commit 8dc3fb86db
3 changed files with 91 additions and 92 deletions

View File

@@ -121,8 +121,7 @@
var mapFactoryOptions = {
'init': '[]',
'beforeLoop': {
'array': 'result.length = length',
'object': 'result = []'
'array': 'result=Array(length)'
},
'inLoop': {
'array': 'result[index] = callback(collection[index], index, collection)',