<commit_before>var util = require('util');
var domain;

// see https://github.com/joyent/node/blob/v0.8.8-release/lib/domain.js#L53
function emitError(domain, err) {
    /*jshint camelcase: false*/
    util._extend(err, {
        domain: domain,
        domain_thrown: true
    });
    domain.emit('error', err);
    domain.exit();
}

function run(domain, onRun) {
    // add try catch. This gives us node 0.10 domain semantics
    // the unit tests expect throw errors to bubble into the domain.
    try {
        domain.run(onRun);
    } catch (err) {
        emitError(domain, err);
    }
}

function domainHandler(opts) {<commit_msg>fix linting in domain.js<commit_after>var util = require('util');
var domain;

// see https://github.com/joyent/node/blob/v0.8.8-release/lib/domain.js#L53
function emitError(currentDomain, err) {
    /*jshint camelcase: false*/
    util._extend(err, {
        domain: currentDomain,
        domain_thrown: true
    });
    currentDomain.emit('error', err);
    currentDomain.exit();
}

function run(currentDomain, onRun) {
    // add try catch. This gives us node 0.10 domain semantics
    // the unit tests expect throw errors to bubble into the domain.
    try {
        currentDomain.run(onRun);
    } catch (err) {
        emitError(currentDomain, err);
    }
}

function domainHandler(opts) {
{'fraction_non_alphanumeric': 0.13118440779610194, 'fraction_numerical': 0.01199400299850075, 'mean_word_length': 2.869565217391304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3124598', 'n_tokens_mistral': 435, 'n_tokens_neox': 422, 'n_words': 109}