https://github.com/formula/formula
Formula language for JavaScript
https://github.com/formula/formula
javascript nodejs
Last synced: about 1 year ago
JSON representation
Formula language for JavaScript
- Host: GitHub
- URL: https://github.com/formula/formula
- Owner: formula
- License: mit
- Created: 2015-12-03T04:52:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T12:47:01.000Z (over 3 years ago)
- Last Synced: 2025-04-30T13:42:20.347Z (about 1 year ago)
- Topics: javascript, nodejs
- Language: JavaScript
- Homepage: https://formula.github.io/formula/
- Size: 4.51 MB
- Stars: 45
- Watchers: 4
- Forks: 13
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://circleci.com/gh/formula/formula)
[](https://badge.fury.io/js/formula)
Best function and expression library for JSON.
## Install
```sh
npm install --save formula
```
## General Usage
```js
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:
```html