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

Function toMaxBytes

packages/platform/node-shared/src/NodeStream.ts:566–567  ·  view source on GitHub ↗
(maxBytes: ByteSize.Input | undefined)

Source from the content-addressed store, hash-verified

564const defaultOnError = (error: unknown): Cause.UnknownError => new Cause.UnknownError(error)
565
566const toMaxBytes = (maxBytes: ByteSize.Input | undefined): number | undefined =>
567 maxBytes === undefined || maxBytes === Infinity ? undefined : Number(ByteSize.fromInputUnsafe(maxBytes))

Callers 2

toStringFunction · 0.85
toArrayBufferFunction · 0.85

Calls 1

NumberFunction · 0.50

Tested by

no test coverage detected