nuǝɯ pǝɥsᴉꞁod mǝu

    @typedninja/pullable-cron
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    @typedninja/pullable-cron

    Cron transformations for @typedninja/pullable

    Install

    $ yarn add @typedninja/pullable-cron
    
    $ npm install --save @typedninja/pullable-cron
    

    Usage

    Provides the cron transformer which allows you to delay and repeat iteration by providing a cron-like expression.

    Also see the API documentation.

    import { from } from "@typedninja/pullable";
    import { cron } from "@typedninja/pullable-cron";
    
    const cronified = from([ 1, 2, 3, 4 ]).pipe(
      cron("* * * * * *"),
    );
    
    for await (const num of cronified) {
      console.log(num);
    }

    This transformer uses cron-parser under the hood and like that module also accepts an options parameter. See the cron-parser documentation for more information about allowed options.

    const cronified = from([ 1, 2, 3, 4 ]).pipe(
      cron("* * * * * *", { currentDate: new Date() }),
    );

    License

    MIT

    See also

    Install

    npm i @typedninja/pullable-cron

    DownloadsWeekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    7.66 kB

    Total Files

    8

    Last publish

    Collaborators

    • typedninja