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

object-to-formdata

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-to-formdata - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

2

package.json
{
"name": "object-to-formdata",
"version": "1.4.2",
"version": "1.4.3",
"description": "A convenient JavaScript function that converts an object to a FormData instance",

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

@@ -22,5 +22,10 @@ # object-to-formdata

const formData = objectToFormData(object, options)
const formData = objectToFormData(
object,
options, // optional
existingFormData, // optional
keyPrefix // optional
)
console.log(formData)
```

@@ -343,7 +343,6 @@ import test from 'ava'

test('FormData instance as second parameter', t => {
const foo = 'foo'
const data = new FormData()
const existingFormData = new FormData()
const formData = objectToFormData({
foo
}, data)
foo: 'bar'
}, existingFormData)

@@ -353,6 +352,6 @@ t.true(formData.append.calledOnce)

'foo',
foo
'bar'
])
t.is(formData.get('foo'), foo)
t.is(data, formData)
t.is(formData.get('foo'), 'bar')
t.is(formData, existingFormData)
})
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