src/backbone.syphon.js
function(view, config) {
  var formInputs = getForm(view);

  formInputs = _.reject(formInputs, function(el) {
    var reject;
    var myType = getElementType(el);
    var extractor = config.keyExtractors.get(myType);
    var identifier = extractor($(el));

    var foundInIgnored = _.find(config.ignoredTypes, function(ignoredTypeOrSelector) {
      return (ignoredTypeOrSelector === myType) || $(el).is(ignoredTypeOrSelector);
    });

    var foundInInclude = _.includes(config.include, identifier);
    var foundInExclude = _.includes(config.exclude, identifier);

    if (foundInInclude) {
      reject = false;
    } else {
      if (config.include) {
        reject = true;
      } else {
        reject = (foundInExclude || foundInIgnored);
      }
    }

    return reject;
  });

  return formInputs;
}
function(view, config) {
  var formInputs = getForm(view);

  formInputs = _.reject(formInputs, function(el) {
    var reject;
    var myType = getElementType(el);
    var extractor = config.keyExtractors.get(myType);
    var identifier = extractor($(el));

    var foundInIgnored = _.find(config.ignoredTypes, function(ignoredTypeOrSelector) {
      return (ignoredTypeOrSelector === myType) || $(el).is(ignoredTypeOrSelector);
    });

    var foundInInclude = _.includes(config.include, identifier);
    var foundInExclude = _.includes(config.exclude, identifier);

    if (foundInInclude) {
      reject = false;
    } else {
      if (config.include) {
        reject = true;
      } else {
        reject = (foundInExclude || foundInIgnored);
      }
    }

    return reject;
  });

  return formInputs;
}
function ( view , config ) { var formInputs = getForm ( view ) ; formInputs = _ . reject ( formInputs , function ( el ) { var reject ; var myType = getElementType ( el ) ; var extractor = config . keyExtractors . get ( myType ) ; var identifier = extractor ( $ ( el ) ) ; var foundInIgnored = _ . find ( config . ignoredTypes , function ( ignoredTypeOrSelector ) { return ( ignoredTypeOrSelector === myType ) || $ ( el ) . is ( ignoredTypeOrSelector ) ; } ) ; var foundInInclude = _ . includes ( config . include , identifier ) ; var foundInExclude = _ . includes ( config . exclude , identifier ) ; if ( foundInInclude ) { reject = false ; } else { if ( config . include ) { reject = true ; } else { reject = ( foundInExclude || foundInIgnored ) ; } } return reject ; } ) ; return formInputs ; }
Retrieve all of the form inputs from the form
Retrieve all of the form inputs from the form