query-string
Advanced tools
Comparing version 1.0.1 to 2.0.0
{ | ||
"name": "query-string", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "Parse and stringify URL query strings", | ||
@@ -24,8 +24,7 @@ "keywords": [ | ||
"email": "sindresorhus@gmail.com", | ||
"url": "http://sindresorhus.com" | ||
"url": "sindresorhus.com" | ||
}, | ||
"files": [ | ||
"query-string.js" | ||
"index.js" | ||
], | ||
"main": "query-string.js", | ||
"repository": "sindresorhus/query-string", | ||
@@ -32,0 +31,0 @@ "scripts": { |
@@ -8,31 +8,25 @@ # query-string [![Build Status](https://travis-ci.org/sindresorhus/query-string.svg?branch=master)](https://travis-ci.org/sindresorhus/query-string) | ||
```sh | ||
``` | ||
$ npm install --save query-string | ||
``` | ||
```sh | ||
$ bower install --save query-string | ||
``` | ||
```sh | ||
$ component install sindresorhus/query-string | ||
``` | ||
## Usage | ||
```js | ||
var queryString = require('query-string'); | ||
console.log(location.search); | ||
// ?foo=bar | ||
//=> ?foo=bar | ||
var parsed = queryString.parse(location.search); | ||
console.log(parsed); | ||
// {foo: 'bar'} | ||
//=> {foo: 'bar'} | ||
console.log(location.hash); | ||
// #token=bada55cafe | ||
//=> #token=bada55cafe | ||
var parsedHash = queryString.parse(location.hash); | ||
console.log(parsedHash); | ||
// {token: 'bada55cafe'} | ||
//=> {token: 'bada55cafe'} | ||
@@ -45,3 +39,3 @@ parsed.foo = 'unicorn'; | ||
console.log(location.search); | ||
// ?foo=unicorn&ilike=pizza | ||
//=> ?foo=unicorn&ilike=pizza | ||
``` | ||
@@ -74,3 +68,3 @@ | ||
}); | ||
// foo=bar&nested=%7B%22unicorn%22%3A%22cake%22%7D | ||
//=> foo=bar&nested=%7B%22unicorn%22%3A%22cake%22%7D | ||
``` | ||
@@ -77,0 +71,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4403
38
73