()
| 82 | // ### Conversion to other types |
| 83 | |
| 84 | toArray() { |
| 85 | assertNotInfinite(this.size); |
| 86 | const array = new Array(this.size || 0); |
| 87 | const useTuples = isKeyed(this); |
| 88 | let i = 0; |
| 89 | this.__iterate((v, k) => { |
| 90 | // Keyed collections produce an array of tuples. |
| 91 | array[i++] = useTuples ? [k, v] : v; |
| 92 | }); |
| 93 | return array; |
| 94 | }, |
| 95 | |
| 96 | toIndexedSeq() { |
| 97 | return new ToIndexedSequence(this); |
nothing calls this directly
no test coverage detected