Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const transformer = createFluxibleRouteTransformer({
actions: actionsInterface.getActions()
});
/**
* Creates a RouteStore.
*
* @class
*/
export function RouteStore () {
FluxibleRouteStore.apply(this, arguments);
}
inherits(RouteStore, FluxibleRouteStore);
RouteStore.storeName = FluxibleRouteStore.storeName;
RouteStore.handlers = FluxibleRouteStore.handlers;
/**
* Dehydrates this object to state.
* Transforms routes to json.
*
* @returns {Object} The RouteStore represented as state.
*/
RouteStore.prototype.dehydrate = function dehydrate () {
const state = FluxibleRouteStore.prototype.dehydrate.apply(this, arguments);
state.routes = transformer.fluxibleToJson(state.routes);
return state;
};
/**
* Rehydrates this object from state.
var transformer = require('../utils').createFluxibleRouteTransformer({
actions: require('../actions/interface')
});
/**
* Creates a RouteStore.
*
* @class
*/
function RouteStore () {
FluxibleRouteStore.apply(this, arguments);
}
inherits(RouteStore, FluxibleRouteStore);
RouteStore.storeName = FluxibleRouteStore.storeName;
RouteStore.handlers = FluxibleRouteStore.handlers;
/**
* Dehydrates this object to state.
* Transforms routes to json.
*
* @returns {Object} The RouteStore represented as state.
*/
RouteStore.prototype.dehydrate = function dehydrate () {
var state = FluxibleRouteStore.prototype.dehydrate.apply(this, arguments);
state.routes = transformer.fluxibleToJson(state.routes);
return state;
};
/**
* Rehydrates this object from state.