const engine = require('store/src/store-engine');
const storages = [
    require('store/storages/sessionStorage')
];
const plugins = [
    require('store/plugins/defaults'),
    require('store/plugins/expire')
];
const store = engine.createStore(storages, plugins);

module.exports = {
    get: (...params) => {
        return store.enabled ? store.get(...params) : false;
    },

    set: (...params) => {
        return store.enabled ? store.set(...params, new Date().getTime() + 180000) : false;
    }
};