source/index.js
function parse_query_string(raw_query_string, strategy) {
        const trimmed_raw_query_string = raw_query_string.trim();
        if ([ '', '?', '#', '?#' ].includes(trimmed_raw_query_string)) {
            return {};
        }
        const hash_index = trimmed_raw_query_string.indexOf('#');
        /* eslint-disable indent */
        const query_string = trimmed_raw_query_string
            .substring(
                '?' === trimmed_raw_query_string.substring(0, 1) ? 1 : 0,
                -1 === hash_index ? undefined : hash_index,
                )
            .replace(/(?:^[&\s]+|[&\s]+$)/g, '') // trim white space and &'s
            .replace(/[&\s]*&[&\s]*/g, '&')
            ;
        /* eslint-enable indent */
        if ('' === query_string) {
            return {};
        }
        return strategy.parse_query_string(query_string);
    }
function parse_query_string(raw_query_string, strategy) {
        const trimmed_raw_query_string = raw_query_string.trim();
        if ([ '', '?', '#', '?#' ].includes(trimmed_raw_query_string)) {
            return {};
        }
        const hash_index = trimmed_raw_query_string.indexOf('#');
        /* eslint-disable indent */
        const query_string = trimmed_raw_query_string
            .substring(
                '?' === trimmed_raw_query_string.substring(0, 1) ? 1 : 0,
                -1 === hash_index ? undefined : hash_index,
                )
            .replace(/(?:^[&\s]+|[&\s]+$)/g, '') // trim white space and &'s
            .replace(/[&\s]*&[&\s]*/g, '&')
            ;
        /* eslint-enable indent */
        if ('' === query_string) {
            return {};
        }
        return strategy.parse_query_string(query_string);
    }
function parse_query_string ( raw_query_string , strategy ) { const trimmed_raw_query_string = raw_query_string . trim ( ) ; if ( [ '' , '?' , '#' , '?#' ] . includes ( trimmed_raw_query_string ) ) { return { } ; } const hash_index = trimmed_raw_query_string . indexOf ( '#' ) ; /* eslint-disable indent */ const query_string = trimmed_raw_query_string . substring ( '?' === trimmed_raw_query_string . substring ( 0 , 1 ) ? 1 : 0 , - 1 === hash_index ? undefined : hash_index , ) . replace ( / (?:^[&\s]+|[&\s]+$) / g , '' ) // trim white space and &'s . replace ( / [&\s]*&[&\s]* / g , '&' ) ; /* eslint-enable indent */ if ( '' === query_string ) { return { } ; } return strategy . parse_query_string ( query_string ) ; }
-----------
-----------