An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

[![Circle CI](https://circleci.com/gh/formula/formula.svg?style=svg)](https://circleci.com/gh/formula/formula)
[![npm version](https://badge.fury.io/js/formula.svg)](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