rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
16 lines • 405 B
JavaScript
/**
* @public
* Returns true if the argument is not null, undefined or empty. Type narrows to `TArray` where true.
*
* @returns true if the argument is a non-zero length array.
*
* @remarks
* See {@link arrayIsNotEmpty}.
*/
export function arrayIsNotEmpty(items) {
if (items == null) {
return false;
}
return items.length !== 0;
}
//# sourceMappingURL=array-is-not-empty.js.map