[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [pairsToMap](./js-utils.pairstomap.md)
## pairsToMap() function
Turns a list of name-value pairs into a map.
Signature:
```typescript
export declare function pairsToMap(pairs: ReadonlyArray>): Map;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| pairs | ReadonlyArray<NameValuePair<TVal>> | |
Returns:
Map<string, TVal>