Socket
Book a DemoInstallSign in
Socket

es7-is-empty-obj

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es7-is-empty-obj

Check if object is empty the modern way ⚡

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

es7-is-empty-obj Build Status

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

Keywords

es7-is-empty-obj

FAQs

Package last updated on 03 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts