How to use the store.get 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 vim-awesome / vim-awesome / web / static / js / app.jsx View on Github external
$.getJSON("/api/plugins/" + this.props.params.slug, function(data) {
      this.setState(data);

      // Save in localStorage that this plugin has been visited.
      if (store.enabled) {
        var pluginStore = store.get("plugin-" + data.slug) || {};
        pluginStore.hasVisited = true;
        store.set("plugin-" + data.slug, pluginStore);
      }
    }.bind(this));
  },
github vim-awesome / vim-awesome / web / static / js / app.jsx View on Github external
$.getJSON("/api/plugins/" + this.props.params.slug, function(data) {
      this.setState(data);

      // Save in localStorage that this plugin has been visited.
      if (store.enabled) {
        var pluginStore = store.get("plugin-" + data.slug) || {};
        pluginStore.hasVisited = true;
        store.set("plugin-" + data.slug, pluginStore);
      }
    }.bind(this));
  },
github mediathekview / mediathekviewweb / client / src / app / settings.ts View on Github external
private static get(namespace: string, key: string): T {
    console.log('get', key)
    if (Settings.cache[namespace].hasOwnProperty(key) == false) {
      let storedValue = StoreJS.get(namespace + '_' + key);
      if (storedValue == undefined) {
        storedValue = DEFAULTS[key];
      }
      Settings.cache[namespace][key] = storedValue;
    }

    return Settings.cache[namespace][key];
  }
github osmlab / to-fix / lib / core.js View on Github external
function request(error, callback) {
    $.ajax({
        crossDomain: true,
        url: url + 'error/' + error,
        type: 'post',
        data: JSON.stringify({user: store.get('username')})
    })
    .error(jqError)
    .done(callback);
}
github wbkd / dashboard-prototyper / app / scripts / widgets / todos / todosStore.js View on Github external
get: function(){
    
    this.todos = store.get('todos') || [];
    
    this.trigger({ 
      data: this.todos
    });
  },
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 Automattic / wp-calypso / client / lib / site-stats-sticky-tab / store.js View on Github external
function getCachedPlace() {
	var cached = store.get( constants.CACHE_KEY_MY_PLACE );
	if ( cached ) {
		return cached;
	}
	return {};
}
github paulstatezny / decisive / application / flux / grid-store.js View on Github external
initialize : function()
    {
        this.grids = store.get('grids');

        if (! this.grids) {
            this.grids = [this.getInitialGrid()];
        }

        this.selectedGrid = 0;

        this.bindActions(
            'ADD_GRID', 'onAddGrid',
            'ADD_TASK', 'onAddTask',
            'TOGGLE_COMPLETED', 'onToggleCompleted',
            'REMOVE_TASK', 'onRemoveTask',
            'SELECT_GRID', 'onSelectGrid',
            'DELETE_GRID', 'onDeleteGrid'
        );
    },
github vim-awesome / vim-awesome / web / static / js / Plugin.jsx View on Github external
getInitialState: function() {
    var pluginId = this.props.plugin.slug;
    var pluginStore = pluginId && store.enabled &&
        store.get("plugin-" + pluginId);

    return {
      hasVisited: pluginStore && pluginStore.hasVisited
    };
  },
github mindreframer / reactjs-stuff / github.com / divad12 / vim-awesome / web / static / js / Plugin.jsx View on Github external
getInitialState: function() {
    var pluginId = this.props.plugin.slug;
    var pluginStore = pluginId && store.enabled &&
        store.get("plugin-" + pluginId);

    return {
      hasVisited: pluginStore && pluginStore.hasVisited
    };
  },

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

56 / 100
Full package analysis

Popular store functions