(cron: Cron, options?: {
readonly includeSeconds?: boolean | undefined
})
| 717 | * @since 4.0.0 |
| 718 | */ |
| 719 | export const format = (cron: Cron, options?: { |
| 720 | readonly includeSeconds?: boolean | undefined |
| 721 | }): string => { |
| 722 | const segments = [cron.seconds, cron.minutes, cron.hours, cron.days, cron.months, cron.weekdays] |
| 723 | .map(formatSegment) |
| 724 | return ( |
| 725 | options?.includeSeconds !== true && cron.seconds.size === 1 && cron.seconds.has(0) ? segments.slice(1) : segments |
| 726 | ).join(" ") |
| 727 | } |
| 728 | |
| 729 | const formatSegment = (values: ReadonlySet<number>): string => { |
| 730 | if (values.size === 0) { |
no test coverage detected