Function parseCronList

  • Parses CronList into a string.

    Example

    const parseCronSecondsList = parseCronList([0, 59])(parseCronSecondsValue);

    parseCronSecondsList([13, 10]); // "13,10",
    parseCronSecondsList([{ from: 13, to: 10 }, 10]); // "13-10,10",
    parseCronSecondsList([{ every: 10, start: 13 }, 10]); // "13/10,10",
    parseCronSecondsList([{ every: 10, start: { from: 13, to: 10 } }, 10]); // "13-10/10,10"
    parseCronSecondsList([{ every: 10, start: "L" }, 10]); // "L/10,10"
    parseCronSecondsList([]); // undefined

    Returns

    Curried function with limit on context.

    Parameters

    • limit: LimitTuple

      LimitTuple to be used when parsing CronSteps.

    Returns (<Value>(parser: CronValueParser<Value>) => ((source: CronList<Value>) => undefined | string))

      • <Value>(parser: CronValueParser<Value>): ((source: CronList<Value>) => undefined | string)
      • Type Parameters

        • Value

        Parameters

        Returns ((source: CronList<Value>) => undefined | string)

          • (source: CronList<Value>): undefined | string
          • Parameters

            Returns undefined | string