Skip to main content

isEmpty

Callable

  • isEmpty(value: unknown): boolean

  • Returns true if an object has no properties, an array has no items, or the value is falsy, otherwise, it returns false.

    import { isEmpty } from '@boost/common';

    isEmpty({}); // true
    isEmpty({ name: 'Boost' }); // false

    isEmpty([]); // true
    isEmpty(['Boost']); // false