Socket
Socket
Sign inDemoInstall

querystringify

Package Overview
Dependencies
0
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.1.0

21

index.js
'use strict';
var has = Object.prototype.hasOwnProperty;
var has = Object.prototype.hasOwnProperty
, undef;

@@ -55,3 +56,5 @@ /**

var pairs = [];
var pairs = []
, value
, key;

@@ -63,5 +66,15 @@ //

for (var key in obj) {
for (key in obj) {
if (has.call(obj, key)) {
pairs.push(encodeURIComponent(key) +'='+ encodeURIComponent(obj[key]));
value = obj[key];
//
// Edge cases where we actually want to encode the value to an empty
// string instead of the stringified value.
//
if (!value && (value === null || value === undef || isNaN(value))) {
value = '';
}
pairs.push(encodeURIComponent(key) +'='+ encodeURIComponent(value));
}

@@ -68,0 +81,0 @@ }

6

package.json
{
"name": "querystringify",
"version": "2.0.0",
"version": "2.1.0",
"description": "Querystringify - Small, simple but powerful query string parser.",

@@ -34,7 +34,7 @@ "main": "index.js",

"devDependencies": {
"assume": "^2.0.1",
"assume": "^2.1.0",
"istanbul": "^0.4.5",
"mocha": "^5.1.1",
"mocha": "^5.2.0",
"pre-commit": "^1.2.2"
}
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc