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
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 Dependencies
- @bconnorwhite/bob: Bob is a toolkit for TypeScript projects
- jest: Delightful JavaScript Testing.