Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
empty (key) {
objectpath.empty(this.data, key)
this.handler.changed([key])
}
// will insert values in array at given position
case deps().actionTypes.TOOLKIT_MOUNT:
return { ...state, ...action.data, manifest };
case deps().actionTypes.TOOLKIT_NAV:
case deps().actionTypes.UPDATE_ROUTE:
const { group = null, element = null } = action.params;
return { ...state, group, element };
case deps().actionTypes.TOOLKIT_PREF:
newState = { ...state, update: Date.now() };
const karry = action.key.split('.');
const all = karry.pop();
if (all === 'all') {
op.empty(newState, karry.join('.'), null);
}
op.set(newState, action.key, action.value);
return newState;
case deps().actionTypes.TOOLKIT_THEME:
return { ...state, style: action.theme, update: Date.now() };
case deps().actionTypes.TOOLKIT_MENU_TOGGLE:
const { animating = false } = state;
return { ...state, animating: !animating, update: Date.now() };
case deps().actionTypes.TOOLKIT_NOTICE_UPDATE:
delete action.params.elm;
return { ...state, notify: action.params };