Skip to content

nkcjs/callup

Repository files navigation

callup

A simple calling parser

Install

Install with npm

$ npm i callup --save

Install with yarn

$ yarn add callup

Example

const expr = 'fn(a+bf, cb(7) + " Snow", w+3+y)';
const callup = require('callup');
console.log(callup.parse(expr));
// =>
// {
//   "name": "fn",
//   "args": [
//     {
//       "op": "+",
//       "left": "a",
//       "right": "bf"
//     },
//     {
//       "op": "+",
//       "left": {
//         "name": "cb",
//         "args": ["7"]
//       },
//       "right": " Snow"
//     },
//     {
//       "op": "+",
//       "left": "w",
//       "right": {
//         "op": "+",
//         "left": "3",
//         "right": "y"
//       }
//     }
//   ]
// }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published