MCPcopy Index your code
hub / github.com/codeaashu/claude-code / inputToString

Function inputToString

src/ink/parse-keypress.ts:196–211  ·  view source on GitHub ↗
(input: Buffer | string)

Source from the content-addressed store, hash-verified

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

Callers 1

parseMultipleKeypressesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected