Use more ES2015.

This commit is contained in:
John-David Dalton
2017-01-02 16:45:31 -06:00
parent 2900cfd288
commit 1a1e462f80
17 changed files with 45 additions and 59 deletions

View File

@@ -10,10 +10,10 @@ import isArrayLike from './isArrayLike.js';
* @returns {Array} Returns the new mapped array.
*/
function baseMap(collection, iteratee) {
var index = -1,
result = isArrayLike(collection) ? Array(collection.length) : [];
let index = -1;
const result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value, key, collection) {
baseEach(collection, (value, key, collection) => {
result[++index] = iteratee(value, key, collection);
});
return result;