code: function compileExpression(expression, extraFunctions /* optional */) {
      var functions = {
          abs: Math.abs,
          ceil: Math.ceil,
          floor: Math.floor,
          log: Math.log,
          max: Math.max,
          min: Math.min,
          random: Math.random,
          round: Math.round,
          sqrt: Math.sqrt,
      };
      if (extraFunctions) {
          for (var name in extraFunctions) {
              if (extraFunctions.hasOwnProperty(name)) {
                  functions[name] = extraFunctions[name];
              }
          }
      }
      if (!compileExpression.parser) {
          // Building the original parser is the heaviest part. Do it
          // once and cache the result in our own function.
          compileExpression.parser = filtrexParser();
      }
      var tree = compileExpression.parser.parse(expression);
  
      var js = [];
      js.push('return ');
      function toJs(node) {
          if (Array.isArray(node)) {
              node.forEach(toJs);
          } else {
              js.push(node);
          }
      }
      tree.forEach(toJs);
      js.push(';');
  
      function unknown(funcName) {
          throw 'Unknown function: ' + funcName + '()';
      }
  
      function prop(obj, name) {
          return Object.prototype.hasOwnProperty.call(obj||{}, name) ? obj[name] : undefined;
      }
  
      var func = new Function('functions', 'data', 'unknown', 'prop', js.join(''));
  
      return function(data) {
          return func(functions, data, unknown, prop);
      };
  }
docs: Filtrex provides compileExpression() to compile user expressions to JavaScript.
  
  See https://github.com/joewalnes/filtrex for tutorial, reference and examples.
  MIT License.
  
  Includes Jison by Zachary Carter. See http://jison.org/
  
  -Joe Walnes