lib/operation.js
function flatten (options) {
  this.options.flatten = is.bool(options) ? options : true;
  if (is.object(options)) {
    this._setColourOption('flattenBackground', options.background);
  }
  return this;
}
function flatten (options) {
  this.options.flatten = is.bool(options) ? options : true;
  if (is.object(options)) {
    this._setColourOption('flattenBackground', options.background);
  }
  return this;
}
function flatten ( options ) { this . options . flatten = is . bool ( options ) ? options : true ; if ( is . object ( options ) ) { this . _setColourOption ( 'flattenBackground' , options . background ) ; } return this ; }
Merge alpha transparency channel, if any, with a background.
@param {Object} [options]
@param {String|Object} [options.background={r: 0, g: 0, b: 0}] - background colour, parsed by the [color](https://www.npmjs.org/package/color) module, defaults to black.
@returns {Sharp}
Merge alpha transparency channel if any with a background .