<commit_before>(function (name, context, definition) {
  if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {
    module.exports = definition();
  } else if (typeof define === 'function' && typeof define.amd  === 'object') {
    define(function () {
      return definition();
    });
  } else {
    var old = context[name];
    context[name] = definition();
    context[name].noConflict = function(){
      context[name] = old;
      return this;
    };
  }
})('ginga', this, function() {

  //util: type checking
  var is = {
    'string': function(val){
      return typeof val === 'string';
    },
    'boolean': function(val){
      return typeof val === 'boolean';
    },
    'function': function(val){
      return typeof val === 'function';
    },
    'number': function(val){
      return typeof val === 'number';
    },
    'object': function(val){
      return typeof val === 'object' && !!val;
    },
    'array': Array.isArray || function(val){
      return Object.prototype.toString.call(val) === '[object Array]';
    }
  };

  var prototypeOf = Object.getPrototypeOf || function(obj){
    return obj.__proto__;
  };

  function dummy(){
    return true;
  }

  //util: flatten array
  function flatten(arr, res){
    if(!res){
      res = [];
    }
    for(var i = 0, l = arr.length; i < l; i++){
      if(arr[i] && is.array(arr[i])){
        flatten(arr[i], res);
      }else{
        res.push(arr[i]);
      }
    }
    return res;
  }

  //params parsing middleware
  function params(){
    var args = Array.prototype.slice.call(arguments);
    var spec = [];
    var specLen = args.length;
    var min = 0;
    var i, l;
    for(i = 0; i<specLen; i++){
      var obj = {};
      var str = args[i];

      var ch = str.slice(-1);
      obj.required = '?'.indexOf(ch) === -1;

      if(obj.required)
        min++;

      if( '?'.indexOf(ch) > -1)
        str = str.slice(0,-1);

      var arg = str.split(':');
      obj.name = arg[0];
      if(arg.length > 1){
        //defined type
        var check = is[arg[1]];
        if(typeof check !== 'function')<commit_msg>tweak type checking<commit_after>(function (name, context, definition) {
  if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {
    module.exports = definition();
  } else if (typeof define === 'function' && typeof define.amd  === 'object') {
    define(function () {
      return definition();
    });
  } else {
    var old = context[name];
    context[name] = definition();
    context[name].noConflict = function(){
      context[name] = old;
      return this;
    };
  }
})('ginga', this, function() {

  //util: type checking
  var is = {
    'string': function(val){
      return typeof val === 'string';
    },
    'boolean': function(val){
      return typeof val === 'boolean';
    },
    'function': function(val){
      return typeof val === 'function';
    },
    'number': function(val){
      return typeof val === 'number';
    },
    'date': function(val){
      return Object.prototype.toString.call(val) === '[object Date]';
    },
    'regexp': function(val){
      return Object.prototype.toString.call(val) === '[object RegExp]';
    },
    'object': function(val){
      return typeof val === 'object' && !!val;
    },
    'array': Array.isArray || function(val){
      return Object.prototype.toString.call(val) === '[object Array]';
    }
  };

  var prototypeOf = Object.getPrototypeOf || function(obj){
    return obj.__proto__;
  };

  function dummy(){
    return true;
  }

  //util: flatten array
  function flatten(arr, res){
    if(!res){
      res = [];
    }
    for(var i = 0, l = arr.length; i < l; i++){
      if(arr[i] && is.array(arr[i])){
        flatten(arr[i], res);
      }else{
        res.push(arr[i]);
      }
    }
    return res;
  }

  //params parsing middleware
  function params(){
    var args = Array.prototype.slice.call(arguments);
    var spec = [];
    var specLen = args.length;
    var min = 0;
    var i, l;
    for(i = 0; i<specLen; i++){
      var obj = {};
      var str = args[i];

      var ch = str.slice(-1);
      obj.required = '?'.indexOf(ch) === -1;

      if(obj.required)
        min++;

      if( '?'.indexOf(ch) > -1)
        str = str.slice(0,-1);

      var arg = str.split(':');
      obj.name = arg[0];
      if(arg.length > 1){
        //defined type
        var check = is[arg[1].toLowerCase()];
        if(typeof check !== 'function')
{'fraction_non_alphanumeric': 0.18483096085409254, 'fraction_numerical': 0.004893238434163701, 'mean_word_length': 2.35096870342772, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3237174', 'n_tokens_mistral': 1452, 'n_tokens_neox': 1428, 'n_words': 363}