Can be made much nicer with Lodash: https://github.com/sindresorhus/gulp-rework/blob/master/index.js#L6