aboutsummaryrefslogtreecommitdiff
path: root/node_modules/lodash/_setToPairs.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/lodash/_setToPairs.js')
-rw-r--r--node_modules/lodash/_setToPairs.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/node_modules/lodash/_setToPairs.js b/node_modules/lodash/_setToPairs.js
new file mode 100644
index 0000000..36ad37a
--- /dev/null
+++ b/node_modules/lodash/_setToPairs.js
@@ -0,0 +1,18 @@
+/**
+ * Converts `set` to its value-value pairs.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the value-value pairs.
+ */
+function setToPairs(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = [value, value];
+ });
+ return result;
+}
+
+module.exports = setToPairs;