Skip to content

andycloke/formula

 
 

Repository files navigation

Circle CI npm version

Best function and expression library for JSON.

This is a forked version of formula/formula with more flexible argument handling and some new functions (REMOVESTART,REMOVEEND,UNIXTODATE).

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"

About

Formula language for JavaScript

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 98.0%
  • Yacc 1.8%
  • HTML 0.2%