object-is-empty
v1.0.0
Published
Checks if an object is empty or not
Downloads
10
Maintainers
Readme
Is-object-empty
Checks if a given object has non-zero number of enumerable properties or not.
Install
$ npm install is-object-empty
Usage
const isObjectEmpty = require("is-object-empty");
const a = { name: "Pegasus", age: 14 };
const b = {};
console.log(isObjectEmpty(a));
//=> false
console.log(isObjectEmpty(b));
//=> true