Created
April 7, 2020 07:33
-
-
Save guiseek/13a69601f542b27723182429c086eba5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 orZero(data) { | |
return !!data | |
&& typeof data === 'number' | |
&& !isNaN(data) ? data : 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment