es7-is-empty-obj

    1.0.1 • Public • Published

    es7-is-empty-obj Build Status

    Check if object is empty the modern way ⚡️

    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

    Install

    npm i es7-is-empty-obj

    DownloadsWeekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.44 kB

    Total Files

    5

    Last publish

    Collaborators

    • akepinski