1.1.0 • Published 8 months 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
8 months ago
1.1.0-dev.1
8 months ago
1.1.0
10 months ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago