@flowkey/functionstack

1.0.0 • Public • Published

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()

/@flowkey/functionstack/

    Package Sidebar

    Install

    npm i @flowkey/functionstack

    Weekly Downloads

    61

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    3.78 kB

    Total Files

    3

    Last publish

    Collaborators

    • flowkey_dev
    • nerdmed
    • michaelknoch
    • ephemer
    • rikner
    • mouselangelo