JSPM

is-obj-empty

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q26329F
  • License MIT

Check if an object is empty

Package Exports

  • is-obj-empty

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-obj-empty) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-obj-empty

npm typescript GitHub stars Twitter Follow

Check if an object is empty.

Installation

yarn add is-obj-empty
npm install is-obj-empty

API

Usage

import isEmpty from "is-obj-empty";

isEmpty({}); // true
isEmpty({ a: undefined }); // false
isEmpty({ a: true }); // false

isEmpty([]); // true
isEmpty([undefined]); // false
isEmpty([true]); // false

Types

import isEmpty, { AnyObject } from "is-obj-empty";

function isEmpty(object: AnyObject): boolean;

type AnyObject = {
  [index in string | number]: any;
}

Dev DependenciesDavid

License license

MIT