@travic/parse-qp
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

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

Package Sidebar

Install

npm i @travic/parse-qp

Weekly Downloads

4

Version

1.0.11

License

ISC

Unpacked Size

4.6 kB

Total Files

6

Last publish

Collaborators

  • travic