Skip to content

Commit

Permalink
fix: improve isEmpty input type to accept readonly array
Browse files Browse the repository at this point in the history
  • Loading branch information
ASafaeirad committed Jun 16, 2024
1 parent 917e5f5 commit 271d112
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/array/isEmpty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
* isEmpty([, null]) // false
* isEmpty([, undefined]) // false
*/
export function isEmpty(x: unknown[]): boolean {
export function isEmpty(x: unknown[] | readonly unknown[]): boolean {
return x.length === 0;
}

0 comments on commit 271d112

Please sign in to comment.