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

Function formatNumberInput

packages/effect/src/cli/Prompt.ts:3085–3085  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

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}`
3086
3087const defaultIntProcessor = (input: string, state: NumberState) => {
3088 if (state.value.length === 0 && input === "-") {

Callers 2

defaultIntProcessorFunction · 0.85
defaultFloatProcessorFunction · 0.85

Calls 1

isMethod · 0.65

Tested by

no test coverage detected