source:
node_modules/@reduxjs/toolkit/src/query/utils/isNotNullish.ts
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 228 bytes | |
| Line | |
|---|---|
| 1 | export function isNotNullish<T>(v: T | null | undefined): v is T { |
| 2 | return v != null |
| 3 | } |
| 4 | |
| 5 | export function filterNullishValues<T>(map?: Map<any, T>) { |
| 6 | return [...(map?.values() ?? [])].filter(isNotNullish) as NonNullable<T>[] |
| 7 | } |
Note:
See TracBrowser
for help on using the repository browser.
