Skip to content

Commit d8d7e92

Browse files
committed
feat(notempty): add notEmpty function
1 parent 06ef4f0 commit d8d7e92

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ export function empty<T>(array: ArrayLike<T>): boolean {
8383
return array.length === 0;
8484
}
8585

86+
export function notEmpty<T>(array: ArrayLike<T>): boolean {
87+
return array.length > 0;
88+
}
89+
8690
export function reverse<T>(array: ArrayLike<T>): T[] {
8791
const result = copy<T>({length: array.length});
8892
for (let i = 0; i < array.length; ++i) {

0 commit comments

Comments
 (0)