New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.0 to 0.7.1

4

History.md

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

# 0.7.1 (2016-03-11)
* fix bracket notation number parsing (de5d19)
# 0.7.0 (2015-10-17)

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

5

index.js

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

var string = between[1];
var index = parseInt(string, 10);
// +var converts the variable into a number
// better than parseInt because it doesn't truncate away trailing
// letters and actually fails if whole thing is not a number
var index = +string;

@@ -196,0 +199,0 @@ // If the characters between the brackets is not a number it is an

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

@@ -10,7 +10,8 @@ "main": "index.js",

"devDependencies": {
"domify": "~1.0.0",
"zuul": "~3.6.0"
"domify": "~1.4.0",
"zuul": "~3.10.1"
},
"scripts": {
"test": "zuul -- test/index.js"
"test": "zuul -- test/index.js",
"test-local": "zuul --local -- test/index.js"
},

@@ -17,0 +18,0 @@ "repository": {

@@ -62,3 +62,3 @@ # form-serialize [![Build Status](https://travis-ci.org/defunctzombie/form-serialize.png?branch=master)](https://travis-ci.org/defunctzombie/form-serialize)

only [successfull control](http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2) form fields are serialized (with the exception of disabled fields if disabled option is set)
only [successful control](http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2) form fields are serialized (with the exception of disabled fields if disabled option is set)

@@ -65,0 +65,0 @@ multiselect fields with more than one value will result in an array of values in the `hash` output mode using the default hash serializer

@@ -320,2 +320,27 @@ var assert = require('assert');

test('bracket notation - hashes with a digit as the first symbol in a key', function() {
var form = domify('<form>' +
'<input type="text" name="somekey[123abc][first]" value="first_value">' +
'<input type="text" name="somekey[123abc][second]" value="second_value">' +
'</form>');
hash_check(form, {
'somekey': {
'123abc': {
'first': 'first_value',
'second': 'second_value'
}
}
});
empty_check_hash(form, {
'somekey': {
'123abc': {
'first': 'first_value',
'second': 'second_value'
}
}
});
});
test('bracket notation - select multiple', function() {

@@ -322,0 +347,0 @@ var form = domify('<form>' +

Sorry, the diff of this file is not supported yet

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