Nascent Plasticine Materialist

    string-to-function

    1.0.2 • Public • Published

    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

    Install

    npm i string-to-function

    DownloadsWeekly Downloads

    6

    Version

    1.0.2

    License

    ISC

    Last publish

    Collaborators

    • rcschettino