An open API service indexing awesome lists of open source software.

https://github.com/flowkey/functionstack

Meteor package for gathering and running functions
https://github.com/flowkey/functionstack

Last synced: 5 months ago
JSON representation

Meteor package for gathering and running functions

Awesome Lists containing this project

README

          

# Function Stack
Easily collect and run functions at once.

## Quick Start

```
npm i --save @flowkey/functionstack
```

```js
import FunctionStack from '@flowkey/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()