dfl.global.js

command
v0.0.0-...-8ad63dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2019 License: MIT Imports: 2 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL