gulp-attr-remover

Remove element attribute if predicate is true

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
gulp-attr-remover
100.0.38 years ago8 years agoMinified + gzip package size for gulp-attr-remover in KB

Readme

Remove element attribute if predicate is true

USAGE

function predicate(elem) {
  "use strict";
  if (!/^((ftp|rtsp|mms):)?\/\//.test(elem.attr('href'))) {
    return true;
  }
  return false;
}

gulp.task('default', function () {
  "use strict";

  gulp.src('./cases/*.html')
    .pipe(modf('a', 'href', predicate))
    .pipe(gulp.dest('./output'));
});

LICENSE

MIT