"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const chalk = require('chalk');
function evaluate(exp, data) {
    const fn = new Function('data', 'with (data) { return ' + exp + '}');
    try {
        return fn(data);
    }
    catch (e) {
        console.error(chalk.red('Error when evaluating filter condition: ' + exp));
    }
}
exports.default = evaluate;
//# sourceMappingURL=eval.js.map