browserify / browserify/static-module
feature: add an API that works on ASTs instead of pre-evaluated values
- Dominant language
- JavaScript
- Stars
- 75
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
static-eval doesn't support function expressions like the `body` option in:
```js
cwise({
body: () => {}
})
```
I think because of this patch https://github.com/substack/static-eval/pull/18
static-module has a special case for function arguments as callbacks:
```js
readFile('xyz', function () {})
```
A possible solution may be to have a static-module option or a method like `staticModule.ast` that passes the parsed AST nodes to functions, instead of statically evaluated values. Projects like cwise could then use static-eval to selectively evaluate strings and other primitive types, and stringify the AST for function arguments using escodegen.
_Originally posted by @goto-bus-stop in https://github.com/browserify/static-module/issues/48#issuecomment-443202592_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.