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.4.1 to 0.5.0

4

History.md

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

# 0.5.0 (2015-02-08)
* fix specifying custom serializer
# 0.4.1 (2015-01-15)

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

2

index.js

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

var result = (options.hash) ? {} : '';
var serializer = options.serializer || (options.hash) ? hash_serializer : str_serialize;
var serializer = options.serializer || ((options.hash) ? hash_serializer : str_serialize);

@@ -38,0 +38,0 @@ var elements = form.elements || [];

{
"name": "form-serialize",
"version": "0.4.1",
"version": "0.5.0",
"description": "serialize html forms",

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

@@ -210,1 +210,14 @@ var assert = require('assert');

});
test('custom serializer', function() {
var form = domify('<form><input type="text" name="node" value="zuul">/</form>');
assert.deepEqual(serialize(form, {
serializer: function(curry, k, v) {
curry[k] = 'ZUUL';
return curry;
}
}), {
"node": "ZUUL"
});
});
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