<commit_before>/**
 * Inspect.js the next generation test inspection library
 *
 * @module Inspect
 */

'use strict';

var utils = require('./lib/inspectUtils');
var InspectionError = require('./lib/inspectionError');
var InputError = require('./lib/errors').InputError;
var ComparisonError = require('./lib/errors').ComparisonError;
var ContainmentError = require('./lib/errors').ContainmentError;

var superstorage = require('superstorage')
var sharedState = superstorage('inspectjs-shared-state');
if (!sharedState.has('counter')) {
  sharedState.set('counter', 0);
}

/**
 * Inspect class
 * @constructor  Inspect
 * @param {any} input Input value
 */
var Inspect = function(input) {
  this.inspectValue = input;
};

/**
 * Inspects whether input is a string
 *
 * @method isString
 * @version  v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isString();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isString = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'string') {
    throw new InspectionError(message || ('Typeof input should be a string. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not a string
 *
 * @method isNotString
 * @version  v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotString();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotString = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'string') {
    throw new InspectionError(message || ('Typeof input should not be a string. But it is a string!'));
  }

  return this;
};

/**
 * Inspects whether input is an array
 *
 * @method isArray
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isArray();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isArray = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'array') {
    throw new InspectionError(message || ('Typeof input should be an array. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not an array
 *
 * @method isNotArray
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotArray();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotArray = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'array') {
    throw new InspectionError(message || ('Typeof input should not be an array. But it is an array!'));
  }

  return this;
};

/**
 * Inspects whether input is an object
 *
 * @method isObject
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isObject();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isObject = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'object') {
    throw new InspectionError(message || ('Typeof input should be an object. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not an object
 *
 * @method isNotObject
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotObject();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotObject = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'object') {
    throw new InspectionError(message || ('Typeof input should not be an object. But it is an object!'));
  }

  return this;
};

/**
 * Inspects whether input is null
 *
 * @method isNull
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(null).isNull();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNull = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'null') {
    throw new InspectionError(message || ('Typeof input should be null. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not null
 *
 * @method isNotNull
 * @version v1.0.0
 *
 * @param  {string} message Custom error message
 *
 * @example {js}
 * inspect(123).isNotNull();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotNull = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'null') {
    throw new InspectionError(message || ('Typeof input should not be null. But it is null!'));
  }

  return this;
};

/**
 * Inspects whether input is undefined
 *
 * @method isUndefined
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(undefined).isUndefined();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isUndefined = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'undefined') {
    throw new InspectionError(message || ('Typeof input should be undefined. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not undefined
 *
 * @method isNotUndefined
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(true).isNotUndefined();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotUndefined = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'undefined') {
    throw new InspectionError(message || ('Typeof input should not be undefined. But it is undefined!'));
  }

  return this;
};

/**
 * Inspects whether input is a boolean
 *
 * @method isBoolean
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isBoolean();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isBoolean = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'boolean') {
    throw new InspectionError(message || ('Typeof input should be a boolean. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not a boolean
 *
 * @method isNotBoolean
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotBoolean();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotBoolean = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'boolean') {
    throw new InspectionError(message || ('Typeof input should not be a boolean. But it is a boolean!'));
  }

  return this;
};

/**
 * Inspects whether input is true
 *
 * @method isTrue
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isTrue();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isTrue = function(message) {
  if (this.inspectValue !== true) {
    throw new InspectionError(message || ('Typeof input should be true. But current type is ' + utils.getTypeOf(this.inspectValue)));
  }

  return this;
};

/**
 * Inspects whether input is not === true
 *
 * @method isNotTrue
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(1).isNotTrue();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotTrue = function(message) {
  if (this.inspectValue === true) {
    throw new InspectionError(message || ('Input value should not be exacly true. But it is true!'));
  }

  return this;
};

/**
 * Inspects whether input is false
 *
 * @method isFalse
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isFalse();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isFalse = function(message) {
  if (this.inspectValue !== false) {
    throw new InspectionError(message || ('Input value should be exacly false. But current type is ' + utils.getTypeOf(this.inspectValue)));
  }

  return this;
};

/**
 * Inspects whether input is not false
 *
 * @method isNotFalse
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotFalse();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotFalse = function(message) {
  if (this.inspectValue === false) {
    throw new InspectionError(message || ('Typeof input should not be false. But it is false!'));
  }

  return this;
};

/**
 * Inspects whether input is a regexp
 *
 * @method isRegExp
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(/.+/).isRegExp();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isRegExp = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'regexp') {
    throw new InspectionError(message || ('Typeof input should be a regexp. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not a regexp
 *
 * @method isNotRegExp
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('.*').isNotRegExp();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotRegExp = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'regexp') {
    throw new InspectionError(message || ('Typeof input should not be a regexp. But it is a regexp!'));
  }

  return this;
};

/**
 * Inspects whether input is a number
 *
 * @method isNumber
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isNumber();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNumber = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'number') {
    throw new InspectionError(message || ('Typeof input should be a number. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not a number
 *
 * @method isNotNumber
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotNumber();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotNumber = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'number') {
    throw new InspectionError(message || ('Typeof input should not be a number. But it is a number!'));
  }

  return this;
};


/**
 * Inspects whether input is NaN
 *
 * @method isNaN
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isNaN();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNaN = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'NaN') {
    throw new InspectionError(message || ('Typeof input should be a NaN. But current type is ' + type + '!'));
  }

  return this;
};

/**
 * Inspects whether input is not a NaN
 *
 * @method isNotNaN
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotNaN();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotNaN = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'NaN') {
    throw new InspectionError(message || ('Typeof input should not be a NaN. But it is a NaN!'));
  }

  return this;
};

/**
 * Inspects whether input is a class
 *
 * @method isClass
 * @version v1.1.0
 *
 * @param  {string} [message] Custom error message
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isClass = function(message) {
  if (!utils.isClass(this.inspectValue)) {
    var type = utils.getTypeOf(this.inspectValue);
    throw new InspectionError(message || ('Input should be a Class but input value is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not a class
 *
 * @method isNotClass
 * @version v1.1.0
 *
 * @param  {string} [message] Custom error message
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotClass = function(message) {
  if (utils.isClass(this.inspectValue)) {
    throw new InspectionError(message || ('Input should not be a Class but input value is a class'));
  }

  return this;
};

/**
 * Inspects whether input is a function
 *
 * @method isFunction
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(function).isFunction();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isFunction = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'function') {
    throw new InspectionError(message || ('Typeof input should be a function. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not function
 *
 * @method isNotFunction
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(true).isNotFunction();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotFunction = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'function') {
    throw new InspectionError(message || ('Typeof input should not be a function. But it is function!'));
  }

  return this;
};

/**
 * Inspects whether input is a generator function
 *
 * This test will pass on environments without generator support if type of input value is `function`!
 *
 * @method isGenerator
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(generator function).isGenerator();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isGenerator = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'generator') {
    throw new InspectionError(message || ('Typeof input should be a generator function. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not generator function
 *
 * @method isNotGenerator
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(true).isNotGenerator();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotGenerator = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'generator') {
    throw new InspectionError(message || ('Typeof input should not be a generator function. But it is generator function!'));
  }

  return this;
};

/**
 * Inspects whether input is a promise.
 *
 * A promise is identified if input type is an object and if input has a then and a catch method
 *
 * @method isPromise
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * var promise = new Promise(function(resolve, reject) {
 *
 * });
 *
 * inspect(promise).isPromise();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isPromise = function(message) {
  if (!utils.isPromise(this.inspectValue)) {
    throw new InspectionError(
      message || ('Typeof input should be a promise. But current type is ')
    );
  }

  return this;
};
<commit_msg>Extend error log<commit_after>/**
 * Inspect.js the next generation test inspection library
 *
 * @module Inspect
 */

