import qs from 'qs';

export default function () {
    const stringifyQuery = <T>(query: T) => {
        return qs.stringify(query);
    };
    const parseQuery = (query: string) => {
        return qs.parse(query);
    };

    return {
        stringifyQuery,
        parseQuery,
    };
}
