Skip to content

Commit

Permalink
feat(notempty): add notEmpty function
Browse files Browse the repository at this point in the history
  • Loading branch information
djcsdy committed Apr 19, 2021
1 parent 06ef4f0 commit d8d7e92
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ export function empty<T>(array: ArrayLike<T>): boolean {
return array.length === 0;
}

export function notEmpty<T>(array: ArrayLike<T>): boolean {
return array.length > 0;
}

export function reverse<T>(array: ArrayLike<T>): T[] {
const result = copy<T>({length: array.length});
for (let i = 0; i < array.length; ++i) {
Expand Down

0 comments on commit d8d7e92

Please sign in to comment.