{"id":20607649,"url":"https://github.com/mavoweb/vastly","last_synced_at":"2025-04-15T04:02:15.537Z","repository":{"id":204005989,"uuid":"710498229","full_name":"mavoweb/vastly","owner":"mavoweb","description":"Everything you need to support a custom formula language","archived":false,"fork":false,"pushed_at":"2024-03-14T22:18:32.000Z","size":173,"stargazers_count":13,"open_issues_count":5,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-14T07:56:05.026Z","etag":null,"topics":["ast","expressions","formulas","parsing"],"latest_commit_sha":null,"homepage":"https://vastly.mavo.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mavoweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-26T20:21:46.000Z","updated_at":"2024-04-12T17:29:39.000Z","dependencies_parsed_at":"2023-11-25T01:24:28.798Z","dependency_job_id":"a70852ce-293a-4ce1-9684-d775a95950ea","html_url":"https://github.com/mavoweb/vastly","commit_stats":null,"previous_names":["mavoweb/vastly"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mavoweb%2Fvastly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mavoweb%2Fvastly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mavoweb%2Fvastly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mavoweb%2Fvastly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mavoweb","download_url":"https://codeload.github.com/mavoweb/vastly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003951,"owners_count":21196793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","expressions","formulas","parsing"],"created_at":"2024-11-16T10:08:12.184Z","updated_at":"2025-04-15T04:02:15.466Z","avatar_url":"https://github.com/mavoweb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cheader\u003e\n\n# vᴀꜱᴛly\n\nEverything you need to support a custom expression language in your application.\n\n\u003c/header\u003e\n\n\u003cmain\u003e\n\n## What is this?\n\nvᴀꜱᴛly is a toolkit for handling expression ASTs (such as those produced by [JSEP](https://ericsmekens.github.io/jsep/)).\nThese ASTs are a subset of ASTs produced by full-blown parsers like [Esprima](https://esprima.org/).\n\nIntended to be used in conjunction with [JSEP](https://ericsmekens.github.io/jsep/), but should work with any AST that conforms to the same structure.\n\nExtracted from [Mavo](https://mavo.io).\n\n## Features\n\n- [x] Zero dependencies\n- [x] Small footprint\n- [x] Works in Node and the browser\n- [x] Tree-shakeable\n\n## Usage\n\n```sh\nnpm i vastly\n```\n\nThen you can use it either by importing the whole library:\n\n```js\nimport * as vastly from \"vastly\"; // or const vastly = require(\"vastly\"); in CJS\nimport { parse } from \"jsep\";\n\nconst ast = parse(\"1 + x * y\");\nconst result = vastly.evaluate(ast, {x: 2, y: 3});\n```\n\nor individual functions:\n\n```js\nimport { evaluate } from \"vastly\"; // or const { evaluate } = require(\"vastly\"); in CJS\nimport { parse } from \"jsep\";\n\nconst ast = parse(\"1 + x * y\");\nconst result = evaluate(ast, {x: 2, y: 3});\n```\n\nIf you’re using vastly from a browser, without a bundler, fear not! You can just import from `src` directly:\n\n```js\nimport { evaluate } from \"https://vastly.mavo.io/src/evaluate.js\";\n/* or */\nimport * as vastly from \"https://vastly.mavo.io/src/index-fn.js\";\n/* or */\nimport { evaluate } from \"https://vastly.mavo.io/dist/vastly.js\";\n/* or */\nimport * as vastly from \"https://vastly.mavo.io/dist/vastly.js\";\n```\n\n[Full API reference](https://vastly.mavo.io/docs/)\n\n\u003c/main\u003e\n\n\u003cscript type=module\u003e\n// Create global variable to facilitate experimentation\nimport * as vastly from \"./src/index.js\";\nglobalThis.vastly = vastly;\n\u003c/script\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmavoweb%2Fvastly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmavoweb%2Fvastly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmavoweb%2Fvastly/lists"}