Socket
Socket
Sign inDemoInstall

form-urlencoded

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

form-urlencoded - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

6

form-urlencoded.js
// Filename: formurlencoded.js
// Timestamp: 2016.01.18-15:36:37 (last modified)
// Timestamp: 2016.03.07-12:29:28 (last modified)
// Author(s): Bumblehead (www.bumblehead.com), JBlashill (james@blashill.com)

@@ -13,3 +13,3 @@ //

return String(value)
.replace(/[^ !'()~\*]*/g, encodeURIComponent)
.replace(/[^ !'()~\*]/g, encodeURIComponent)
.replace(/ /g, '+')

@@ -60,5 +60,5 @@ .replace(/[!'()~\*]/g, function (ch) {

return filterjoin(keys(data).map(function (key) {
return data && filterjoin(keys(data).map(function (key) {
return nest(key, data[key]);
}));
};
{
"name": "form-urlencoded",
"main": "form-urlencoded",
"version": "1.2.0",
"description": "Return an object as an `x-www-form-urlencoded` string",
"version": "1.2.1",
"description": "Return an object as an 'x-www-form-urlencoded' string",
"author": "Chris <chris@bumblehead.com>",

@@ -7,0 +7,0 @@ "license" : "MIT",

@@ -7,3 +7,3 @@ form-urlencoded

Returns `x-www-form-urlencoded` string data, an encoding often used when an [HTML form is submitted][1]. Form data is serialised in [this format][2] and sent to a server.
Returns 'x-www-form-urlencoded' string data, an encoding often used when an [HTML form is submitted][1]. Form data is serialised in [this format][2] and sent to a server.

@@ -10,0 +10,0 @@

// Filename: form-urlencoded.spec.js
// Timestamp: 2016.01.18-16:00:25 (last modified)
// Timestamp: 2016.03.07-12:30:02 (last modified)
// Author(s): bumblehead <chris@bumblehead.com>

@@ -90,2 +90,12 @@

it("should not break when null argument is given", function () {
expect(
formurlencoded(null, { sorted: true })
).toBe( null );
expect(
formurlencoded(undefined, { sorted: true })
).toBe( undefined );
});
it("should properly encode all ascii characters", function () {

@@ -92,0 +102,0 @@ var testCharEncodingString = "";

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