14 lines
206 B
JavaScript
14 lines
206 B
JavaScript
/**
|
|
* Check if object is empty
|
|
* @param {Object} obj
|
|
*
|
|
* @return {Boolean}
|
|
*/
|
|
export const isEmpty = (obj) => {
|
|
if (!obj) {
|
|
return true;
|
|
}
|
|
|
|
return Object.keys(obj).length === 0;
|
|
};
|