aswi2020vldc-gitlab/templetes/node_modules/lodash/_setToArray.js @ ae1ff627
1 | 3a515b92 | cagy | /**
|
---|---|---|---|
2 | * Converts `set` to an array of its values.
|
||
3 | *
|
||
4 | * @private
|
||
5 | * @param {Object} set The set to convert.
|
||
6 | * @returns {Array} Returns the values.
|
||
7 | */
|
||
8 | function setToArray(set) { |
||
9 | var index = -1, |
||
10 | result = Array(set.size); |
||
11 | |||
12 | set.forEach(function(value) { |
||
13 | result[++index] = value; |
||
14 | });
|
||
15 | return result; |
||
16 | }
|
||
17 | |||
18 | module.exports = setToArray; |