string-to-function
v1.0.2
Published
Package for convert string to function without use eval
Downloads
3
Maintainers
Readme
This package was created for avoid to use "eval" in javascript when you need to convert function string to in-memory function.
Use example:
var stringToFunction = require('string-to-function');
var sum = stringToFunction('function sum(a, b){ return a+b; }');
var result = sum(1, 1);
// result === 2