mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Bump to v4.0.0.
This commit is contained in:
21
internal/setToArray.js
Normal file
21
internal/setToArray.js
Normal file
@@ -0,0 +1,21 @@
|
||||
define([], function() {
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
return setToArray;
|
||||
});
|
||||
Reference in New Issue
Block a user