Skip to content

Utility for expanding falcor caches into plain JS objects

License

Notifications You must be signed in to change notification settings

lingz/falcor-expand-cache

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Falcor-Expand-Cache

falcor-expand-cache is a utility for generating "plain JS like" objects that represent the internal cache of a falcor model. These objects are lazy, immutable, and only represent the cache from when it was created.

Installation

To install:

npm install --save falcor-expand-cache

Usage

import expandCache from 'falcor-expand-cache';

const cache = expandedCache(falcor.getCache());

console.log(cache.users[0].company.name) // => Pied Piper

Why?

This was built to help connect falcor to other applications / libraries that require state to be immediately available rather than through a callback or promise. Currently is it used in redux-falcor.

Licence

MIT

About

Utility for expanding falcor caches into plain JS objects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%