This commit is contained in:
16
node_modules/licia/evalJs.js
generated
vendored
Normal file
16
node_modules/licia/evalJs.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
var root = require('./root');
|
||||
exports = function(js, ctx) {
|
||||
ctx = ctx || root;
|
||||
|
||||
try {
|
||||
return new Function('return (' + js + ');').call(ctx);
|
||||
} catch (e) {
|
||||
try {
|
||||
return new Function('return ' + js).call(ctx);
|
||||
} catch (e) {
|
||||
return new Function(js).call(ctx);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = exports;
|
||||
Reference in New Issue
Block a user