url-querystring

2.1.1 • Public • Published

url-querystring

NPM version build status Test coverage Downloads

Split an url into a qs and url component. Also unwraps the qs component by calling querystring.parse under the hood.

Installation

npm install url-querystring

Usage

var extract = require('url-querystring');
var qs = require('querystring');
 
var res = extract('http://foobar.com/hello?tab=hello&method=something');
// => '{
//       url: 'http://foobar.com/hello',
//       qs: {
//         tab: hello,
//         method: something
//       }
//     }'
 
qs.parse(res.qs);
// => {tab: hello, method: something}

License

MIT

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i url-querystring

    Weekly Downloads

    32

    Version

    2.1.1

    License

    MIT

    Last publish

    Collaborators

    • yoshuawuyts