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

Function processNumberClear

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

Source from the content-addressed store, hash-verified

3077}
3078
3079const processNumberClear = (state: NumberState) =>
3080 Effect.succeed(Action.NextFrame({
3081 state: { ...state, cursor: 0, value: "", error: Option.none() }
3082 }))
3083
3084// `${-0}` is "0", which would drop a minus sign the user just typed.
3085const formatNumberInput = (value: number): string => Object.is(value, -0) ? "-0" : `${value}`

Callers 2

handleProcessIntegerFunction · 0.85
handleProcessFloatFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected