<commit_before>
var Node = require('./node');

var If = module.exports = function If(condition, block) {
    this.condition = condition;
    this.block = block;
};

If.prototype.__proto__ = Node.prototype;
If.prototype.render = function(context) {
    var self = this;

    var result;
    with (context) {
        result = eval(self.condition);
    }

    if (result) {
        return this.block.render(context);
    }
    return '';
};<commit_msg>Refactor on if node render<commit_after>
var Node = require('./node');

var If = module.exports = function If(condition, block) {
    this.condition = condition;
    this.block = block;
};

If.prototype.__proto__ = Node.prototype;
If.prototype.render = function(context) {
    var condition = this.condition;

    var ifNodeEvalResult;
    with (context) {
        ifNodeEvalResult = eval(condition);
    }

    if (ifNodeEvalResult) {
        return this.block.render(context);
    }
    return '';
};
{'fraction_non_alphanumeric': 0.13249211356466878, 'fraction_numerical': 0.0, 'mean_word_length': 2.9502074688796682, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6297552', 'n_tokens_mistral': 289, 'n_tokens_neox': 284, 'n_words': 68}