index.js
function get(element) {
  var name = element.nodeName.toLowerCase()
    , value;

  if (get.parser[element.type] && hasOwn.call(get.parser, element.type)) {
    value = get.parser[element.type](element);
  } else if (get.parser[name] && hasOwn.call(get.parser, name)) {
    value = get.parser[name](element);
  }

  if (value !== undefined) return value;

  value = element.value;

  return 'string' === typeof value
  ? value.replace(/\r/g, '')
  : value === null ? '' : value;
}
function get(element) {
  var name = element.nodeName.toLowerCase()
    , value;

  if (get.parser[element.type] && hasOwn.call(get.parser, element.type)) {
    value = get.parser[element.type](element);
  } else if (get.parser[name] && hasOwn.call(get.parser, name)) {
    value = get.parser[name](element);
  }

  if (value !== undefined) return value;

  value = element.value;

  return 'string' === typeof value
  ? value.replace(/\r/g, '')
  : value === null ? '' : value;
}
function get ( element ) { var name = element . nodeName . toLowerCase ( ) , value ; if ( get . parser [ element . type ] && hasOwn . call ( get . parser , element . type ) ) { value = get . parser [ element . type ] ( element ) ; } else if ( get . parser [ name ] && hasOwn . call ( get . parser , name ) ) { value = get . parser [ name ] ( element ) ; } if ( value !== undefined ) return value ; value = element . value ; return 'string' === typeof value ? value . replace ( / \r / g , '' ) : value === null ? '' : value ; }
Get the value from a given element.

@param {Element} element The HTML element we need to extract the value from.
@returns {Mixed} The value of the element.
@api public
Get the value from a given element .