@octetstream/object-to-form-data
Advanced tools
Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "@octetstream/object-to-form-data", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Serialize given object/collection to a FormData.", | ||
@@ -9,2 +9,3 @@ "repository": "https://github.com/octet-stream/object-to-form-data", | ||
"main": "serialize.js", | ||
"types": "serialize.d.ts", | ||
"engines": { | ||
@@ -11,0 +12,0 @@ "node": ">=7.6" |
@@ -15,4 +15,4 @@ const FormData = require("./form-data") | ||
*/ | ||
function serialize(object, root = null) { | ||
if (!(isArray(object) || isPlainObject(object))) { | ||
function serialize(iterable, root = null) { | ||
if (!(isArray(iterable) || isPlainObject(iterable))) { | ||
throw new TypeError("Expected object or array as the first argument.") | ||
@@ -44,3 +44,3 @@ } | ||
set(root, object) | ||
set(root, iterable) | ||
@@ -47,0 +47,0 @@ return data |
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
5768
7
60