object-to-formdata
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11192
0