MCPcopy Create free account
hub / github.com/denoland/std / #setBuffer

Method #setBuffer

http/unstable_formdata_encoder_stream.ts:198–202  ·  view source on GitHub ↗
(buffer: Uint8Array, x: Uint8Array)

Source from the content-addressed store, hash-verified

196 }
197
198 #setBuffer(buffer: Uint8Array, x: Uint8Array): Uint8Array {
199 if (buffer.length < x.length) buffer = new Uint8Array(x.length);
200 buffer.set(x);
201 return buffer.subarray(0, x.length);
202 }
203
204 #setString(buffer: Uint8Array, x: string): Uint8Array {
205 if (buffer.length < x.length * 3) buffer = new Uint8Array(x.length * 3);

Callers 1

#handleMethod · 0.95

Calls 1

setMethod · 0.65

Tested by

no test coverage detected