src/compiler.js
function compileSelfClosingTag(tag, props) {
    const compiledProps = compileProps(props);

    return contains(tag, ['br', 'hr', 'img'])
        ? `<${tag}${compiledProps} />`
        : `<${tag}${compiledProps}></${tag}>`;
}
function compileSelfClosingTag(tag, props) {
    const compiledProps = compileProps(props);

    return contains(tag, ['br', 'hr', 'img'])
        ? `<${tag}${compiledProps} />`
        : `<${tag}${compiledProps}></${tag}>`;
}
function compileSelfClosingTag ( tag , props ) { const compiledProps = compileProps ( props ) ; return contains ( tag , [ 'br' , 'hr' , 'img' ] ) ? ` ${ tag } ${ compiledProps } ` : ` ${ tag } ${ compiledProps } ${ tag } ` ; }
Compiles a self-closing tag, dealing with elements that may or not be
self-closing

@param {String} tag - JSX component name
@param {Object} props - Element properties
Compiles a self - closing tag dealing with elements that may or not be self - closing