How to use the object-path.empty function in object-path

To help you get started, we’ve selected a few object-path examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Autodesk / clearx / src / store.js View on Github external
empty (key) {
    objectpath.empty(this.data, key)
    this.handler.changed([key])
  }
  // will insert values in array at given position
github Atomic-Reactor / Reactium / .core / components / Toolkit / reducers.js View on Github external
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 };