Function parseStringSteps

  • Parses a string into a CronSteps.

    Example

    const parseSecondsSteps = parseStringSteps([0, 59])(parseStringSecondsValue);

    parseSecondsSteps("13/10"); // { every: 10, start: 13 }
    parseSecondsSteps("13-10/10"); // { every: 10, start: { from: 13, to: 10 } }
    parseSecondsSteps("?/10"); // { every: 10, start: "?" }
    parseSecondsSteps("13"); // undefined

    Returns

    Curried function with limit in context.

    Parameters

    Returns (<Value>(parser: StringValueParser<Value>) => ((source: string) => Maybe<CronSteps<Value>>))