Use Cassowary in a Node.js project
masterTo use Cassowary in Node.js, require the cassowary module. The entire API is exported by the c object. You can instantiate a SimplexSolver, create Variable objects with initial values, and define relationships using Equation and Expression objects.
// The entire API is exported by the cassowary object
var c = require("cassowary");
var solver = new c.SimplexSolver();
var x = new c.Variable({ value: 167 });
var y = new c.Variable({ value: 2 });
var eq = new c.Equation(x, new c.Expression(y));
solver.addConstraint(eq);
// ...