Skip to content

Commit 94693b9

Browse files
committed
jsdoc.
1 parent ac7d133 commit 94693b9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

express-zod-api/src/common-helpers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,13 @@ export const isSchema = <T extends z.core.$ZodType = z.core.$ZodType>(
109109
"_zod" in subject &&
110110
(type ? R.path(["_zod", "def", "type"], subject) === type : true);
111111

112+
/** Configurable replacement for R.xprod() */
112113
export const combinations = <T>(
113114
left: T[],
114115
right: T[],
116+
/** @desc The function that combines elements */
115117
merge: (a: T, b: T) => T,
118+
/** @desc Maximum number of combinations to generate, only applies to non-empty arrays */
116119
limit = Infinity,
117120
): T[] => {
118121
if (!left.length || !right.length) return left.concat(right);

0 commit comments

Comments
 (0)