Parse Salesforce Formula and, Build AST in JavaScript
Clone or download
Latest commit ba60a06 Aug 15, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib fix bug for non arguments function Aug 14, 2018
test fix bug for non arguments function Aug 14, 2018
.gitignore first commit Aug 7, 2018
LICENSE.txt update Aug 7, 2018
Makefile Add test Aug 8, 2018
README.md update Aug 7, 2018
package.json version up Aug 14, 2018

README.md

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' } ] } ] }