JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 366
  • Score
    100M100P100Q87536F
  • License MIT

create repeating task chains

Package Exports

  • repeat

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (repeat) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

repeat

Looking for Repeat.js?:
This new take on repeat will soon support the same scheduling features as before. However if you are dependent on the old version you can get it here: npm install repeat@0.0.6

Install

From NPM:
npm install repeat

From GitHub:
npm install xist/repeat

Example

The following loop will run all tasks every second.

import repeat from "repeat";

// For ES5 use:
// const repeat = require("repeat").default;

repeat()
  .do(() => console.log("how are you?"))
  .do(() => console.log("good"))
  .every(1000);

Methods

These methods are available.

Method Description
once(?async) Run the tasks once.
every(milliseconds) Run the tasks every n milliseconds.
forever(?async) Run the tasks infinitely.
cancel() Stop execution of tasks.

Contribute

Pull requests are encouraged.