Version 1
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / _mapToArray.js
diff --git a/node_modules/grunt-legacy-util/node_modules/lodash/_mapToArray.js b/node_modules/grunt-legacy-util/node_modules/lodash/_mapToArray.js
new file mode 100644 (file)
index 0000000..e2e8a24
--- /dev/null
@@ -0,0 +1,18 @@
+/**
+ * Converts `map` to an array.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the converted array.
+ */
+function mapToArray(map) {
+  var index = -1,
+      result = Array(map.size);
+
+  map.forEach(function(value, key) {
+    result[++index] = [key, value];
+  });
+  return result;
+}
+
+module.exports = mapToArray;