MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / inputToString

Function inputToString

source code/ink/parse-keypress.ts:198–213  ·  view source on GitHub ↗
(input: Buffer | string)

Source from the content-addressed store, hash-verified

196}
197
198function inputToString(input: Buffer | string): string {
199 if (Buffer.isBuffer(input)) {
200 if (input[0]! > 127 && input[1] === undefined) {
201 ;(input[0] as unknown as number) -= 128
202 return '\x1b' + String(input)
203 } else {
204 return String(input)
205 }
206 } else if (input !== undefined && typeof input !== 'string') {
207 return String(input)
208 } else if (!input) {
209 return ''
210 } else {
211 return input
212 }
213}
214
215export function parseMultipleKeypresses(
216 prevState: KeyParseState,

Callers 1

parseMultipleKeypressesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected