1.0.0 • Published 6 years ago

@flowkey/functionstack v1.0.0

Weekly downloads
28
License
ISC
Repository
github
Last release
6 years ago

Function Stack

Easily collect and run functions at once.

Quick Start

npm i --save functionstack
import FunctionStack from 'functionstack';

const myFunctions = new FunctionStack();

myFunctions.add((name) => {
  console.log(`Hello ${name}`)
})

myFunctions.add((name) => {
  console.log(`${name}, how are you?`)
})

myFunctions.runAll({name: "Mike"});

// Hello Maik
// Maik, how are you?

Public Methods

  • .add(fct)
  • .runAll(params)
  • .remove(fct)
  • .removeAllFunctions()