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

form-data-set

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

form-data-set - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0

CONTRIBUTION.md

3

element.js

@@ -9,2 +9,5 @@ var walk = require('dom-walk')

var hash = {}
if (rootElem.name) {
hash[rootElem.name] = rootElem
}

@@ -11,0 +14,0 @@ walk(rootElem, function (child) {

2

package.json
{
"name": "form-data-set",
"version": "1.2.0",
"version": "2.0.0",
"description": "Extract form data from a hash of elements",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -5,2 +5,3 @@ var test = require("tape")

var FormData = require("../index")
var getFormData = require("../element")

@@ -24,1 +25,18 @@ test("FormData works with <select> elements", function (assert) {

})
test("getFormData works when root element has a name", function(assert) {
var element = h("select", {
name: "foo"
}, [
h("option", { value: "one" })
, h("option", { value: "two", selected: true })
])
var data = getFormData(element)
assert.deepEqual(data, {
foo: "two"
})
assert.end()
})
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