Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const shouldShowTooltip = text => !!text;
// returns true
shouldShowTooltip('JavaScript rocks');
// all return false
shouldShowTooltip('');
shouldShowTooltip(null);
shouldShowTooltip();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment