Function parseStringList

  • Parses a string into a CronList.

    Example

    parseStringListSeconds("13,10"); // [13, 10]
    parseStringListSeconds("13-10,10"); // [{ from: 13, to: 10 }, 10]
    parseStringListSeconds("13/10,10"); // [{ every: 10, start: 13 }, 10]
    parseStringListSeconds("13-10/10,10"); // [{ every: 10, start: { from: 13, to: 10 } }, 10]
    parseStringListSeconds("?/10,10"); // [{ every: 10, start: "?" }, 10]
    parseStringListSeconds("13,INVALID"); // undefined
    parseStringListSeconds("INVALID"); // undefined

    Returns

    Curried function with limit in context.

    Parameters

    • limit: LimitTuple

      LimitTuple to be used when parsing CronSteps.

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