perf(map): use Array.prototype.map

Replace helper functions with the native ES5 method
This commit is contained in:
Rouven Weßling
2014-09-04 23:51:02 +02:00
committed by Brian Ford
parent 6b05105c08
commit a591e8b8d3
6 changed files with 5 additions and 16 deletions

View File

@@ -50,7 +50,6 @@
trim: true,
isElement: true,
makeMap: true,
map: true,
size: true,
includes: true,
arrayRemove: true,
@@ -617,15 +616,6 @@ function nodeName_(element) {
}
function map(obj, iterator, context) {
var results = [];
forEach(obj, function(value, index, list) {
results.push(iterator.call(context, value, index, list));
});
return results;
}
/**
* @description
* Determines the number of elements in an array, the number of properties an object has, or