1.0.11 • Published 3 years ago

@travic/parse-qp v1.0.11

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Parse Query Params

ci npm version npm

Coverage lines Coverage functions Coverage branches Coverage statements

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',
}
*/