MCPcopy
hub / github.com/pyodide/pyodide / CharacterCodeWriter

Class CharacterCodeWriter

src/js/streams.ts:705–724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703// Writer implementations
704
705class CharacterCodeWriter implements Writer {
706 options: RawWriteHandler;
707 isatty: boolean;
708
709 constructor(options: RawWriteHandler) {
710 this.options = options;
711 this.isatty = !!options.isatty;
712 }
713
714 write(buffer: Uint8Array) {
715 for (let i of buffer) {
716 this.options.raw(i);
717 }
718 return buffer.length;
719 }
720
721 getTerminalSize() {
722 return this.options.getTerminalSize?.();
723 }
724}
725
726class StringWriter implements Writer {
727 out: (a: string) => void;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…