lib/html2jsx.js
function (node, attribute) {
    switch (attribute.name) {
      case 'style':
        return this._getStyleAttribute(attribute.value);
      default:
        var tagName = jsxTagName(node.tagName);
        var name =
          (ELEMENT_ATTRIBUTE_MAPPING[tagName] &&
            ELEMENT_ATTRIBUTE_MAPPING[tagName][attribute.name]) ||
          ATTRIBUTE_MAPPING[attribute.name] ||
          attribute.name;
        var result = name;

        // Numeric values should be output as {123} not "123"
        if (isNumeric(attribute.value)) {
          result += '={' + attribute.value + '}';
        } else if (attribute.value.length > 0) {
          result += '="' + attribute.value.replace(/"/gm, '&quot;') + '"';
        }
        return result;
    }
  }
function (node, attribute) {
    switch (attribute.name) {
      case 'style':
        return this._getStyleAttribute(attribute.value);
      default:
        var tagName = jsxTagName(node.tagName);
        var name =
          (ELEMENT_ATTRIBUTE_MAPPING[tagName] &&
            ELEMENT_ATTRIBUTE_MAPPING[tagName][attribute.name]) ||
          ATTRIBUTE_MAPPING[attribute.name] ||
          attribute.name;
        var result = name;

        // Numeric values should be output as {123} not "123"
        if (isNumeric(attribute.value)) {
          result += '={' + attribute.value + '}';
        } else if (attribute.value.length > 0) {
          result += '="' + attribute.value.replace(/"/gm, '&quot;') + '"';
        }
        return result;
    }
  }
function ( node , attribute ) { switch ( attribute . name ) { case 'style' : return this . _getStyleAttribute ( attribute . value ) ; default : var tagName = jsxTagName ( node . tagName ) ; var name = ( ELEMENT_ATTRIBUTE_MAPPING [ tagName ] && ELEMENT_ATTRIBUTE_MAPPING [ tagName ] [ attribute . name ] ) || ATTRIBUTE_MAPPING [ attribute . name ] || attribute . name ; var result = name ; // Numeric values should be output as {123} not "123" if ( isNumeric ( attribute . value ) ) { result += '={' + attribute . value + '}' ; } else if ( attribute . value . length > 0 ) { result += '="' + attribute . value . replace ( / " / gm , '&quot;' ) + '"' ; } return result ; } }
Gets a JSX formatted version of the specified attribute from the node

@param {DOMElement} node
@param {object}     attribute
@return {string}
Gets a JSX formatted version of the specified attribute from the node