MCPcopy
hub / github.com/facebook/react / byteLengthOfChunk

Function byteLengthOfChunk

packages/react-server/src/ReactServerStreamConfigBun.js:80–82  ·  view source on GitHub ↗
(chunk: Chunk | PrecomputedChunk)

Source from the content-addressed store, hash-verified

78}
79
80export function byteLengthOfChunk(chunk: Chunk | PrecomputedChunk): number {
81 return Buffer.byteLength(chunk, 'utf8');
82}
83
84export function byteLengthOfBinaryChunk(chunk: BinaryChunk): number {
85 return chunk.byteLength;

Callers 2

finishedSegmentFunction · 0.90
emitTextChunkFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected