eval-literals
v0.0.2
Published
eval javascript literals
Downloads
1
Maintainers
Readme
eval-literals
Evaluate javascript literals
example
var evaluate = require('static-eval');
var parse = require('esprima').parse;
var src = '[{ x: 123 }]';
var ast = parse(src).body[0].expression;
console.log(evaluate(ast));
install
With npm do:
npm install eval-literals
license
MIT