@travic/parse-qp
v1.0.11
Published
Parse Query Params
Downloads
12
Maintainers
Readme
Parse Query Params
npm i @travic/parse-qp
or
yarn add @travic/parse-qp
import { parseQP } from '@travic/parse-qp';
// or
const { parseQP } = require('@travic/parse-qp');
// example use
const url =
'http://example.com/?p=page&myquery=string&something=new&hello=world';
parseQP(url);
/* returns
{
p: 'page',
myquery: 'string',
something: 'new',
hello: 'world',
}
*/