Check out the documentation it's filled with interactive examples.
This library is a math library, SVG library, FOLD graph manipulator, all wrapped into one.
A data model of a crease pattern is initialized like so
var cp = new CreasePattern();
If you are in the browser, initialize an Origami object and you also get an SVG image of the Crease Pattern.
var origami = new Origami();
There are methods for folding a sheet of paper, checking local flat-foldability, Kawasaki-Justin's theorem, Maekawa's theorem, exposing the planar graph data structure, support for .fold, .oripa, and .svg file formats for import and export.
compile the source using rollup. In terminal type:
MIT open source software license