function jsxAttr(name, value) {
	if (options.attr) {
		const result = options.attr(name, value);
		if (typeof result === 'string') return result;
	}

	value = normalizeAttrValue(value);

	if (name === 'ref' || name === 'key') return '';
	if (name === 'style' && typeof value === 'object') {
		let str = '';
		for (let prop in value) {
			let val = value[prop];
			if (val != null && val !== '') {
				const name =
					prop[0] == '-'
						? prop
						: JS_TO_CSS[prop] ||
							(JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());

				str = str + name + ':' + val + ';';
			}
		}
		return name + '="' + encodeEntities(str) + '"';
	}

	if (
		value == null ||
		value === false ||
		typeof value === 'function' ||
		typeof value === 'object'
	) {
		return '';
	} else if (value === true) return name;

	return name + '="' + encodeEntities('' + value) + '"';
}
Serialize an HTML attribute to a string. This function is not
expected to be used directly, but rather through a precompile
JSX transform
@param {string} name The attribute name
@param {*} value The attribute value
@returns {string}