mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Bump to v4.0.0.
This commit is contained in:
18
internal/setToArray.js
Normal file
18
internal/setToArray.js
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Converts `set` to an array.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} set The set to convert.
|
||||
* @returns {Array} Returns the converted array.
|
||||
*/
|
||||
function setToArray(set) {
|
||||
var index = -1,
|
||||
result = Array(set.size);
|
||||
|
||||
set.forEach(function(value) {
|
||||
result[++index] = value;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
export default setToArray;
|
||||
Reference in New Issue
Block a user