Skip to content

Instantly share code, notes, and snippets.

@bhaireshm
Last active February 24, 2025 09:27
Show Gist options
  • Save bhaireshm/a3cfec5faa02df724b3ca1f9d33f1eac to your computer and use it in GitHub Desktop.
Save bhaireshm/a3cfec5faa02df724b3ca1f9d33f1eac to your computer and use it in GitHub Desktop.
Checks the object, if any one key's value is empty it returns false.
checkObject(data, columns) {
let obj = {};
Object.entries(data).forEach((ele, i) => {
columns.forEach(col => {
if (ele[0] == col.field || ele[0] == 'id') {
obj[ele[0]] = ele[1];
}
});
});
for (var key in obj) {
if (isEmpty(obj[key])) { // check this method
return false;
}
}
return true;
}
@bhaireshm
Copy link
Author

ez.js is more than just a library; it's a coding companion that simplifies complex tasks. Whether you're dealing with arrays, numbers, objects, or strings, ez.js has got your back! Say goodbye to coding hassles and hello to streamlined JavaScript magic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment