Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
repeat.ts853 B
/* eslint-disable @typescript-eslint/no-unsafe-argument */ import type { F, L } from 'ts-toolbelt' /** * An accumulable function can be passed its output as input */ export type Accumulable<P, R> = (arg0: R, ...rest: P[]) => R /** * Repeat an {@link Accumulable} function. * * @param f to be repeated until... * @param again return false to exit * @returns * @example * ```ts * // concats `[2]` 10 times on `[1]` * repeat(concat, times(10))([1], [2]) * ``` */ function repeat<P extends L.Update<P, 0, R>, R>(f: (...p: P) => R, again: (...p: F.NoInfer<P>) => boolean) { return (...p: P) => { // ts does not understand const pClone: any = [...p] while (again(...pClone)) { pClone[0] = f(...pClone) } return pClone[0] as R } } function times(n: number) { return () => --n > -1 } export { repeat, times }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prisma/prisma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server