@arijitdn/task-repeater
v1.0.3
Published
A tool for repeating any tasks for an amount of time.
Downloads
3
Readme
Task Repeater
A promise based tool which will repeat your tasks a defined amount of times
Prerequisites
This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.
$ npm -v && node -v
6.4.1
v8.16.0
Table of contents
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Installation
BEFORE YOU INSTALL: please read the prerequisites
Start with cloning this repo on your local machine:
$ git clone https://github.com/arijitdn/task-repeater.git
$ cd task-repeater
To install and set up the library, run:
$ npm install @arijitdn/task-repeater
Or if you prefer using Yarn:
$ yarn add @arijitdn/task-repeater
Usage
Example 1:
const { repeatTask } = require("@arijitdn/task-repeater");
const n = 10;
function task() {
console.log("Hello World\n");
}
repeatTask(task, n);
Example 2:
const { repeatTask } = require("@arijitdn/task-repeater");
repeatTask(() => {
console.log("Hello World\n");
}, 10);
Built With
- NodeJS
Authors
- Arijit Debnath - Developer - Arijit Debnath
License
Apache 2.0 © Arijit Debnath