Skip to content

Instantly share code, notes, and snippets.

View dforesman's full-sized avatar

Dave Foresman dforesman

  • Invitae
  • Boston
View GitHub Profile
@dforesman
dforesman / vuex-simple-store.js
Created January 26, 2018 17:59
Vuex Simple Store - helper to quickly build out simple Vuex stores, based on provided state object. Creates getters and mutations for each top-level state item (filterable). Allows augmenting and overriding.
//
// VUEX SIMPLE STORE
//
// Makes it easier to quickly build out simple stores
// - creates getters and mutations for each state item (filterable)
// - allows augmenting and overriding
//
// helper - filter out keys
const excludeKeys = (state, options) => {