@gluedigital/model-nav
v1.0.1
Published
A simple helper to navigate models returned from APIs
Downloads
2
Keywords
Readme
Model-Nav
A simple library to navigate serialized flat models on your JS projects.
Usage
Install it as usual:
npm install @gluedigital/model-nav
Use it from your code:
import Model from '@gluedigital/model-nav'
// ...
const model = new Model(myData)
const someUser = model.get('user', 42)
const userOffice = model.getRelated(someUser, 'office')
API docs
Below you can check all the available methods: