[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: Array>): Map;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| pairs | Array<NameValuePair<TVal>>
| |
Returns:
`Map`