salesforce-formula-parser
v1.0.3
Published
Parse Salesforce Formula and, Build AST in JavaScript
Downloads
5
Readme
SalesforceFormulaParser
Parse Salesforce Formula and, Build AST in JavaScript
Usage
$ npm install salesforce-formula-parser
const parse = require('salesforce-formula-parser')
parse('IF(TRUE, "foo", IF(FALSE, "bar", "baz"))')
// => { type: 'function',
// name: 'IF',
// arguments:
// [ { type: 'boolean', value: true },
// { type: 'string', value: 'foo' },
// { type: 'function',
// name: 'IF',
// arguments:
// [ { type: 'boolean', value: false },
// { type: 'string', value: 'bar' },
// { type: 'string', value: 'baz' } ] } ] }