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

Function processDateNext

packages/effect/src/unstable/cli/Prompt.ts:1666–1675  ·  view source on GitHub ↗
(state: DateState)

Source from the content-addressed store, hash-verified

1664}
1665
1666const processDateNext = (state: DateState) => {
1667 const next = state.dateParts[state.cursor].nextPart()
1668 const cursor = Option.match(next, {
1669 onNone: () => state.dateParts.findIndex((part) => !part.isToken()),
1670 onSome: (next) => state.dateParts.indexOf(next)
1671 })
1672 return Action.NextFrame({
1673 state: { ...state, cursor }
1674 })
1675}
1676
1677const defaultDateProcessor = (value: string, state: DateState) => {
1678 if (/\d/.test(value)) {

Callers 1

handleDateProcessFunction · 0.85

Calls 1

isTokenMethod · 0.80

Tested by

no test coverage detected