Replace the call expression with a Literal
Replace the length call with a Literal
Replace the content of the node left, right to literals
Replace the [][] call with a Literal
string
A function that constant fold the a javascript file
Replace the call expression with a Literal
Kind: global function
Param | Type | Description |
---|---|---|
n | Node |
the node to evaluate and modify |
Replace the length call with a Literal
Kind: global function
Param | Type | Description |
---|---|---|
n | Node |
the node to evaluate and modify |
Replace the content of the node left, right to literals
Kind: global function
Param | Type | Description |
---|---|---|
n | Node |
the node to evaluate and modify |
Replace the [][] call with a Literal
Kind: global function
Param | Type | Description |
---|---|---|
n | Node |
the node to evaluate and modify |
string
A function that constant fold the a javascript file
Kind: global function
Returns: string
- the result javascript code
Param | Type | Description |
---|---|---|
code | string |
A string that contains javascript code |