kofiloop
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

KofiLoop

Fast and powered loops under caffeine.

Build Status FOSSA Status

Getting Started

Installation

Install via NPM:

$ npm install kofiloop

How to use

Add this at the top of your module's file:

var kofiloop = require('kofiloop');

or this if you're using TypeScript or another ES6 preprocessor:

import * as kofiloop from 'kofiloop';

After that, you will be able to create your first loop:

// We starts the loop every 1000ms (= 1 second).
kofiloop.startLoop(function(){
    console.log("Looped " + this.step + " times");
}, 1000)

// When the loop looped 100 times, we stop it.
.on('step-100', function(loop) {
    loop.stop();
})

// When the loop ends, we log.
.end(function(){
	console.log("The loop is stopped.");    
});

Documentation

The documentation is available at kofiloop.js.org.

Built With

  • TypeScript - A typed superset of JavaScript.
  • TypeDoc - A documentation generator for TypeScript projects.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

/kofiloop/

    Package Sidebar

    Install

    npm i kofiloop

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    1.85 MB

    Total Files

    26

    Last publish

    Collaborators

    • norech