es7-is-empty-obj
v1.0.1
Published
Check if object is empty the modern way ⚡
Downloads
8
Maintainers
Readme
es7-is-empty-obj
Check if object is empty the modern way :zap:
Highlights
- Uses the ES7
Object.keys()
- No dependencies
- ~ 5 lines of code
Install
$ npm install es7-is-empty-obj
Usage
const isEmptyObj = require('es7-is-empty-obj');
const objectOne = {};
const objectTwo = {'foo': 'bar'};
isEmptyObj(objectOne);
//=> true
isEmptyObj(objectTwo);
//=> false
API
isEmptyObj(obj)
obj
Type: Object
License
MIT © Antoni Kepinski