MCPcopy Create free account
hub / github.com/Effect-TS/effect / processBackspace

Function processBackspace

packages/cli/src/internal/prompt/number.ts:147–155  ·  view source on GitHub ↗
(state: State)

Source from the content-addressed store, hash-verified

145}
146
147function processBackspace(state: State) {
148 if (state.value.length <= 0) {
149 return Effect.succeed(Action.Beep())
150 }
151 const value = state.value.slice(0, state.value.length - 1)
152 return Effect.succeed(Action.NextFrame({
153 state: { ...state, value, error: Option.none() }
154 }))
155}
156
157function defaultIntProcessor(state: State, input: string) {
158 if (state.value.length === 0 && input === "-") {

Callers 2

handleProcessIntegerFunction · 0.70
handleProcessFloatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…