Last active
May 24, 2018 12:29
-
-
Save koss-lebedev/52668041ed6225ffa015c003d3866483 to your computer and use it in GitHub Desktop.
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
// @flow | |
const isStringEmpty = (str?: string) => { | |
return str && str.trim() !== "" | |
} | |
const first = isStringEmpty(null) | |
const second = isStringEmpty("") | |
const third = isStringEmpty("test") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment