flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
11
VISUALIZACION/node_modules/static-eval/example/vars.js
generated
vendored
Executable file
11
VISUALIZACION/node_modules/static-eval/example/vars.js
generated
vendored
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
var evaluate = require('../');
|
||||
var parse = require('esprima').parse;
|
||||
|
||||
var src = '[1,2,3+4*10+n,foo(3+5),obj[""+"x"].y]';
|
||||
var ast = parse(src).body[0].expression;
|
||||
|
||||
console.log(evaluate(ast, {
|
||||
n: 6,
|
||||
foo: function (x) { return x * 100 },
|
||||
obj: { x: { y: 555 } }
|
||||
}));
|
||||
Loading…
Add table
Add a link
Reference in a new issue