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

Function defaultDateProcessor

packages/effect/src/cli/Prompt.ts:1839–1848  ·  view source on GitHub ↗
(value: string, state: DateState)

Source from the content-addressed store, hash-verified

1837}
1838
1839const defaultDateProcessor = (value: string, state: DateState) => {
1840 if (/\d/.test(value)) {
1841 const typed = state.typed + value
1842 state.dateParts[state.cursor].setValue(typed)
1843 return Action.NextFrame({
1844 state: { ...state, typed }
1845 })
1846 }
1847 return Action.Beep()
1848}
1849
1850const defaultLocales: DateOptionsReq["locales"] = {
1851 months: [

Callers 1

handleDateProcessFunction · 0.85

Calls 1

setValueMethod · 0.45

Tested by

no test coverage detected