Use str.trim() instead of str.replace(/^\s+|\s+$/g, '')
Use str.trim() instead of str.replace(/^\s+|\s+$/g, '')

It behaves exactly same

References:
  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim

floatdrop/gulp-plumber,liangyali/gulp-plumber,kmoe/gulp-plumber