Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
364 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 | module.exports = setToPairs;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.