Created
August 6, 2025 04:06
-
-
Save orion55/6e544e305d159a98954c468e81793d26 to your computer and use it in GitHub Desktop.
isEmpty
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 const isEmpty = (value) => { | |
| return ( | |
| value === undefined || | |
| value === null || | |
| (typeof value === "object" && Object.keys(value).length === 0) || | |
| (typeof value === "string" && value.trim().length === 0) | |
| // уберите trim, если строка из одних пробелов для вас не пустая | |
| ); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment