saber
saber copied to clipboard
Use a centralised data store
Feature request
What problem does this feature solve?
Saber has a api.pages object you can use to store pages, but in practice you also need to store data for authors, tags etc.
What does the proposed API look like?
const Page = api.store.createCollection('page', {
insertFilter(input) {
return normalizePage(input)
}
})
const allPages = Page.find() // => [{}, {}, ...]
Page.insert({
//...
})