25 lines
613 B
Markdown
25 lines
613 B
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
|
||
|
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [getOrDefault](./js-utils.getordefault.md)
|
||
|
|
||
|
## getOrDefault() function
|
||
|
|
||
|
<b>Signature:</b>
|
||
|
|
||
|
```typescript
|
||
|
export declare function getOrDefault<TKey, TVal>(map: Map<TKey, TVal>, key: TKey, defaultValue: TVal): TVal;
|
||
|
```
|
||
|
|
||
|
## Parameters
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| map | <code>Map<TKey, TVal></code> | |
|
||
|
| key | <code>TKey</code> | |
|
||
|
| defaultValue | <code>TVal</code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`TVal`
|
||
|
|