lib/custom.js
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 ''
}
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 ''
}
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 ( ` ${ element . name } ` ) } return attribute . value } } return '' }
Return the value of the `value` attribute
@param {Token} element - must be of type 'element'
@returns {string}
Return the value of the value attribute