'use strict';

var utils = require('./lib/inspectUtils');
var InspectionError = require('./lib/inspectionError');
var InputError = require('./lib/errors').InputError;
var ComparisonError = require('./lib/errors').ComparisonError;
var ContainmentError = require('./lib/errors').ContainmentError;

var superstorage = require('superstorage')
var sharedState = superstorage('inspectjs-shared-state');
if (!sharedState.has('counter')) {
  sharedState.set('counter', 0);
}

/**
 * Inspect class
 * @constructor  Inspect
 * @param {any} input Input value
 */
var Inspect = function(input) {
  this.inspectValue = input;
};

/**
 * Inspects whether input is a string
 *
 * @method isString
 * @version  v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isString();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isString = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'string') {
    throw new InspectionError(message || ('Typeof input should be a string. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not a string
 *
 * @method isNotString
 * @version  v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotString();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotString = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'string') {
    throw new InspectionError(message || ('Typeof input should not be a string. But it is a string!'));
  }

  return this;
};

/**
 * Inspects whether input is an array
 *
 * @method isArray
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isArray();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isArray = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'array') {
    throw new InspectionError(message || ('Typeof input should be an array. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not an array
 *
 * @method isNotArray
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotArray();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotArray = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'array') {
    throw new InspectionError(message || ('Typeof input should not be an array. But it is an array!'));
  }

  return this;
};

/**
 * Inspects whether input is an object
 *
 * @method isObject
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isObject();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isObject = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'object') {
    throw new InspectionError(message || ('Typeof input should be an object. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not an object
 *
 * @method isNotObject
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotObject();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotObject = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'object') {
    throw new InspectionError(message || ('Typeof input should not be an object. But it is an object!'));
  }

  return this;
};

/**
 * Inspects whether input is null
 *
 * @method isNull
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(null).isNull();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNull = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'null') {
    throw new InspectionError(message || ('Typeof input should be null. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not null
 *
 * @method isNotNull
 * @version v1.0.0
 *
 * @param  {string} message Custom error message
 *
 * @example {js}
 * inspect(123).isNotNull();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotNull = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'null') {
    throw new InspectionError(message || ('Typeof input should not be null. But it is null!'));
  }

  return this;
};

/**
 * Inspects whether input is undefined
 *
 * @method isUndefined
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(undefined).isUndefined();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isUndefined = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'undefined') {
    throw new InspectionError(message || ('Typeof input should be undefined. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not undefined
 *
 * @method isNotUndefined
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(true).isNotUndefined();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotUndefined = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'undefined') {
    throw new InspectionError(message || ('Typeof input should not be undefined. But it is undefined!'));
  }

  return this;
};

/**
 * Inspects whether input is a boolean
 *
 * @method isBoolean
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isBoolean();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isBoolean = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'boolean') {
    throw new InspectionError(message || ('Typeof input should be a boolean. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not a boolean
 *
 * @method isNotBoolean
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotBoolean();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotBoolean = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'boolean') {
    throw new InspectionError(message || ('Typeof input should not be a boolean. But it is a boolean!'));
  }

  return this;
};

/**
 * Inspects whether input is true
 *
 * @method isTrue
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isTrue();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isTrue = function(message) {
  if (this.inspectValue !== true) {
    throw new InspectionError(message || ('Typeof input should be true. But current type is ' + utils.getTypeOf(this.inspectValue)));
  }

  return this;
};

/**
 * Inspects whether input is not === true
 *
 * @method isNotTrue
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(1).isNotTrue();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotTrue = function(message) {
  if (this.inspectValue === true) {
    throw new InspectionError(message || ('Input value should not be exacly true. But it is true!'));
  }

  return this;
};

/**
 * Inspects whether input is false
 *
 * @method isFalse
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isFalse();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isFalse = function(message) {
  if (this.inspectValue !== false) {
    throw new InspectionError(message || ('Input value should be exacly false. But current type is ' + utils.getTypeOf(this.inspectValue)));
  }

  return this;
};

/**
 * Inspects whether input is not false
 *
 * @method isNotFalse
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotFalse();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotFalse = function(message) {
  if (this.inspectValue === false) {
    throw new InspectionError(message || ('Typeof input should not be false. But it is false!'));
  }

  return this;
};

/**
 * Inspects whether input is a regexp
 *
 * @method isRegExp
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(/.+/).isRegExp();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isRegExp = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'regexp') {
    throw new InspectionError(message || ('Typeof input should be a regexp. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not a regexp
 *
 * @method isNotRegExp
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('.*').isNotRegExp();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotRegExp = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'regexp') {
    throw new InspectionError(message || ('Typeof input should not be a regexp. But it is a regexp!'));
  }

  return this;
};

/**
 * Inspects whether input is a number
 *
 * @method isNumber
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isNumber();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNumber = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'number') {
    throw new InspectionError(message || ('Typeof input should be a number. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not a number
 *
 * @method isNotNumber
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotNumber();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotNumber = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'number') {
    throw new InspectionError(message || ('Typeof input should not be a number. But it is a number!'));
  }

  return this;
};


/**
 * Inspects whether input is NaN
 *
 * @method isNaN
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect('Foo').isNaN();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNaN = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'NaN') {
    throw new InspectionError(message || ('Typeof input should be a NaN. But current type is ' + type + '!'));
  }

  return this;
};

/**
 * Inspects whether input is not a NaN
 *
 * @method isNotNaN
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(123).isNotNaN();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotNaN = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'NaN') {
    throw new InspectionError(message || ('Typeof input should not be a NaN. But it is a NaN!'));
  }

  return this;
};

/**
 * Inspects whether input is a class
 *
 * @method isClass
 * @version v1.1.0
 *
 * @param  {string} [message] Custom error message
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isClass = function(message) {
  if (!utils.isClass(this.inspectValue)) {
    var type = utils.getTypeOf(this.inspectValue);
    throw new InspectionError(message || ('Input should be a Class but input value is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not a class
 *
 * @method isNotClass
 * @version v1.1.0
 *
 * @param  {string} [message] Custom error message
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotClass = function(message) {
  if (utils.isClass(this.inspectValue)) {
    throw new InspectionError(message || ('Input should not be a Class but input value is a class'));
  }

  return this;
};

/**
 * Inspects whether input is a function
 *
 * @method isFunction
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(function).isFunction();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isFunction = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'function') {
    throw new InspectionError(message || ('Typeof input should be a function. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not function
 *
 * @method isNotFunction
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(true).isNotFunction();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotFunction = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'function') {
    throw new InspectionError(message || ('Typeof input should not be a function. But it is function!'));
  }

  return this;
};

/**
 * Inspects whether input is a generator function
 *
 * This test will pass on environments without generator support if type of input value is `function`!
 *
 * @method isGenerator
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(generator function).isGenerator();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isGenerator = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type !== 'generator') {
    throw new InspectionError(message || ('Typeof input should be a generator function. But current type is ' + type));
  }

  return this;
};

/**
 * Inspects whether input is not generator function
 *
 * @method isNotGenerator
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * inspect(true).isNotGenerator();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isNotGenerator = function(message) {
  var type = utils.getTypeOf(this.inspectValue);
  if (type === 'generator') {
    throw new InspectionError(message || ('Typeof input should not be a generator function. But it is generator function!'));
  }

  return this;
};

/**
 * Inspects whether input is a promise.
 *
 * A promise is identified if input type is an object and if input has a then and a catch method
 *
 * @method isPromise
 * @version v1.0.0
 *
 * @param  {string} [message] Custom error message
 *
 * @example {js}
 * var promise = new Promise(function(resolve, reject) {
 *
 * });
 *
 * inspect(promise).isPromise();
 *
 * @chainable
 * @returns {object} Returns `this` value
 */
Inspect.prototype.isPromise = function(message) {
  if (!utils.isPromise(this.inspectValue)) {
    throw new InspectionError(
      message || ('Typeof input should be a promise. But current type is ' + utils.getTypeOf(this.inspectValue))
    );
  }

  return this;
};

{'fraction_non_alphanumeric': 0.14753208607368623, 'fraction_numerical': 0.0072153757742162055, 'mean_word_length': 3.6841633019291162, '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': '5025739', 'n_tokens_mistral': 10100, 'n_tokens_neox': 10083, 'n_words': 2995}