Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

form-serialize

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

form-serialize - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

4

History.md

@@ -0,1 +1,5 @@

# 0.7.2 (2017-06-11)
* Serialize properly radio input with empty value (1b7a042)
# 0.7.1 (2016-03-11)

@@ -2,0 +6,0 @@

2

index.js

@@ -81,3 +81,3 @@ // get successful control from form and assemble into object

// if options empty is true, continue only if its radio
if (!val && element.type == 'radio') {
if (val == undefined && element.type == 'radio') {
continue;

@@ -84,0 +84,0 @@ }

{
"name": "form-serialize",
"version": "0.7.1",
"version": "0.7.2",
"description": "serialize html forms",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -259,2 +259,15 @@ var assert = require('assert');

test('radio - empty value', function() {
var form = domify('<form>' +
'<input type="radio" name="foo" value="" checked="checked"/>' +
'<input type="radio" name="foo" value="bar2"/>' +
'</form>');
hash_check(form, {});
str_check(form, '');
empty_check(form, 'foo=');
empty_check_hash(form, {
'foo':''
});
});
// in this case the radio buttons and checkboxes share a name key

@@ -261,0 +274,0 @@ // the checkbox value should still be honored

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