code: function decode(imageBuffer) {
    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { filename: 'saved-image' };
    var callback = arguments[2];
    // eslint-disable-line
    if (!_lodash2.default.isBuffer(imageBuffer)) {
      return callback(new Error('The image is not a Buffer object type'));
    }
  
    (0, _fs.writeFile)(options.filename + '.jpg', imageBuffer, 'base64', function (err) {
      if (err) {
        return callback(err);
      }
  
      return callback(null, 'Image saved successfully to disk!');
    });
  }
docs: Decodes an base64 encoded image buffer and saves it to disk
  
  @name decode
  @param {Buffer} imageBuffer - Image Buffer object
  @param {Object} [options={}] - Options object for extra configuration
  @param {string} options.filename - Filename for the final image file
  @param {fnCallback} callback - Callback function
  @return {fnCallback} - Returns the callback