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.6.0 to 1.6.1

4

__tests__/index.js

@@ -27,3 +27,3 @@ const objectToFormData = require('..');

test('null with noNulls option', () => {
test('null with nulls option', () => {
const formData = objectToFormData(

@@ -34,3 +34,3 @@ {

{
noNulls: true
nulls: false
}

@@ -37,0 +37,0 @@ );

@@ -54,3 +54,3 @@ 'use strict';

cfg.indices = cfg.indices || false;
cfg.noNulls = cfg.noNulls || false;
cfg.nulls = isUndefined(cfg.nulls) ? true : cfg.nulls;
fd = fd || new FormData();

@@ -61,3 +61,3 @@

} else if (isNull(obj)) {
if (!cfg.noNulls) {
if (cfg.nulls) {
fd.append(pre, '');

@@ -64,0 +64,0 @@ }

{
"name": "object-to-formdata",
"version": "1.6.0",
"version": "1.6.1",
"description": "A convenient JavaScript function that converts an object to a FormData instance",

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

@@ -27,5 +27,5 @@ # object-to-formdata

* whether or not to include null values as empty strings in FormData instance
* defaults to false
* defaults to true
*/
noNulls: false
nulls: true
};

@@ -32,0 +32,0 @@

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