Get a string with type name of the given value

@param {any} val

@return {string}

@api private
541128
function getTag(val) {
  const tag = Object.prototype.toString.call(val).slice(8, -1)

  if (basicTypes.includes(tag.toLowerCase())) {
    return tag.toLowerCase()
  }

  return tag
}
343442
function type(value) {
  let valueType = typeof value;
  if (Array.isArray(value)) {
    valueType = 'array';
  } else if (value instanceof Date) {
    valueType = 'date';
  } else if (value === null) {
    valueType = 'null';
  }

  return valueType;
}
712913
def format_value(self, val):
        """"""
        if isinstance(val, six.text_type):
            return self.format_string(val)
        else:
            return six.text_type(val)
687391
function getType(value) {
  if (Array.isArray(value)) {
    return 'array';
  } else if (value === null) {
    return 'null';
  }
  return typeof value === 'undefined' ? 'undefined' : _typeof(value);
}
604097
function(val) {
    if (/^(?:auto|inherit)$/.test(val)) {
      return val;
    }
    var zIndex;
    if (typeof val === "number" && !_isNaN(val)) {
      zIndex = val;
    } else if (typeof val === "string") {
      zIndex = _getSafeZIndex(_parseInt(val, 10));
    }
    return typeof zIndex === "number" ? zIndex : "auto";
  }
1050136
function serialize(val) {
	if (val == null) {
		return 'NULL'

	} else if (typeof val == 'string') {
		return "'" + val.replace(/(\\)/g, '\\$1').replace(/(')/g, '\\$1') + "'";
	
	} else if (typeof val == 'number') {
		if (isNaN(val)) {
			return 'NULL';
		} else {
			return val.toString();
		}

	} else if ([true, false].indexOf(val) != -1) {
		return val.toString().toUpperCase();

	} else if (val instanceof Date) {
		return "'" + makeDateStr(val) + "'";

	} else {
		throw "Unable to serialize variable of type `" + typeof val + "`!";
	}
}
45990
function(val, defValue) {
		if (typeof defValue === "undefined") defValue = true;
		if (typeof val === "undefined") return defValue;
		if (val.toLowerCase() === "true" || val >= 1) return true;

		return false;
	}
1220039
function (val) {
		var parseDate = this.options.parseDate,
			ret,
			key,
			format,
			match;

		if (parseDate) {
			ret = parseDate(val);
		}
			
		if (typeof val === 'string') {
			for (key in this.dateFormats) {
				format = this.dateFormats[key];
				match = val.match(format.regex);
				if (match) {
					ret = format.parser(match);
				}
			}
		}
		return ret;
	}
753021
protected function getValueType($val)
    {
        $type = 'String';
        if ($this->auto_convert_types === true && is_numeric($val)) {
            $type = 'Number';
        }

        return $type;
    }
24622
function(val) {
	if ( ! val) return false;
	if (typeof(val) === 'number' || typeof(val) === 'boolean') {
		return true;
	}
	if (typeof(val) === 'object' && val.length === undefined) {
		assert(typeof(val) !== 'function', "yessy(function) indicates a mistake: "+val);
		val = Object.getOwnPropertyNames(val);
	}
	if (val.length === 0) {
		return false;
	}
	if (val.length) {
		for (var i = 0; i < val.length; i++) {
			if (val[i]) return true;
		}
		return false;
	}
	return true;
}
1278842
def data_type=(new_val)
      return nil if @data_type == new_val
      raise JSS::InvalidDataError, "data_type must be a string, one of: #{DATA_TYPES.join(', ')}" unless DATA_TYPES.include? new_val
      @data_type = new_val
      @need_to_update = true
    end
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;
		}
	}
593657
function getType(key, req) {
  var val = this.getKey(key, req);
  if(val === undefined) return undefined;
  return val.rtype || TYPE_NAMES.STRING;
}
803302
function(value) {
        switch (values.typeOf(value)) {
            case 'Null':
                return 'null';

            case 'Boolean':
            case 'Number':
            case 'RegExp':
                return String(value);

            case 'String':
                return value;

            case 'Date':
            case 'Duration':
                return value.valueOf();

            case 'Filter':
                return value.source;

            case 'Array':
            case 'Object':
                return values.inspect(value);
        }
    }
212083
function(val){
   if(typeof val === "undefined" || val === null){
      return "";
   }
   else if(val === true){
      return "1";
   }
   else if(val === false){
      return "0";
   }
   else if(typeof val === "string"){
      return val;
   }
   else if(!isNaN(val)){
      return String(val) + "";
   }
   else if(typeof val === "object"){
      return JSON.stringify(val) + "";
   }
   else if(Array.isArray(val)){
      return JSON.stringify(val) + "";
   }
   return "";
}
563894
function getStringValue(value)
{
	var return_value = '';
	switch(typeof(value))
	{
		case 'string':
			return_value = "'" + value + "'";
			break;

		case 'number':
			return_value = value;
			break;

		case 'object':

			if(value==null)
					return_value = value;
			else
			{
					var valuestring = JSON.stringify(value);
					return_value = "'" + valuestring + "'";
			}
			break;

		default:
			return_value = "'" + value + "'";
			break;
	}
  return return_value;
}
835937
public static String typeString(Object value) {
        return null == value || Primitive.NULL == value
            ? "null"
            : value instanceof Primitive
                ? ((Primitive) value).getType().getSimpleName()
                : typeString(value.getClass());
    }