Standard Resource
A normalized data store.
✓ Works in Node or in the browser
✓ Normalizes data
✓ Flexible: define schemas for extra robustness, or choose not to
✘ Sophisticated relationship support (coming soon)
Installation
Note: this library is not yet ready to be used.
Install using npm:
npm install standard-resource
or yarn:
yarn add standard-resource
Documentation
View the documentation at standard-resource.js.org ⇗.
Quick Start
Follow this guide to get a taste of what it's like to work with Standard Resource.
First, we create a store. A store is where all of our resource data will be located.
; const store = ;
Next, we can add a resource to the store. Let's create add a book with an ID of "24":
store;
Now that we have created our book, we can retrieve it.
console;// [// {// id: '24',// attributes: { name: 'Lord of the Rings' },// meta: {},// computedAttributes: {}// }// ]
This is just a small sample of what it's like working with Standard Resource.