vue-app-sdk
Version:
13 lines (12 loc) • 382 B
JavaScript
import baseEach from "./_baseEach.js";
import isArrayLike from "./isArrayLike.js";
function baseMap(collection, iteratee) {
var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value, key, collection2) {
result[++index] = iteratee(value, key, collection2);
});
return result;
}
export {
baseMap as default
};