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

formdata-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formdata-polyfill - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

18

FormData.js
const map = new WeakMap
const wm = o => map.get(o)
function normilizeValue([value, filename]) {
function normalizeValue([value, filename]) {
if (value instanceof Blob)

@@ -21,3 +21,3 @@ value = new File([value], filename, {

function normilizeArgs(name, value, filename) {
function normalizeArgs(name, value, filename) {
if (arguments.length < 2)

@@ -60,4 +60,4 @@ throw new TypeError(`2 arguments required, but only ${arguments.length} present.`)

this.append(name, elm.value)
else if (type === 'checkbox' && checked)
this.append(name, value)
else if (type === 'checkbox')
if (checked) this.append(name, value)
else

@@ -108,3 +108,3 @@ this.append(name, value)

for (let value of map[name])
yield [name, normilizeValue(value)]
yield [name, normalizeValue(value)]
}

@@ -133,3 +133,3 @@

let map = wm(this)
return map[name] ? normilizeValue(map[name][0]) : null
return map[name] ? normalizeValue(map[name][0]) : null
}

@@ -145,3 +145,3 @@

getAll(name) {
return (wm(this)[name] || []).map(normilizeValue)
return (wm(this)[name] || []).map(normalizeValue)
}

@@ -281,3 +281,3 @@

for (let [method, overide] of [
['append', normilizeArgs],
['append', normalizeArgs],
['delete', stringify],

@@ -287,3 +287,3 @@ ['get', stringify],

['has', stringify],
['set', normilizeArgs]
['set', normalizeArgs]
]) {

@@ -290,0 +290,0 @@ let orig = FormDataPolyfill.prototype[method]

{
"name": "formdata-polyfill",
"version": "1.0.5",
"version": "1.0.6",
"description": "HTML5 `FormData` polyfill for Browsers.",

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

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