UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

22 lines (20 loc) 366 B
import { dfdlT } from "@monstermann/dfdl"; //#region src/array/isEmpty.ts /** * `isEmpty(array)` * * Returns `true` if `array` has no elements, otherwise returns `false`. * * ```ts * isEmpty([]); // true * ``` * * ```ts * pipe([], isEmpty()); // true * ``` */ const isEmpty = dfdlT((target) => { return target.length === 0; }, 1); //#endregion export { isEmpty };