1.1.0 • Published 2 years ago
finally-provider v1.1.0
Finally Provider
Register functions for execution at a later time.
Installation
npm i finally-provider
Usage
Provides the ability to register functions, that should be executed before shutdown.
const finalProv = new FinallyProvider({
onError: console.log,
});
//Execute where needed
finalProv.finally(() => {
console.log("Clean up stuff here.");
});
//Execute just before shutdown
finalProv.runFinally().then(() => {
console.log("Ready to exit.");
});
Known issues
Related work
License
MIT
1.1.0-dev.2
2 years ago
1.1.0-dev.1
2 years ago
1.1.0
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago