mirror of
https://github.com/mmahdium/portfolio.git
synced 2025-12-20 09:23:54 +01:00
10 lines
220 B
TypeScript
10 lines
220 B
TypeScript
// like `any` in Python
|
|
export const any = (iterable: any[]): boolean => {
|
|
return iterable.some(Boolean)
|
|
}
|
|
|
|
// like `all` in Python
|
|
export const all = (iterable: any[]): boolean => {
|
|
return iterable.every(Boolean)
|
|
}
|