<commit_before>// Dependencies
var util = require('util')
var EventEmitter = require('events').EventEmitter
var assertInterface = require('./interfaces/assert')
var expectInterface = require('./interfaces/expect')

// Make some magic!
require('./wrappers/processMagic')

function Check () {
  var self = this

  Object.defineProperty(this, '__emitError', {
    value: function (err) {
      return self.emit('error', err)
    }
  })

  // inherit chai API
  this.assert = assertInterface(this.__emitError)
  this.expect = expectInterface(this.__emitError)

  this.once('error', function (err) {
    return self.callback(err)
  })
}

util.inherits(Check, EventEmitter)

Check.prototype.callback = function (err) {
  throw err
}

Check.prototype.use = function (fn) {
  if (typeof fn !== 'function') {
    throw new Error('The argument of check.use must be a function')
  }

  this.callback = fn
}

module.exports = Check<commit_msg>change name of method .use to .bind<commit_after>// Dependencies
var util = require('util')
var EventEmitter = require('events').EventEmitter
var assertInterface = require('./interfaces/assert')
var expectInterface = require('./interfaces/expect')

// Make some magic!
require('./wrappers/processMagic')

function Check () {
  var self = this

  Object.defineProperty(this, '__emitError', {
    value: function (err) {
      return self.emit('error', err)
    }
  })

  // inherit chai API
  this.assert = assertInterface(this.__emitError)
  this.expect = expectInterface(this.__emitError)

  this.once('error', function (err) {
    return self.callback(err)
  })
}

util.inherits(Check, EventEmitter)

Check.prototype.callback = function (err) {
  throw err
}

Check.prototype.bind = function (fn) {
  if (typeof fn !== 'function') {
    throw new Error('The argument of check.use must be a function')
  }

  this.callback = fn
}

module.exports = Check
{'fraction_non_alphanumeric': 0.13687002652519895, 'fraction_numerical': 0.0, 'mean_word_length': 3.9242819843342036, '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': '6363141', 'n_tokens_mistral': 573, 'n_tokens_neox': 568, 'n_words': 147}