2.4.8 • Published 5 years ago

@unsc/loop v2.4.8

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

loop

npm.io npm.io npm.io npm.io

install

npm install --save @unsc/loop

usage

The following loop will run all tasks once, in place.

import loop from "@unsc/loop";

loop()
  .do(() => console.log("how are you?"))
  .do(() => console.log("good"))
  .once();

methods

These methods are available to Loop objects.

MethodDescription
once(?async)Perform the loop once.
forever(?async)Perform the loop infinitely.
cancel()Cancel a forever loop.

async or sync

By default all loops are synchronous, however it is easy to change that.
Simply pass a boolean to the .once or .forever methods, for an asynchronous loop use true.

contribute

Pull requests are encouraged.

2.4.8

5 years ago

2.4.7

5 years ago

2.4.6

5 years ago

2.3.6

5 years ago

2.3.5

5 years ago

2.3.4

5 years ago