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

Function mapInput

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

Source from the content-addressed store, hash-verified

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

Callers 1

useTextInputFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected