js-loop

1.0.1 • Public • Published

js-loop

npm npm

Flexible configuration of looping tool

Installation

npm install --save js-loop

Usage

import loop from "js-loop";

const loopInst = loop({
  run: yourFunction,
  args: arguments, which is using in yourFunction (not required)
  threshhold: 1000
});

Execute the loop instance

loopInst.start();

Cancel the loop instance

loopInst.cancel();

If execute a loop instance immediatly, provide second param true of the loop contructor.

const loopInst = loop({...}, true);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0

Package Sidebar

Install

npm i js-loop

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

2.38 kB

Total Files

4

Last publish

Collaborators

  • kwange