MCPcopy
hub / github.com/prisma/prisma / notSupportOnBrowser

Function notSupportOnBrowser

packages/client-generator-js/src/TSClient/common.ts:108–117  ·  view source on GitHub ↗
(fnc: string, browser?: boolean)

Source from the content-addressed store, hash-verified

106`
107
108export const notSupportOnBrowser = (fnc: string, browser?: boolean) => {
109 if (browser) {
110 return `() => {
111 const runtimeName = getRuntime().prettyName;
112 throw new Error(\`${fnc} is unable to run in this browser environment, or has been bundled for the browser (running in \${runtimeName}).
113In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`,
114)}`
115 }
116 return fnc
117}
118
119export const commonCodeTS = ({
120 runtimeBase,

Callers 1

commonCodeJSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected