diff options
Diffstat (limited to 'node_modules/babel-template/node_modules/lodash/_setToPairs.js')
-rw-r--r-- | node_modules/babel-template/node_modules/lodash/_setToPairs.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/node_modules/babel-template/node_modules/lodash/_setToPairs.js b/node_modules/babel-template/node_modules/lodash/_setToPairs.js new file mode 100644 index 000000000..36ad37a05 --- /dev/null +++ b/node_modules/babel-template/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; |