lib/babel.js
function getElementName (props, tag) {
  if (typeof props.id === 'string' && !placeholderRe.test(props.id)) {
    return camelCase(props.id)
  }
  if (typeof props.className === 'string' && !placeholderRe.test(props.className)) {
    return camelCase(props.className.split(' ')[0])
  }
  return tag || 'nanohtml'
}
function getElementName (props, tag) {
  if (typeof props.id === 'string' && !placeholderRe.test(props.id)) {
    return camelCase(props.id)
  }
  if (typeof props.className === 'string' && !placeholderRe.test(props.className)) {
    return camelCase(props.className.split(' ')[0])
  }
  return tag || 'nanohtml'
}
function getElementName ( props , tag ) { if ( typeof props . id === 'string' && ! placeholderRe . test ( props . id ) ) { return camelCase ( props . id ) } if ( typeof props . className === 'string' && ! placeholderRe . test ( props . className ) ) { return camelCase ( props . className . split ( ' ' ) [ 0 ] ) } return tag || 'nanohtml' }
Try to return a nice variable name for an element based on its HTML id,
classname, or tagname.
Try to return a nice variable name for an element based on its HTML id classname or tagname .