From d8d7e9242b773c29bae333812394329d82b06c98 Mon Sep 17 00:00:00 2001 From: Daniel Cassidy Date: Mon, 19 Apr 2021 22:38:54 +0100 Subject: [PATCH] feat(notempty): add notEmpty function --- index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.ts b/index.ts index e8dd5ab1..8aed93b9 100644 --- a/index.ts +++ b/index.ts @@ -83,6 +83,10 @@ export function empty(array: ArrayLike): boolean { return array.length === 0; } +export function notEmpty(array: ArrayLike): boolean { + return array.length > 0; +} + export function reverse(array: ArrayLike): T[] { const result = copy({length: array.length}); for (let i = 0; i < array.length; ++i) {