Last active
April 26, 2022 13:35
-
-
Save ValentaTomas/a21b08f23fa6331ffcce2c4afc83f654 to your computer and use it in GitHub Desktop.
Filter null and undefined values out of an array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function notEmpty<T>(value: T | null | undefined): value is T { | |
return value !== null && value !== undefined; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment