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
- Host: GitHub
- URL: https://github.com/flowkey/functionstack
- Owner: flowkey
- Created: 2014-09-17T12:01:27.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2018-07-20T13:17:07.000Z (almost 8 years ago)
- Last Synced: 2025-09-24T03:36:01.563Z (9 months ago)
- Language: JavaScript
- Size: 45.9 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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()