MCPcopy
hub / github.com/nodejs/undici / write

Method write

lib/cache/sqlite-cache-store.js:325–335  ·  view source on GitHub ↗
(chunk, encoding, callback)

Source from the content-addressed store, hash-verified

323 return new Writable({
324 decodeStrings: true,
325 write (chunk, encoding, callback) {
326 size += chunk.byteLength
327
328 if (size <= store.#maxEntrySize) {
329 body.push(chunk)
330 } else {
331 this.destroy()
332 }
333
334 callback()
335 },
336 final (callback) {
337 store.set(key, { ...value, body })
338 callback()

Callers

nothing calls this directly

Calls 2

pushMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected