formula
v3.18.0
Published
Formula compiler and function library
Downloads
1,714
Readme
Best function and expression library for JSON.
Install
npm install --save formula
General Usage
import { run } from "formula";
// jsonpath + spreadsheet-like expression system eats json for lunch.
run("$.a.b = 1", '{ "a": { "b": 1 } }')
// sum, vlookup, hlookup and friends.
run("sum(a, b, c) = 1+2+3", { a: 1, b: 2, c: 3 });
Browser ready
Add to the browser with:
<script type="text/javascript" src="https://unpkg.com/[email protected]/lib/formula.min.js"