Check types
@return {Object}
965591
function types () {
        var pub = {};

        var i;
        var keys = Object.keys(revalidator.validate.types);
        var length = keys.length;

        for (i = 0; i < length; i++) {
            pub[keys[i]] = getValidationFunctionForTypesByKey(keys[i]);
        }

        return pub;
    }
831262
function checkType(value, type) {
  if (typeof type === 'string') {
    switch (type) {
      case 'string':
      case 'object':
      case 'number':
      case 'boolean':
      case 'function':
        return typeof value === type;
      case 'class':
        return typeof value === 'function';
      case 'array':
        return value.constructor === Array;
      default:
        return false;
    }
  }
  else {
    return value instanceof type;
  }
}
582646
function isPrimitiveType (obj) {
  return ( typeof obj === 'boolean' ||
       typeof obj === 'number' ||
       typeof obj === 'string' ||
       obj === null ||
       util.isDate(obj) ||
       util.isArray(obj));
}
892890
function defaultForType (type) {
    var def = {
      boolean: true,
      string: '',
      number: undefined,
      array: []
    }

    return def[type]
  }
1304478
function typeOf(value) {
            var s = typeof value;
            if(s === 'object') {
                if(value) {
                    if(value instanceof Array) {
                        s = 'array';
                    }
                } else {
                    s = 'null';
                }
            }
            return s;
        }
755862
function getType(key){

    var o = {
      attributes : this.attributes, 
      CONSIT     : this.CONSIT,
      nodes      : this.nodes
    };
    var ret = false;

    for (var i in o){

      if (key in o[i]){
        ret = i;
        break;
      }

    }

    return ret;

  }
827088
function getTypeFromContext (context) {
  if (!context.method.returns) return undefined

  const returns = [].concat(context.method.returns)
  for (var i = 0, l = returns.length; i < l; i++) {
    if (typeof returns[i] !== 'object' || returns[i].root !== true) continue
    return returns[i].type
  }
}
224275
function isType(t, str) {
        // This function gets the type of `t`, typeof and instanceof are unreliable (typeof null === 'object')
        return Object.prototype.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase() === str;
    }
1000430
function checkType(type,value){
             if(type){
                 if(typeof type == 'string' && type != 'any' &&
                         (type == 'null' ? value !== null : typeof value != type) &&
                         !(value instanceof Array && type == 'array') &&
                         !(value instanceof Date && type == 'date') &&
                         !(type == 'integer' && value%1===0)){
                     return [{property:path,message:(typeof value) + " value found, but a " + type + " is required"}];
                 }
                 if(type instanceof Array){
                     var unionErrors=[];
                     for(var j = 0; j < type.length; j++){ // a union type
                         if(!(unionErrors=checkType(type[j],value)).length){
                             break;
                         }
                     }
                     if(unionErrors.length){
                         return unionErrors;
                     }
                 }else if(typeof type == 'object'){
                     var priorErrors = errors;
                     errors = [];
                     checkProp(value,type,path);
                     var theseErrors = errors;
                     errors = priorErrors;
                     return theseErrors;
                 }
             }
             return [];
         }
852080
function getType(val) {
		switch (typeof val) {
			case 'object':
				return !val ? NUL : (isArray(val) ? ARY : (isMarkup(val) ? RAW : ((val instanceof Date) ? VAL : OBJ)));
			case 'function':
				return FUN;
			case 'undefined':
				return NUL;
			default:
				return VAL;
		}
	}
881024
function getType(value) {

  const type = typeof value;

  if (Array.isArray(value)) {
    return 'array';
  }

  if (value instanceof RegExp) {
    // Old webkits (at least until Android 4.0) return 'function' rather than
    // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
    // passes PropTypes.object.
    return 'object';
  }

  if (isSymbol(type, value)) {
    return 'symbol';
  }

  return type;
}
172967
function type (response) {
  return value => {
    if (!(value instanceof Error)) {
      response.setHeader(
        'Content-Type',
        lookup(typeof value === 'object' ? 'json' : 'text')
      )
    }
    return value instanceof Array ? JSON.stringify(value) : value
  }
}
1232556
def match_type?(object)
            result = object.kind_of_any? self.type_classes
            if not result
                result = object.type_of_any? self.type_types
            end
            
            return result
        end
855059
function (types, hard) {
            for (var t in types) {
                if (types.hasOwnProperty(t)) {
                    (function (prop) {
                        Object.defineProperty(props, prop, {
                            get: function () {
                                for (var i = 0; i < inputs.length; ++i) {
                                    if (!checkType(prop, inputs[i], hard)) {
                                        return false;
                                    }
                                }
                                return true;
                            }
                        });
                    }(t));
                }
            }
        }
1367660
function getTypeOf(item) {
  var type = null;

  if(item) {
    var strValue = item.toString();
    var isObject = /\[object/.test(strValue);
    var isFunction = /function/.test(strValue);
    var isArray = Array.isArray(item);

    if(isArray) {
      type = Array;
    } else if(isFunction) {
      type = Function;
    } else if(isObject) {
      type = Object;
    } else {
      type = null;
    }
  } else {
    type = null;
  }

  return type;
}
1085609
function getType(node) {
    const tagLoaders = {
        script: 'javascript',
        style: 'text/css'
    };

    return get(node, 'attrs.type', tagLoaders[node.tag]);
}
1338771
function typeToPropType(typeInfo) {
    if (typeInfo.type === "string") {
        return React.PropTypes.string;
    } else if (typeInfo.type === "boolean") {
        return React.PropTypes.bool;
    } else if (typeInfo.type === "number") {
        return React.PropTypes.number;
    } else if (typeInfo.type === "enum") {
        return React.PropTypes.oneOf(typeInfo.values);
    } else if (typeInfo.type === "any") {
        return React.PropTypes.any;
    } else if (typeInfo.type === "reference") {
        if (typeInfo.name === "Function") {
            return React.PropTypes.func;
        } else if (typeInfo.name === "Array") {
            var itemPropType = typeToPropType(typeInfo.typeArguments[0]);
            return itemPropType ? React.PropTypes.arrayOf(itemPropType) : React.PropTypes.array;
        } else if (getIn(window, typeInfo.name)) {
            var instance = getIn(window, typeInfo.name);
            return React.PropTypes.instanceOf(instance);
        }
    } else {
        console.warn("react-winjs typeToPropType: unable to find propType for type: " + JSON.stringify(typeInfo, null, 2));
    }
}