main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
362 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * Converts `set` to its value-value pairs.
|
---|
3 | *
|
---|
4 | * @private
|
---|
5 | * @param {Object} set The set to convert.
|
---|
6 | * @returns {Array} Returns the value-value pairs.
|
---|
7 | */
|
---|
8 | function setToPairs(set) {
|
---|
9 | var index = -1,
|
---|
10 | result = Array(set.size);
|
---|
11 |
|
---|
12 | set.forEach(function(value) {
|
---|
13 | result[++index] = [value, value];
|
---|
14 | });
|
---|
15 | return result;
|
---|
16 | }
|
---|
17 |
|
---|
18 | export default setToPairs;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.