<commit_before>'use strict';

var _lodash = require('lodash');

var _lodash2 = _interopRequireDefault(_lodash);

var _objectpath = require('objectpath');

var _objectpath2 = _interopRequireDefault(_objectpath);

var _tv = require('tv4');

var _tv2 = _interopRequireDefault(_tv);

var _notevil = require('notevil');

var _notevil2 = _interopRequireDefault(_notevil);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

//Evaluates an expression in a safe way
function safeEval(condition, scope) {
    var scope_safe = _lodash2.default.cloneDeep(scope);
    return (0, _notevil2.default)(condition, scope_safe);
}

function stripNullType(type) {<commit_msg>Update transpilation of utils.safeEval<commit_after>'use strict';

var _lodash = require('lodash');

var _lodash2 = _interopRequireDefault(_lodash);

var _objectpath = require('objectpath');

var _objectpath2 = _interopRequireDefault(_objectpath);

var _tv = require('tv4');

var _tv2 = _interopRequireDefault(_tv);

var _notevil = require('notevil');

var _notevil2 = _interopRequireDefault(_notevil);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

//Evaluates an expression in a safe way
function safeEval(condition, scope) {
    try {
        var scope_safe = _lodash2.default.cloneDeep(scope);
        return (0, _notevil2.default)(condition, scope_safe);
    } catch (error) {
        return undefined;
    }
}

function stripNullType(type) {
{'fraction_non_alphanumeric': 0.11607738492328219, 'fraction_numerical': 0.01067378252168112, 'mean_word_length': 5.410256410256411, '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': '4386493', 'n_tokens_mistral': 497, 'n_tokens_neox': 475, 'n_words': 114}