hoodiehq/wip-hoodie-store-on-pouchdb — pull request #31 by gr2m (2014-12-29 20:22:54+00:00)
Title: hoodie.store(type)

# DO NOT MERGE YET

`hoodie.store("todo")` returns a scoped store API, for objects with the property `type` set to "todo".

```js
var todoStore = hoodie.store('todo')

todoStore.add({name: 'remember the milk'})
.then(function(newObject) {
object.type // 'todo'
})

todoStore.on('add', function() {
console.log('A new todo has been added.')
})

hoodie.store.add({name: 'something'});
//

hoodie.store.add({name: 'something', type: 'todo'});
// < A new todo has been added.
```