summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayMap.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayMap.js')
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayMap.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayMap.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayMap.js
new file mode 100644
index 0000000000..777c7c9f35
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayMap.js
@@ -0,0 +1,21 @@
+/**
+ * A specialized version of `_.map` for arrays without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+}
+
+module.exports = arrayMap;