cross-node/browser compatible getPrototypeOf
193772
function getPrototypeOf (val) {
  var proto
  try {
    proto = Object.getPrototypeOf(val)
  } catch (e) {
    /* eslint-disable */
    proto = val.__proto__
    /* eslint-enable */
  }
  return proto
}
763805
function getCompsByType(type, element) {
    var comps = this.getComps(element),
        targetComps = [];
    for (var i = 0; i < comps.length; i++) {
        var comp = comps[i];
        if (comp && comp.type == type) targetComps.push(comp);
    }
    return targetComps;
}
204188
function findType (node, typeInfo, nestedCall) {
  typeInfo = typeInfo || { noNull: false, isArray: false, noNullArrayValues: false }
  if (!node) {
    return typeInfo
  }

  // Validate nested call, the parser will check first if the array can be null
  // then it will check if the values inside can be null
  if (!nestedCall && node.kind === 'NonNullType') {
    typeInfo.noNull = true
  }

  // If it is an array, validate if the values inside can be null
  if (nestedCall && typeInfo.isArray && node.kind === 'NonNullType') {
    typeInfo.noNullArrayValues = true
  }

  if (node.kind === 'ListType') {
    typeInfo.isArray = true
  }

  if (node.name) {
    typeInfo.type = node.name.value
  }

  return findType(node.type, typeInfo, true)
}
646811
function isPrototype(value) {
  var Ctor = value && value.constructor,
      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5;

  return value === proto;
}
1165775
function typeOf (value) {
  if (value === null) return 'null'
  var valueType = typeof value
  if (valueType === 'object') {
    valueType = value.constructor.name.toLowerCase()
  }
  return valueType
}
1219885
function inType() {
  var path = this;
  while (path) {
    var _arr3 = arguments;

    for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
      var type = _arr3[_i3];
      if (path.node.type === type) return true;
    }
    path = path.parentPath;
  }

  return false;
}
1268525
function getNodesByTypeHelper(childArray, type) {
  let nodes = [].concat(childArray.filter(element => element.type === type));
  let otherNodes = [];
  childArray.forEach(node => {
    if (hasChildren(node)) {
      otherNodes = otherNodes.concat(getNodesByTypeHelper(node.children, type));
    }
  });
  return nodes.concat(otherNodes);
}
155761
function getTypeAttributes(element, attributes, parent) {
  let typeAttributes = [];

  if (element.element !== 'string' && !!parent) {
    // String is the default type. Any parentless type is probably a
    // section (# Data Structures or + Attributes) so we don't print
    // the type there either.
    typeAttributes.push(element.element);
  }

  if (attributes) {
    const tmp = attributes.get('typeAttributes');
    if (tmp) {
      typeAttributes = typeAttributes.concat(tmp.toValue() || []);
    }
  }

  return typeAttributes;
}
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;

  }
752875
function objectHasType (node) {
      const typeProperty = node.properties
        .find(p =>
          utils.getStaticPropertyName(p.key) === 'type' &&
          (
            p.value.type !== 'ArrayExpression' ||
            p.value.elements.length > 0
          )
        )
      return Boolean(typeProperty)
    }
512066
function getTypeSelector() {
  const type = NodeType.TypeSelectorType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  let content = [];

  if (checkNamePrefix(pos)) content.push(getNamePrefix());

  content = content.concat(getIdentOrInterpolation());

  return newNode(type, content, line, column);
}
687391
function getType(value) {
  if (Array.isArray(value)) {
    return 'array';
  } else if (value === null) {
    return 'null';
  }
  return typeof value === 'undefined' ? 'undefined' : _typeof(value);
}
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;
}
556240
function(str) {
      var type, res;

      str = str || '';
      res = str.match(/(uncaught)?\s?(\w+)\:/i);
      type = (res) ? res[2] : null;

      return type;
    }
1169290
function (el, type) {
		while (el && el.nodeName.toLowerCase() !== type.toLowerCase()) {
			el = el.parentNode;
		}
		return el;
	}
1323088
function getPrototype(value) {
    let prototype;

    if (!_.isUndefined(value) && !_.isNull(value)) {
        if (!_.isObject(value)) {
            prototype = value.constructor.prototype;
        }
        else if (_.isFunction(value)) {
            prototype = value.prototype;
        }
        else {
            prototype = Object.getPrototypeOf(value);
        }
    }

    return prototype;
}
118256
private Node tryFoldTypeof(Node originalTypeofNode) {
    checkArgument(originalTypeofNode.isTypeOf());

    Node argumentNode = originalTypeofNode.getFirstChild();
    if (argumentNode == null || !NodeUtil.isLiteralValue(argumentNode, true)) {
      return originalTypeofNode;
    }

    String typeNameString = null;

    switch (argumentNode.getToken()) {
      case FUNCTION:
        typeNameString = "function";
        break;
      case STRING:
        typeNameString = "string";
        break;
      case NUMBER:
        typeNameString = "number";
        break;
      case TRUE:
      case FALSE:
        typeNameString = "boolean";
        break;
      case NULL:
      case OBJECTLIT:
      case ARRAYLIT:
        typeNameString = "object";
        break;
      case VOID:
        typeNameString = "undefined";
        break;
      case NAME:
        // We assume here that programs don't change the value of the
        // keyword undefined to something other than the value undefined.
        if ("undefined".equals(argumentNode.getString())) {
          typeNameString = "undefined";
        }
        break;
      default:
        break;
    }

    if (typeNameString != null) {
      Node newNode = IR.string(typeNameString);
      reportChangeToEnclosingScope(originalTypeofNode);
      originalTypeofNode.replaceWith(newNode);
      markFunctionsDeleted(originalTypeofNode);

      return newNode;
    }

    return originalTypeofNode;
  }