Skip to content

Instantly share code, notes, and snippets.

@superlou
Last active December 30, 2015 17:29
Show Gist options
  • Save superlou/7861383 to your computer and use it in GitHub Desktop.
Save superlou/7861383 to your computer and use it in GitHub Desktop.
Really simple local store
DumbStore = Backbone.Model.extend
defaults: -> {
pile: []
}
add: (obj)->
this.get('pile')[obj.id] = obj
find: (id)->
this.get('pile')[id]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment