lab-statecontainer
v1.2.0
Published
What is it? =========== Collection of state related handler functions with namespacing.
Downloads
3
Readme
What is it?
Collection of state related handler functions with namespacing.
Example
const stateContainer = require('lab-statecontainer');
const connections = stateContainer.store('connections');
const connectionUrl = 'amqp://localhost:9000';
const connection = connections.cachedResult(connectionUrl, getConnector(connectionUrl));
function getConnector(connectionUrl) {
return async() => {
return await amqp.connect(connectionUrl);
}
}