statecontainer
v2.0.0
Published
Simple state container
Downloads
8
Readme
Simple object state container.
Example
const stateContainer = require('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);
}
}