Documentation ¶
Overview ¶
dfl.global.js is the package for go-dfl that adds DFL functions to the global scope under the "dfl" variable.
In Node, depending on where require is called and the build system used, the functions may need to be required at the top of each module file. In a web browser, gss can be made available to the entire web page. The functions are defined in the Exports variable in the gssjs package.
Usage
// Below is a simple set of examples of how to use this package in a JavaScript application. // load functions into global scope // require('./dist/dfl.global.min.js); // Parse an expression into a node var { node, err } = dfl.parse("@a + @b") // Compile the node node = node.compile() // Evaluate the node var { result, err } = node.evaluate({"a": 1, "b": 2})
References
Click to show internal directories.
Click to hide internal directories.