<commit_before>var iter = require('super-iter');

var CONFIG = require('config');

var HttpError = require('./HttpError');

var reduce = iter.reduce;

if (CONFIG.errors && typeof CONFIG.errors === 'object') {
  module.exports = reduce(CONFIG.errors, function(acc, error, status) {
    var name = error.id + 'Error';

    acc['_' + status] = acc[name] = function(e) {
      HttpError.call(this, error.message, e);
    };

    acc[name].prototype = Object.create(HttpError.prototype, {
      constructor: {
        value: acc[name]
      },
      name: {
        value: name
      },
      status: {
        value: status
      },
      valueOf: {
        value: function () {
          return "[object " + name + "]";
        }
      }
    });

    return acc;
  }, exports);
}<commit_msg>coerce status to 32 bit integer<commit_after>var iter = require('super-iter');

var CONFIG = require('config');

var HttpError = require('./HttpError');

var reduce = iter.reduce;

if (CONFIG.errors && typeof CONFIG.errors === 'object') {
  module.exports = reduce(CONFIG.errors, function(acc, error, status) {
    var name = error.id + 'Error';

    acc['_' + status] = acc[name] = function(e) {
      HttpError.call(this, error.message, e);
    };

    acc[name].prototype = Object.create(HttpError.prototype, {
      constructor: {
        value: acc[name]
      },
      name: {
        value: name
      },
      status: {
        value: (status >>> 0)
      },
      valueOf: {
        value: function () {
          return "[object " + name + "]";
        }
      }
    });

    return acc;
  }, exports);
}
{'fraction_non_alphanumeric': 0.16292134831460675, 'fraction_numerical': 0.0018726591760299626, 'mean_word_length': 2.2714285714285714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '3470685', 'n_tokens_mistral': 501, 'n_tokens_neox': 487, 'n_words': 112}