Return all meta-attributes
@param {string} typeName
@return {Array.<{name:string, kind:string, type:string}>}
966130
function getMetaAttributes(typeName) {
        var metaClass = _global.meta[typeName],
            attrs     = [];
        if (metaClass.super) {
            attrs = getMetaAttributes(metaClass.super);
        }
        if (metaClass.attributes) {
            var i, len, item;
            for (i = 0, len = metaClass.attributes.length; i < len; i++) {
                item = metaClass.attributes[i];
                attrs.push(item);
            }
        }
        return attrs;
    }
1369250
function getCompositeTypes(str){
  var type = getInnerType(str);
  if (type === str) {
    return getType(str);
  }

  var types = type.split(','),
      i = 0, ret = [], typeLength = types.length;

  for(; i < typeLength; i += 1){
    ret.push( parseTypeString(types[i]) );
  }

  return ret;
}
577140
function filterAttributes (name, attributes) {
  const filtered = {}

  if (attributes.href) {
    filtered.href = attributes.href
  }

  return filtered
}
1054241
function getTagAttributes(tagName) {
        var tag;

        if (!cachedAttributes.hasOwnProperty(tagName)) {
            tag = tagData.tags[tagName];
            cachedAttributes[tagName] = [];
            if (tag.attributes) {
                cachedAttributes[tagName] =  cachedAttributes[tagName].concat(tag.attributes);
            }
            tag.attributeGroups.forEach(function (group) {
                if (tagData.attributeGroups.hasOwnProperty(group)) {
                    cachedAttributes[tagName] = cachedAttributes[tagName].concat(tagData.attributeGroups[group]);
                }
            });
            cachedAttributes[tagName] = _.uniq(cachedAttributes[tagName].sort(), true);
        }
        return cachedAttributes[tagName];
    }
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);
}
1340469
function getExamples(meta){
  var examples = [];
  if(meta.example){
    examples = examples.concat(meta.example);
  }
  if(meta.examples){
    examples = examples.concat(meta.examples);
  }
  return examples;
}
1369424
@Override
    public String getMetaTypeAttributeName(String pid, String attributeID) {
        return metatypeRegistry.getAttributeName(pid, attributeID);
    }
821312
function getAttributeSet (attributes) {
  let attrs = {}
  Array.prototype.slice.apply(attributes).forEach(function (attr) {
    attrs[attr.name] = attr.value
  })
  return attrs
}
979009
private static Map<String, String> getAttributeMap(String source) {

		if (!StringUtils.hasText(source)) {
			return Collections.emptyMap();
		}

		Map<String, String> attributes = new HashMap<>();
		Matcher matcher = KEY_AND_VALUE_PATTERN.matcher(source);

		while (matcher.find()) {
			attributes.put(matcher.group(1), matcher.group(2));
		}

		return attributes;
	}
983040
public static Collection<Class<?>> getTypes(Collection<String> typeNames) {
        Set<Class<?>> types = new HashSet<>();
        for (String typeName : typeNames) {
            types.add(ClassHelper.getType(typeName));
        }
        return types;
    }
1341590
public Metadata getMetadata(String typeName, String scope) {
        URL url = METADATA_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID(), scope, typeName);
        BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "GET");
        BoxJSONResponse response = (BoxJSONResponse) request.send();
        return new Metadata(JsonObject.readFrom(response.getJSON()));
    }
55079
function getNameAttributeValue(element) {
	for (let i = 0, len = element.attributes.length; i < len; i++) {
		let attribute = element.attributes[i]

		if (attribute.name === 'name') {
			if (attribute.type !== 'attribute-simple') {
				throw new Error(`name attribute for ${element.name} tag must be a literal value`)
			}
			return attribute.value
		}
	}

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

    return get(node, 'attrs.type', tagLoaders[node.tag]);
}
607092
function getCompsByElement(element) {
    var elements = element ? element : this.elements;
    var returnComps = [];
    if (typeof elements == 'string') {
        elements = document.querySelectorAll(elements);
    }
    if (!isArray(elements) && !(elements instanceof NodeList)) elements = [elements];
    each(elements, function (i, element) {
        if (element) {
            element.querySelectorAll('[u-meta]').forEach(function (ele) {
                if (ele['u-meta']) {
                    var comp = ele['u-meta'];
                    if (comp) returnComps.push(comp);
                }
            });
        }
    });
    return returnComps;
}
322499
function attributes(attrs) {
  attrs = attrs || {};
  var ident = attrs.id || '';
  var classes = attrs.classes || [];
  var keyvals = [];
  Object.keys(attrs).forEach(function (k) {
    if (k !== 'classes' && k !== 'id') keyvals.push([k,attrs[k]]);
  });
  return [ident, classes, keyvals];
}
608800
function getElAttributes(tag,attr) {
        var obj, knownBooleans, attrs, attrName, attrVal;

        obj = {};

        // known boolean attributes
        // we can check for matching boolean properties, but older browsers
        // won't know about HTML5 boolean attributes that we still read from
        knownBooleans = ',' + 'autoplay,controls,loop,muted,default' + ',';

        if (tag && tag.attributes && tag.attributes.length > 0) {
            attrs = tag.attributes;

            for (var i = attrs.length - 1; i >= 0; i--) {
                attrName = attrs[i].name;
                attrVal = attrs[i].value;

                // check for known booleans
                // the matching element property will return a value for typeof
                if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(',' + attrName + ',') !== -1) {
                    // the value of an included boolean attribute is typically an empty
                    // string ('') which would equal false if we just check for a false value.
                    // we also don't want support bad code like autoplay='false'
                    attrVal = (attrVal !== null) ? true : false;
                }

                if(attr && attrName == attr){
                    return attrVal;
                }

                obj[attrName] = attrVal;
            }
        }
        if(attr && typeof attr == 'string'){
            return tag[attr];
        }
        return obj;
    }
1267967
def get_types_by_attr(resource, template_id=None):
    

    resource_type_templates = []

    #Create a list of all of this resources attributes.
    attr_ids = []
    for res_attr in resource.attributes:
        attr_ids.append(res_attr.attr_id)
    all_resource_attr_ids = set(attr_ids)

    all_types = db.DBSession.query(TemplateType).options(joinedload_all('typeattrs')).filter(TemplateType.resource_type==resource.ref_key)
    if template_id is not None:
        all_types = all_types.filter(TemplateType.template_id==template_id)

    all_types = all_types.all()

    #tmpl type attrs must be a subset of the resource's attrs
    for ttype in all_types:
        type_attr_ids = []
        for typeattr in ttype.typeattrs:
            type_attr_ids.append(typeattr.attr_id)
        if set(type_attr_ids).issubset(all_resource_attr_ids):
            resource_type_templates.append(ttype)

    return resource_type_templates