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

Function mapInput

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

Source from the content-addressed store, hash-verified

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

Callers 1

useTextInputFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected