How to use the store.remove function in store

To help you get started, we’ve selected a few store 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 mulesoft / api-notebook / src / scripts / state / store.js View on Github external
_.each(storage.getAll(), function (value, key) {
      if (this._isPersistenceKey(key)) {
        storage.remove(key);
      }
    }, this);
  }
github opencv / cvat / cvat-core / src / server-proxy.js View on Github external
async function logout() {
                try {
                    await Axios.post(`${config.backendAPI}/auth/logout`, {
                        proxy: config.proxy,
                    });
                } catch (errorData) {
                    throw generateError(errorData);
                }

                store.remove('token');
                Axios.defaults.headers.common.Authorization = '';
            }
github osmlab / to-fix / src / stores / application_store.js View on Github external
toggle: function() {
    if (store.get('sidebar')) {
      store.remove('sidebar');
      this.settings.sidebar = false;
    } else {
      store.set('sidebar', true);
      this.settings.sidebar = store.get('sidebar');
    }

    this.trigger(this.settings);
  }
});
github osmlab / to-fix / index.js View on Github external
$('.js-sidebar-toggle').on('click', function() {
    var $el = $(this);
    var $sidebar = $('#sidebar');

    if ($el.is('.active')) {
        $el.removeClass('active');
        $sidebar.removeClass('active');
        store.remove('sidebar');
    } else {
        $sidebar.addClass('active');
        $el.addClass('active');
        store.set('sidebar', true);
    }
    return false;
});
github gskinner / regexr / js / Settings.js View on Github external
s.setFavorite = function (id, value) {
	if (value) {
		s._saveValue("f" + id, 1);
	} else {
		store.remove("f" + id);
		s.dispatchEvent(new DataEvent("change", {
			type: "f" + id,
			value: value
		}));
	}
};

store

A localStorage wrapper for all browsers without using cookies or flash. Uses localStorage, globalStorage, and userData behavior under the hood

MIT
Latest version published 7 years ago

Package Health Score

58 / 100
Full package analysis

Popular store functions