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

Function defaultDateProcessor

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

Source from the content-addressed store, hash-verified

1675}
1676
1677const defaultDateProcessor = (value: string, state: DateState) => {
1678 if (/\d/.test(value)) {
1679 const typed = state.typed + value
1680 state.dateParts[state.cursor].setValue(typed)
1681 return Action.NextFrame({
1682 state: { ...state, typed }
1683 })
1684 }
1685 return Action.Beep()
1686}
1687
1688const defaultLocales: DateOptionsReq["locales"] = {
1689 months: [

Callers 1

handleDateProcessFunction · 0.85

Calls 1

setValueMethod · 0.45

Tested by

no test coverage detected