Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

repeat

1.2.0 • Public • Published

repeat

Install

npm install repeat

Example

The following loop will run all tasks every second.

import repeat from "repeat";
// const repeat = require("repeat");
 
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.

Install

npm i repeat

DownloadsWeekly Downloads

1,147

Version

1.2.0

License

MIT

Unpacked Size

8.86 kB

Total Files

16

Last publish

Collaborators

  • avatar