Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 960 Bytes

README.md

File metadata and controls

27 lines (17 loc) · 960 Bytes

Schach - Parsing

Docs Tests codecov

This plugin provides a core library with Parsing functionality.

Example usage:

const { expression, evaluate } = Schach.Parsing.Arithmetic;

const { parsed: expr } = expression().run("#x^4 - log2(#y)")

evaluate(expr, { variables: { x: 5, y: 32 } })
// returns 5^4 - log2(32) = 625 - 5 = 620

Getting Started (Developers)

First of all, make sure you run npm install to install all the dependencies for the project, such as rollup.js and typescript.

Once you are done, npm run build will create a JS file for your plugin as dist/js/plugins/schach-parsing.js.