2.1.1 • Published 10 years ago

url-querystring v2.1.1

Weekly downloads
93
License
MIT
Repository
github
Last release
10 years ago

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