Version 1
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / _arrayMap.js
diff --git a/node_modules/grunt-legacy-util/node_modules/lodash/_arrayMap.js b/node_modules/grunt-legacy-util/node_modules/lodash/_arrayMap.js
new file mode 100644 (file)
index 0000000..73b29cf
--- /dev/null
@@ -0,0 +1,21 @@
+/**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @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;