@prodvair/url-query-params

0.0.5 • Public • Published

URL - Query Params

Parsing and building url GET params with alias

const qp = new URLQueryParams(<queryAlias>)

get query params

qp.queryParamsParse(http://test.test?a=b&c[]=1)
// { a: b, c: [1] }

build query params

qp.queryParamsBuild({ a: b, c: [1] })
// a=b&c[]=1

Default alias:

{
    filters: 'f',
    wheres: 'w',
    orders: 'o',
    groupe: 'g',
    column: 'col',
    condition: 'con',
    value: 'val',
    option: 'opt',
}

@prodvair

Package Sidebar

Install

npm i @prodvair/url-query-params

Weekly Downloads

4

Version

0.0.5

License

CC-BY-4.0

Unpacked Size

23.8 kB

Total Files

4

Last publish

Collaborators

  • prodvair