MCPcopy Index your code
hub / github.com/nodejs/node / uppercaseChunk

Function uppercaseChunk

benchmark/fs/bench-filehandle-pull-vs-webstream.js:56–63  ·  view source on GitHub ↗
(chunk)

Source from the content-addressed store, hash-verified

54
55// Stateless uppercase transform (shared by all paths)
56function uppercaseChunk(chunk) {
57 const buf = Buffer.allocUnsafe(chunk.length);
58 for (let i = 0; i < chunk.length; i++) {
59 const b = chunk[i];
60 buf[i] = (b >= 0x61 && b <= 0x7a) ? b - 0x20 : b;
61 }
62 return buf;
63}
64
65// ---------------------------------------------------------------------------
66// Classic streams path: createReadStream -> Transform (upper) -> createGzip

Callers 2

transformFunction · 0.85
upperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected