formdata-node
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -71,2 +71,15 @@ "use strict"; | ||
/** | ||
* Check if given value is instance of FormData | ||
* Note: This method is not a part of client-side FormData interface. | ||
* | ||
* @param {any} value | ||
* | ||
* @return {boolean} | ||
* | ||
* @public | ||
*/ | ||
static isFormData(value) { | ||
return value instanceof FormData; | ||
} | ||
/** | ||
* @param {array} fields – an optional FormData initial fields. | ||
@@ -77,2 +90,4 @@ * Each initial field should be passed as a collection of the objects | ||
*/ | ||
constructor(_fields = null) { | ||
@@ -136,3 +151,3 @@ (0, _defineProperty2.default)(this, "__getMime", filename => _mimeTypes.default.lookup(filename) || this.__defaultContentType); | ||
}); | ||
(0, _bind.default)([_iterator.default, _symbol.default.asyncIterator, "toString", "toJSON", "inspect", "keys", "values", "entries"], this); | ||
(0, _bind.default)([_iterator.default, _symbol.default.asyncIterator, "toString", "inspect", "keys", "values", "entries"], this); | ||
this.__carriage = "\r\n"; | ||
@@ -155,17 +170,2 @@ this.__defaultContentType = "application/octet-steam"; | ||
/** | ||
* Check if given value is instance of FormData | ||
* Note: This method is not a part of client-side FormData interface. | ||
* | ||
* @param {any} value | ||
* | ||
* @return {boolean} | ||
* | ||
* @public | ||
*/ | ||
static isFormData(value) { | ||
return value instanceof FormData; | ||
} | ||
/** | ||
* @private | ||
@@ -377,6 +377,2 @@ */ | ||
toJSON() { | ||
return "[object FormData]"; | ||
} | ||
inspect() { | ||
@@ -383,0 +379,0 @@ return "FormData"; |
{ | ||
"name": "formdata-node", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "FormData implementation for Node.js. Built over Readable stream and async generators. Can be used to communicate between servers with multipart/form-data format.", | ||
@@ -5,0 +5,0 @@ "repository": "octet-stream/form-data", |
@@ -49,2 +49,5 @@ # FormData | ||
"content-type": `multipart/form-data; boundary=${fd.boundary}` | ||
// Or you can use FormData#headers to get an object with content-type | ||
// header, like this: ...fd.headers | ||
// this will be equivalent of code from above | ||
} | ||
@@ -79,2 +82,6 @@ } | ||
##### `get headers() -> {object}` | ||
Returns object with `content-type` header | ||
#### Instance methods | ||
@@ -81,0 +88,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
29662
172
536