docs/polyethylene.polysynciterable.tomap.md
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [polyethylene](./polyethylene.md) > [PolySyncIterable](./polyethylene.polysynciterable.md) > [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<readonly \[K, V\]> | |
<b>Returns:</b>
Map<K, V>
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.