<commit_before>/**
 * @function is: create a type validator for given type.
 *   @param type [String]: "Function", "Object", "Array", "RegExp", "Date", ...
 *
 * returned validators are based on Object.prototype.toString type checking.
 * Also provides access to some special type check functions.
 */

module.exports = is;

function is( type ){
  if( is[ type ] ){
    return is[ type ];
  }
  return is[ type ] = function( o ){
    return Object.prototype.toString.call(o) == "[object " + type + "]";
  };
}

/**
 * Tells whatever `path` is absolute
 *
 * Taken from https://github.com/visionmedia/express/commit/cbf3<PASSWORD>48e2a3e93c34a2e1e32c56a31bea7a
 * See also http://dailyjs.com/2012/05/24/windows-and-node-4/
 *
 * @function isAbsolute( {string} path )
 * @param path: the path to be checked
 */

is.AbsolutePath = function isAbsolute( path ){
  if( '/' == path[0] ){
    return true;
  }
  if( ':' == path[1] && '\\' == path[2] ){
    return true;
  }
  return false;
};

/**
 * Tells whatever given object represents a number
 *
 * sighly modified from [an answer found at stackoverflow](http://stackoverflow.com/a/1830844/1894803)
 */

is.Number = function isNumber( o ) {<commit_msg>added is-literal<commit_after>/**
 * @function is: create a type validator for given type.
 *   @param type [String]: "Function", "Object", "Array", "RegExp", "Date", ...
 *
 * returned validators are based on Object.prototype.toString type checking.
 * Also provides access to some special type check functions.
 */

module.exports = is;

function is( type ){
  if( is[ type ] ){
    return is[ type ];
  }
  return is[ type ] = function( o ){
    return Object.prototype.toString.call(o) == "[object " + type + "]";
  };
}

is.String = is( 'String' );
is.Fn = is( 'Function' );

/**
 * Tells whatever object is a "literal" object
 */

is.Literal = function isLiteral( o ){
  return "object" == typeof o && o.constructor === Object;
};

/**
 * Tells whatever `path` is absolute
 *
 * Taken from https://github.com/visionmedia/express/commit/cbf330c3db48e2a3e93c34a2e1e32c56a31bea7a
 * See also http://dailyjs.com/2012/05/24/windows-and-node-4/
 *
 * @function isAbsolute( {string} path )
 * @param path: the path to be checked
 */

is.AbsolutePath = function isAbsolute( path ){
  if( '/' == path[0] ){
    return true;
  }
  if( ':' == path[1] && '\\' == path[2] ){
    return true;
  }
  return false;
};

/**
 * Tells whatever given object represents a number
 *
 * sighly modified from [an answer found at stackoverflow](http://stackoverflow.com/a/1830844/1894803)
 */

is.Number = function isNumber( o ) {
{'fraction_non_alphanumeric': 0.1612409038682497, 'fraction_numerical': 0.03485254691689008, 'mean_word_length': 3.38255033557047, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, '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': '7495546', 'n_tokens_mistral': 917, 'n_tokens_neox': 872, 'n_words': 246}