code: function PouchAlt(name, opts) {
      if (!(this instanceof PouchAlt)) {
        return new PouchAlt(name, opts);
      }
  
      opts = opts || {};
  
      if (name && typeof name === 'object') {
        opts = name;
        name = opts.name;
        delete opts.name;
      }
  
      opts = assign({}, PouchAlt.__defaults, opts);
  
      // If database endpoint is not remote we will use defaultDirectory as
      // prefix and defaultAdapter as adapter for it.
      if (
        name !== undefined &&
        name.indexOf('http') !== 0 &&
        name.indexOf('https') !== 0
      ) {
        if (!opts.db && options.defaultAdapter) {
          opts.db      = options.defaultAdapter;
          opts.adapter = 'leveldb-mobile';
        }
        if (!opts.prefix) {
          opts.prefix = defaultDirectory;
        }
      }
  
      // Workaround for https://github.com/pouchdb/pouchdb-size/issues/23.
      this._db_name = name;
  
      PouchDB.call(this, name, opts);
    }
docs: Shamelessly stolen from https://github.com/pouchdb/pouchdb/blob/e11a863a80ef746aba0fc3a0e235dbdf2048db5d/packages/node_modules/pouchdb-core/src/setup.js#L58-L90.