UNPKG

js-essential-kit

Version:

This library provides a comprehensive set of utility functions for various common tasks, including date calculations, formatting, masking, normalizing data, and validation

19 lines (18 loc) 367 B
/** * Check if `array` is not `empty` * * @param array * @returns boolean */ export const isEmpty = <T>(array: T[] | undefined): boolean => { return !array || array.length == 0; }; /** * Check if `array` is not `empty` * * @param array * @returns boolean */ export const isNotEmpty = <T>(array: T[] | undefined): boolean => { return !isEmpty(array); };