(chunk: Buffer | string)
| 107 | |
| 108 | const timer = setTimeout(() => finish(null), timeoutMs); |
| 109 | const onData = (chunk: Buffer | string) => { |
| 110 | buffer += Buffer.isBuffer(chunk) ? chunk.toString("utf8") : chunk; |
| 111 | const color = parseOsc11BackgroundColor(buffer); |
| 112 | if (color) { |
| 113 | finish(themeModeForBackgroundColor(color)); |
| 114 | } |
| 115 | }; |
| 116 | |
| 117 | input.setRawMode?.(true); |
| 118 | input.resume?.(); |
nothing calls this directly
no test coverage detected