MCPcopy Create free account
hub / github.com/Effect-TS/effect / fileResponseNumber

Function fileResponseNumber

packages/effect/src/http/HttpPlatform.ts:164–173  ·  view source on GitHub ↗
(value: bigint, field: string)

Source from the content-addressed store, hash-verified

162}
163
164const fileResponseNumber = (value: bigint, field: string): Effect.Effect<number, PlatformError> => {
165 const number = Number(value)
166 return Number.isSafeInteger(number)
167 ? Effect.succeed(number)
168 : Effect.fail(badArgument({
169 module: "HttpPlatform",
170 method: "fileResponse",
171 description: `${field} exceeds the safe integer range: ${value}`
172 }))
173}
174
175/**
176 * Provides the default `HttpPlatform` implementation for serving file paths and

Callers 1

HttpPlatform.tsFile · 0.85

Calls 4

badArgumentFunction · 0.90
failMethod · 0.65
NumberFunction · 0.50
succeedMethod · 0.45

Tested by

no test coverage detected