- move SlateEditor and dependencies to its own folder
- remove Immutable
- remove redux-persist-immutable
- remobe redux-immutable
- update libraries
- added tests on store manipulations (accessor and reducers)
import * as R from 'ramda';
import { ActionEnum } from '../constants';
export const getId = R.prop('_id');
export const idEq = R.propEq('_id');
export const setAction = actionEnum => R.flip(R.merge)({action: actionEnum})
export const getNewAction = action => {
switch (action) {
case ActionEnum.CREATED:
return ActionEnum.CREATED;
case ActionEnum.DELETED: // should not happen, but...
return ActionEnum.DELETED;
default:
return ActionEnum.UPDATED;
}
}