MCPcopy Create free account
hub / github.com/Noumena-Network/code / inputEventForRaw

Function inputEventForRaw

src/ink/events/input-event.test.ts:5–10  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

3import { InputEvent } from './input-event.js'
4
5function inputEventForRaw(raw: string): InputEvent {
6 const [events] = parseMultipleKeypresses(INITIAL_STATE, raw)
7 const event = events[0]
8 expect(event?.kind).toBe('key')
9 return new InputEvent(event as ParsedKey)
10}
11
12describe('InputEvent', () => {
13 it('maps raw LF to Ctrl+J rather than the return submit signal', () => {

Callers 1

Calls 1

parseMultipleKeypressesFunction · 0.85

Tested by

no test coverage detected