node_modules/mongoose/node_modules/mongodb/lib/read_concern.js
/**
     * Construct a ReadConcern given an options object.
     *
     * @param options - The options object from which to extract the write concern.
     */
Construct a ReadConcern given an options object.
@param options - The options object from which to extract the write concern.
Construct a ReadConcern given an options object . @param options - The options object from which to extract the write concern .
static fromOptions(options) {
        if (options == null) {
            return;
        }
        if (options.readConcern) {
            const { readConcern } = options;
            if (readConcern instanceof ReadConcern) {
                return readConcern;
            }
            else if (typeof readConcern === 'string') {
                return new ReadConcern(readConcern);
            }
            else if ('level' in readConcern && readConcern.level) {
                return new ReadConcern(readConcern.level);
            }
        }
        if (options.level) {
            return new ReadConcern(options.level);
        }
    }
static fromOptions ( options ) { if ( options == null ) { return ; } if ( options . readConcern ) { const { readConcern } = options ; if ( readConcern instanceof ReadConcern ) { return readConcern ; } else if ( typeof readConcern === 'string' ) { return new ReadConcern ( readConcern ) ; } else if ( 'level' in readConcern && readConcern . level ) { return new ReadConcern ( readConcern . level ) ; } } if ( options . level ) { return new ReadConcern ( options . level ) ; } }
Construct a ReadConcern given an options object.
Construct a ReadConcern given an options object .