MCPcopy
hub / github.com/claude-code-best/claude-code / mapInput

Function mapInput

src/hooks/useTextInput.ts:32–37  ·  view source on GitHub ↗
(input_map: Array<[string, InputHandler]>)

Source from the content-addressed store, hash-verified

30type InputMapper = (input: string) => MaybeCursor
31const NOOP_HANDLER: InputHandler = () => {}
32function mapInput(input_map: Array<[string, InputHandler]>): InputMapper {
33 const map = new Map(input_map)
34 return function (input: string): MaybeCursor {
35 return (map.get(input) ?? NOOP_HANDLER)(input)
36 }
37}
38
39export type UseTextInputProps = {
40 value: string

Callers 1

useTextInputFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected