dfl.mod.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.mod.js is the package for go-dfl that is built as a JavaScript module. In modern JavaScript, the module can be imported using destructuring assignment. The functions are defined in the Exports variable in the dfljs package.

Usage

// Below is a simple set of examples of how to use this package in a JavaScript application.

// load functions into current scope
const { parse } = require('./dist/dfl.global.min.js);

// Parse an expression into a node
var { node, err } = 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