util-ex
Version:
Browser-friendly enhanced util fully compatible with standard node.js
21 lines (20 loc) • 489 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
exports.isEmptyObject = isEmptyObject;
/**
* Check if an object is empty.
* @param {Object} obj - The object to be checked.
* @returns {boolean} - Whether the object is empty or not.
*/
function isEmptyObject(obj) {
// eslint-disable-next-line no-unreachable-loop
for (const k in obj) {
return false;
}
return true;
}
;
var _default = exports.default = isEmptyObject;