Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Icestore from '@ice/store';
import logger from '@ice/store-logger';
import todos from './todos';
const icestore = new Icestore();
const middlewares: ((ctx, next) => {})[] = [];
if (process.env.NODE_ENV !== 'production') {
middlewares.push(logger);
}
icestore.applyMiddleware(middlewares);
const stores = icestore.registerStores({
todos,
});
export default stores;
import Icestore from '@ice/store';
import logger from '@ice/store-logger';
import todos from './todos';
const icestore = new Icestore('todos');
const middlewares = [];
if (process.env.NODE_ENV !== 'production') {
middlewares.push(logger);
}
icestore.applyMiddleware(middlewares);
const stores = icestore.registerStores({
todos,
});
export default stores;