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

Function processNumberBackspace

packages/effect/src/unstable/cli/Prompt.ts:2841–2849  ·  view source on GitHub ↗
(state: NumberState)

Source from the content-addressed store, hash-verified

2839})
2840
2841const processNumberBackspace = (state: NumberState) => {
2842 if (state.value.length <= 0) {
2843 return Effect.succeed(Action.Beep())
2844 }
2845 const value = state.value.slice(0, state.value.length - 1)
2846 return Effect.succeed(Action.NextFrame({
2847 state: { ...state, value, error: Option.none() }
2848 }))
2849}
2850
2851const processNumberClear = (state: NumberState) =>
2852 Effect.succeed(Action.NextFrame({

Callers 2

handleProcessIntegerFunction · 0.85
handleProcessFloatFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected