<commit_before>/*jshint camelcase: false*/
'use strict';
var fs = require('fs'),
  path = require('path'),
  _ = require('lodash'),
  EventEmitter = require('events').EventEmitter,
  proto = require('./proto');

exports = module.exports = function () {
  function app(req, next){ app.handle(req, next); }
  _.extend(app, proto);
  _.extend(app, EventEmitter.prototype);
  app.stack = [];
  app.cache = {};
  for (var i = 0; i < arguments.length; ++i) {
    app.use(arguments[i]);
  }
  return app;
};

exports.proto = proto;
exports.middleware = {};

/**
 * Auto-load bundled middleware with getters.
 */
fs.readdirSync(__dirname + '/middleware').forEach(function(filename){
  if (!/\.js$/.test(filename)) { return; }
  var name = path.basename(filename, '.js');
  function load(){ return require('./middleware/' + name); }
  exports.middleware.__defineGetter__(name, load);
  exports.__defineGetter__(name, load);
});

<commit_msg>add sensor module at sense.js<commit_after>/*jshint camelcase: false*/
'use strict';
var fs = require('fs'),
  path = require('path'),
  _ = require('lodash'),
  EventEmitter = require('events').EventEmitter,
  proto = require('./proto'),
  sensor = require('./sensor');

exports = module.exports = function () {
  function app(req, next){ app.handle(req, next); }
  _.extend(app, proto);
  _.extend(app, EventEmitter.prototype);
  app.stack = [];
  app.cache = {};
  for (var i = 0; i < arguments.length; ++i) {
    app.use(arguments[i]);
  }
  return app;
};

exports.proto = proto;
exports.sensor = sensor;
exports.middleware = {};

/**
 * Auto-load bundled middleware with getters.
 */
fs.readdirSync(__dirname + '/middleware').forEach(function(filename){
  if (!/\.js$/.test(filename)) { return; }
  var name = path.basename(filename, '.js');
  function load(){ return require('./middleware/' + name); }
  exports.middleware.__defineGetter__(name, load);
  exports.__defineGetter__(name, load);
});


{'fraction_non_alphanumeric': 0.19101703665462055, 'fraction_numerical': 0.0010325245224574084, 'mean_word_length': 4.195710455764075, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7095799', 'n_tokens_mistral': 624, 'n_tokens_neox': 624, 'n_words': 138}