Darkhogg/polyethylene

View on GitHub
docs/polyethylene.polysynciterable.tomap.md

Summary

Maintainability
Test Coverage
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [polyethylene](./polyethylene.md) &gt; [PolySyncIterable](./polyethylene.polysynciterable.md) &gt; [toMap](./polyethylene.polysynciterable.tomap.md)

## PolySyncIterable.toMap() method

Return a `Map` made from the entries of `this`<!-- -->. This method is roughly equivalent to calling `new Map(iter.toArray())`<!-- -->.

<b>Signature:</b>

```typescript
toMap<K, V>(this: PolySyncIterable<readonly [K, V]>): Map<K, V>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  this | PolySyncIterable&lt;readonly \[K, V\]&gt; |  |

<b>Returns:</b>

Map&lt;K, V&gt;

A `Map` composed of the entries yielded by this iterable.

## Remarks

This method is only available for iterations of pairs where the first component is a valid object key type.