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

Function previousPart

packages/cli/src/internal/prompt/date.ts:415–421  ·  view source on GitHub ↗

* Retrieves the previous date part in the list of parts.

()

Source from the content-addressed store, hash-verified

413 * Retrieves the previous date part in the list of parts.
414 */
415 previousPart(): Option.Option<DatePart> {
416 return Arr.findFirstIndex(this.parts, (part) => part === this).pipe(
417 Option.flatMap((currentPartIndex) =>
418 Arr.findLast(this.parts.slice(0, currentPartIndex), (part) => !part.isToken())
419 )
420 )
421 }
422
423 toString() {
424 return String(this.date)

Callers

nothing calls this directly

Calls 2

isTokenMethod · 0.80
pipeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…