Notoriously Problematic Merge
Miss any of our Open RFC calls?Watch the recordings here! »

falcor-json-graph

3.2.1 • Public • Published

falcor-json-graph

A set of factory functions for creating JSON Graph values.

API

var jsonGraph = require('falcor-json-graph');
 
// { $type: "atom", value: "a string wrapped in an atom" }
var atom = jsonGraph.atom("a string wrapped in an atom");
 
// { $type: "atom" }
var undefinedAtom = jsonGraph.undefinedAtom();
 
// { $type: "ref", value: ["todos", 0, "name"] }
var ref = jsonGraph.ref(["todos", 0, "name"]);
 
// { $type: "error", value: "something bad happened." }
var error = jsonGraph.error("something bad happened.");
 
// { path: [ 'user', 'age' ], value: 25 }
var pathValue = jsonGraph.pathValue(["user", "age"], 25);
 
// { path: [ 'user', 'age' ], invalidated: true }
var pathValue = jsonGraph.pathInvalidation(["user", "age"])

Install

npm i falcor-json-graph

DownloadsWeekly Downloads

1,369

Version

3.2.1

License

Apache 2.0

Unpacked Size

66.2 kB

Total Files

23

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar