query-string
Advanced tools
Comparing version 2.4.1 to 2.4.2
@@ -21,4 +21,6 @@ 'use strict'; | ||
var parts = param.replace(/\+/g, ' ').split('='); | ||
var key = parts[0]; | ||
var val = parts[1]; | ||
// Firefox (pre 40) decodes `%3D` to `=` | ||
// https://github.com/sindresorhus/query-string/pull/37 | ||
var key = parts.shift(); | ||
var val = parts.length > 0 ? parts.join('=') : undefined; | ||
@@ -25,0 +27,0 @@ key = decodeURIComponent(key); |
{ | ||
"name": "query-string", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "Parse and stringify URL query strings", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && mocha" | ||
"test": "xo && ava" | ||
}, | ||
@@ -41,5 +41,5 @@ "files": [ | ||
"devDependencies": { | ||
"mocha": "*", | ||
"ava": "*", | ||
"xo": "*" | ||
} | ||
} |
@@ -16,3 +16,3 @@ # query-string [![Build Status](https://travis-ci.org/sindresorhus/query-string.svg?branch=master)](https://travis-ci.org/sindresorhus/query-string) | ||
```js | ||
var queryString = require('query-string'); | ||
const queryString = require('query-string'); | ||
@@ -22,3 +22,3 @@ console.log(location.search); | ||
var parsed = queryString.parse(location.search); | ||
const parsed = queryString.parse(location.search); | ||
console.log(parsed); | ||
@@ -30,3 +30,3 @@ //=> {foo: 'bar'} | ||
var parsedHash = queryString.parse(location.hash); | ||
const parsedHash = queryString.parse(location.hash); | ||
console.log(parsedHash); | ||
@@ -33,0 +33,0 @@ //=> {token: 'bada55cafe'} |
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
4893
46