<commit_before>'use strict';
var util = require('util');


// Some template check code is skipped on production for
//  speed improvement
var isProduction = (process.env.NODE_ENV.match(/^prod/));

var defaultOptions = {
  extraArguments: true   // Allow arguments not in template
};


var argumentOptions = [
  'required',             // argument is required
  'defined',              // argument must be defined
  'default',              // default value when not passed
  'function',             // function to call with value for validation
  'requires',             // require another argument to be present
  'excludes'              // require another argument *not* to be present
];


function check(args, template, opt, done) {
  if (typeof opt === 'function') {
    done = opt;
    opt = undefined;
  }
  if (opt === undefined) {
    opt = defaultOptions;
  }

  var checksPre = [];   // List of pre-checks
  var checksPost = [];  // List of post-checks<commit_msg>Fix crash when NODE_ENV is not available<commit_after>'use strict';
var util = require('util');


// Some template check code is skipped on production for
//  speed improvement
var isProduction = (process.env.NODE_ENV && process.env.NODE_ENV.match(/^prod/));

var defaultOptions = {
  extraArguments: true   // Allow arguments not in template
};


var argumentOptions = [
  'required',             // argument is required
  'defined',              // argument must be defined
  'default',              // default value when not passed
  'function',             // function to call with value for validation
  'requires',             // require another argument to be present
  'excludes'              // require another argument *not* to be present
];


function check(args, template, opt, done) {
  if (typeof opt === 'function') {
    done = opt;
    opt = undefined;
  }
  if (opt === undefined) {
    opt = defaultOptions;
  }

  var checksPre = [];   // List of pre-checks
  var checksPost = [];  // List of post-checks
{'fraction_non_alphanumeric': 0.11417125688532799, 'fraction_numerical': 0.0, 'mean_word_length': 2.4507772020725387, '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': '687109', 'n_tokens_mistral': 540, 'n_tokens_neox': 521, 'n_words': 198}