Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.06 KB

arraybuffer-sink.md

File metadata and controls

33 lines (21 loc) · 1.06 KB

arraybuffer-sink

Source: quickjs-arraybuffer-sink.c — module export: ArrayBufferSink

An incremental byte accumulator (Bun-style ArrayBufferSink): write chunks, then collect everything as a single ArrayBuffer.

Constructor

new ArrayBufferSink([options])   // length 1

Methods / properties

Member Args Kind Description
write(chunk) 1 method Appends chunk (string/ArrayBuffer/typed array); returns bytes written.
flush() 0 method Returns the bytes accumulated so far and resets the buffer.
end() 0 method Finalizes the sink and returns the complete ArrayBuffer.
size — getter Number of bytes currently buffered.

Export list

Generated by utilities/doc-api.js from the arraybuffer_sink dump of utilities/api-surface.sh: 8 members. Edit the text above this block, not the block.

ArrayBufferSink

class, constructible

  • methods: end(), flush(), write(), [Symbol.for('qjs.dynbuf')]()
  • properties: size (get), [Symbol.toStringTag]