Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
flatten.ts642 B
/* eslint-disable @typescript-eslint/no-unsafe-argument */ import type { L } from 'ts-toolbelt' import { concat } from './concat' import { reduce } from './reduce' function wrap(item: unknown) { return Array.isArray(item) ? item : [item] } /** * Returns a new array with all sub-array elements concatenated. * (more efficient than native flat) * * @param list * @returns */ function flatten<T extends L.List, I>(list: T & L.List<I>): Flatten<T> { return reduce(list, (acc, item) => concat(acc, wrap(item)), [] as any[]) } type Flatten<L extends L.List, I = L[number]> = (I extends L.List ? I[number] : I)[] export { flatten }

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