code: function mapSync(transformation) {
      return through2.obj(function write(chunk, _, callback) {
        let mappedData;
        try {
          mappedData = transformation(chunk);
        } catch (error) {
          callback(error);
        }
        if (mappedData !== undefined) {
          this.push(mappedData);
        }
  
        callback();
      });
    }
docs: Apply method for stream.
  
  @param {function} transformation
  @return {Stream<File>} Stream processor for files.