code: function createBucket(optns = {}) {
    // ensure options
    let { connection } = optns;
    connection = (connection || mongoose.connection);
    const options =
      _.merge({}, DEFAULT_BUCKET_OPTIONS, _.omit(optns, 'connection'));
  
    // check if connection is connected.
    if (!isConnected(connection)) {
      const error = new Error('Mongoose is not connected');
      error.status = 500;
      throw error;
    }
  
    // create GridFSBucket
    const db = connection.db;
    const bucket = new GridFSBucket(db, options);
  
    // return bucket
    return bucket;
  }
docs: /* statics 
  @function createBucket
  @name createBucket
  @description Create GridFSBucket
  @param {Object} [optns] Optional settings.
  @param {Connection} [optns.connection = mongoose.connection] A valid
  instance of mongoose connection.
  @param {String} [optns.bucketName="fs"] The 'files' and 'chunks' collections
  will be prefixed with the bucket name followed by a dot.
  @param {Number} [optns.chunkSizeBytes=255 * 1024] Number of bytes stored in
  each chunk. Defaults to 255KB
  @param {Object} [optns.writeConcern] Optional write concern to be passed to
  write operations, for instance `{ w: 1 }`
  @param {Object} [optns.readPreference] Optional read preference to be passed
  to read operations
  @return {GridFSBucket} an instance of GridFSBucket
  @author lally elias <lallyelias87@mail.com>
  @since 1.0.0
  @version 0.1.0
  @public
  @static
  @example
  
  const bucket = createBucket();
  const bucket = createBucket({ bucketName });
  const bucket = createBucket({ buketName, connection });