Skip to main content

isEmpty

Checks if value is an empty object or collection.

API

function isEmpty(value?: any): boolean;

Usage

import { isEmpty } from '@jtmdias/js-utilities';

isEmpty(null)
// true

isEmpty('')
// true

isEmpty({})
// true

isEmpty([])
// true

isEmpty({a: '1'})
// false