npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

falcor-json-graph

3.1.0 • 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

829

version

3.1.0

license

Apache 2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability