Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const EMPTY_LENGTH = 0;
- const isEmpty = (value: any[] | string | number): boolean => {
- if (typeof value === 'number') {
- return !isNaN(value) && value <= EMPTY_LENGTH;
- }
- return !value || value.length <= EMPTY_LENGTH;
- };
- export default isEmpty;
Advertisement
Add Comment
Please, Sign In to add comment