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

Function format

packages/effect/src/Cron.ts:643–651  ·  view source on GitHub ↗
(cron: Cron, options?: {
  readonly includeSeconds?: boolean | undefined
})

Source from the content-addressed store, hash-verified

641 * @since 4.0.0
642 */
643export const format = (cron: Cron, options?: {
644 readonly includeSeconds?: boolean | undefined
645}): string => {
646 const segments = [cron.seconds, cron.minutes, cron.hours, cron.days, cron.months, cron.weekdays]
647 .map(formatSegment)
648 return (
649 options?.includeSeconds !== true && cron.seconds.size === 1 && cron.seconds.has(0) ? segments.slice(1) : segments
650 ).join(" ")
651}
652
653const formatSegment = (values: ReadonlySet<number>): string => {
654 if (values.size === 0) {

Callers 15

toStringFunction · 0.90
formatInputFunction · 0.90
constructorMethod · 0.90
toStringFunction · 0.90
toStringFunction · 0.90
toStringFunction · 0.90
toStringUnknownFunction · 0.90
toStringFunction · 0.90
toStringFunction · 0.90
isPatternFunction · 0.90
isStartsWithFunction · 0.90
isEndsWithFunction · 0.90

Calls 3

joinMethod · 0.80
mapMethod · 0.45
hasMethod · 0.45

Tested by

no test coverage detected