I'm using the below function to do string validation:
isValidString = value => (value && value.trim() !== '');
I'm expecting a boolean return, but when value = ''
return value is an empty string.
Can someone please explain why this is happening?