Socket
Socket
Sign inDemoInstall

query-string

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

query-string - npm Package Compare versions

Comparing version 6.4.2 to 6.5.0

19

index.js

@@ -40,3 +40,3 @@ 'use strict';

return key => (result, value, index) => {
if (!value) {
if (value === null || value === undefined || value.length === 0) {
return result;

@@ -156,3 +156,13 @@ }

function removeHash(input) {
const hashStart = input.indexOf('#');
if (hashStart !== -1) {
input = input.slice(0, hashStart);
}
return input;
}
function extract(input) {
input = removeHash(input);
const queryStart = input.indexOf('?');

@@ -253,11 +263,6 @@ if (queryStart === -1) {

exports.parseUrl = (input, options) => {
const hashStart = input.indexOf('#');
if (hashStart !== -1) {
input = input.slice(0, hashStart);
}
return {
url: input.split('?')[0] || '',
url: removeHash(input).split('?')[0] || '',
query: parse(extract(input), options)
};
};
{
"name": "query-string",
"version": "6.4.2",
"version": "6.5.0",
"description": "Parse and stringify URL query strings",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "xo && ava && tsd-check"
"test": "xo && ava && tsd"
},

@@ -47,5 +47,5 @@ "files": [

"fast-check": "^1.5.0",
"tsd-check": "^0.3.0",
"tsd": "^0.7.0",
"xo": "^0.24.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc