src/utils.js
function(element) {
    if('TEXTAREA'===element.nodeName || 'SELECT'===element.nodeName
      || ('INPUT'===element.nodeName&&element.hasAttribute('type')
        &&('text'===element.getAttribute('type')
          || 'number'===element.getAttribute('type')
          || 'password'===element.getAttribute('type')
          || 'file'===element.getAttribute('type')
          || 'date'===element.getAttribute('type'))
      )
    ) {
      return true;
    }
    return false;
  }
function(element) {
    if('TEXTAREA'===element.nodeName || 'SELECT'===element.nodeName
      || ('INPUT'===element.nodeName&&element.hasAttribute('type')
        &&('text'===element.getAttribute('type')
          || 'number'===element.getAttribute('type')
          || 'password'===element.getAttribute('type')
          || 'file'===element.getAttribute('type')
          || 'date'===element.getAttribute('type'))
      )
    ) {
      return true;
    }
    return false;
  }
function ( element ) { if ( 'TEXTAREA' === element . nodeName || 'SELECT' === element . nodeName || ( 'INPUT' === element . nodeName && element . hasAttribute ( 'type' ) && ( 'text' === element . getAttribute ( 'type' ) || 'number' === element . getAttribute ( 'type' ) || 'password' === element . getAttribute ( 'type' ) || 'file' === element . getAttribute ( 'type' ) || 'date' === element . getAttribute ( 'type' ) ) ) ) { return true ; } return false ; }
Tell if the element is a form element that can contain a value
Tell if the element is a form element that can contain a value