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

Function processDateNext

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

Source from the content-addressed store, hash-verified

1826}
1827
1828const processDateNext = (state: DateState) => {
1829 const next = state.dateParts[state.cursor].nextPart()
1830 const cursor = Option.match(next, {
1831 onNone: () => state.dateParts.findIndex((part) => !part.isToken()),
1832 onSome: (next) => state.dateParts.indexOf(next)
1833 })
1834 return Action.NextFrame({
1835 state: { ...state, typed: "", cursor }
1836 })
1837}
1838
1839const defaultDateProcessor = (value: string, state: DateState) => {
1840 if (/\d/.test(value)) {

Callers 1

handleDateProcessFunction · 0.85

Calls 1

isTokenMethod · 0.80

Tested by

no test coverage detected