Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-ba committed Apr 22, 2024
1 parent 6ce2622 commit 1344e31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/array/operator/allCombinations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export function allCombinations<A, B, C, D, E, F, G>(a: A[], b: B[], c: C[], d:
export function allCombinations<A, B, C, D, E, F, G, H>(a: A[], b: B[], c: C[], d: D[], e: E[], f: F[], g: G[], h: H[]): [A, B, C, D, E, F, G, H][];

export function allCombinations(...arrays: unknown[][]): unknown[][] {
if (arrays.length === 0) return [];
if (arrays.length === 0) {
return [];
}
const fn = ([head, ...tail]: unknown[][]): unknown[][] =>
tail.length
? pipe(fn, allPairs(head), map(([h, t]) => [h, ...t]))(tail)
Expand Down
2 changes: 1 addition & 1 deletion src/array/operator/cartesian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function cartesian(...arrays: unknown[][]): unknown[][] {
let res: any[] = allCombinations(...arrays);

for (let i = arrays.length - 1; i > 0; i--) {
let size = arrays[i].length;
const size = arrays[i].length;
res = chunkBySize(size)(res);
}
return res;
Expand Down

0 comments on commit 1344e31

Please sign in to comment.