Easily manage Falcor lists / hashes with the observ-family
npm install observ-falcor> Easily manage Falcor lists / hashes with the observ-family
Intended for use in your mercury apps that use Falcor.
Project status: Mad Scientist / WIP
```
$ npm install --save observ-falcor
Minimum:
`js
var ObservFalcor = require('observ-falcor')
var Model = require('falcor').Model
var LazyModel = require('falcor-lazy-model')
var Struct = require('observ-struct')
var model = LazyModel((cb) => cb(new Model()))
var observFalcor = ObservFalcor(model)
// This is an observVarHash with some extra functionality
var userStore = observFalcor.store({
prefix: ['userById'],
paths: ['firstName', 'lastName', 'handle', 'id'],
construct: User
})
// This is an observArray with some extra functionality
var userList = observFalcor.list({
prefix: ['groupById', 6, 'users']
store: userStore
})
function User (data) {
return Struct({/ ... /})
}
``
WIP. See design.md for notes.
MIT © Andrew Joslin