formdata-node
Advanced tools
Comparing version 3.5.2 to 3.5.3
@@ -8,2 +8,7 @@ "use strict"; | ||
}; | ||
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); | ||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); | ||
}; | ||
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
@@ -15,7 +20,2 @@ if (kind === "m") throw new TypeError("Private method is not writable"); | ||
}; | ||
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); | ||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -70,3 +70,2 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
_FormData_footer.set(this, `${DASHES}${this.boundary}${DASHES}${CRLF.repeat(2)}`); | ||
__classPrivateFieldSet(this, _FormData_stream, stream_1.Readable.from(this), "f"); | ||
if (entries) { | ||
@@ -92,2 +91,5 @@ entries.forEach(({ name, value, filename, options }) => this.append(name, value, filename, options)); | ||
get stream() { | ||
if (!__classPrivateFieldGet(this, _FormData_stream, "f")) { | ||
__classPrivateFieldSet(this, _FormData_stream, stream_1.Readable.from(this), "f"); | ||
} | ||
return __classPrivateFieldGet(this, _FormData_stream, "f"); | ||
@@ -135,4 +137,3 @@ } | ||
get(name) { | ||
name = String(name); | ||
const field = __classPrivateFieldGet(this, _FormData_content, "f").get(name); | ||
const field = __classPrivateFieldGet(this, _FormData_content, "f").get(String(name)); | ||
if (!field) { | ||
@@ -150,4 +151,3 @@ return null; | ||
getAll(name) { | ||
name = String(name); | ||
const field = __classPrivateFieldGet(this, _FormData_content, "f").get(name); | ||
const field = __classPrivateFieldGet(this, _FormData_content, "f").get(String(name)); | ||
if (!field) { | ||
@@ -154,0 +154,0 @@ return []; |
@@ -7,2 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
}; | ||
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); | ||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); | ||
}; | ||
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
@@ -14,7 +19,2 @@ if (kind === "m") throw new TypeError("Private method is not writable"); | ||
}; | ||
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); | ||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); | ||
}; | ||
var _FormData_instances, _FormData_stream, _FormData_content, _FormData_footer, _FormData_getHeader, _FormData_getField, _FormData_setField; | ||
@@ -64,3 +64,2 @@ var _a; | ||
_FormData_footer.set(this, `${DASHES}${this.boundary}${DASHES}${CRLF.repeat(2)}`); | ||
__classPrivateFieldSet(this, _FormData_stream, Readable.from(this), "f"); | ||
if (entries) { | ||
@@ -86,2 +85,5 @@ entries.forEach(({ name, value, filename, options }) => this.append(name, value, filename, options)); | ||
get stream() { | ||
if (!__classPrivateFieldGet(this, _FormData_stream, "f")) { | ||
__classPrivateFieldSet(this, _FormData_stream, Readable.from(this), "f"); | ||
} | ||
return __classPrivateFieldGet(this, _FormData_stream, "f"); | ||
@@ -129,4 +131,3 @@ } | ||
get(name) { | ||
name = String(name); | ||
const field = __classPrivateFieldGet(this, _FormData_content, "f").get(name); | ||
const field = __classPrivateFieldGet(this, _FormData_content, "f").get(String(name)); | ||
if (!field) { | ||
@@ -144,4 +145,3 @@ return null; | ||
getAll(name) { | ||
name = String(name); | ||
const field = __classPrivateFieldGet(this, _FormData_content, "f").get(name); | ||
const field = __classPrivateFieldGet(this, _FormData_content, "f").get(String(name)); | ||
if (!field) { | ||
@@ -148,0 +148,0 @@ return []; |
{ | ||
"name": "formdata-node", | ||
"version": "3.5.2", | ||
"version": "3.5.3", | ||
"description": "FormData implementation for Node.js", | ||
@@ -46,7 +46,7 @@ "repository": "octet-stream/form-data", | ||
"@types/mime-types": "2.1.0", | ||
"@types/node": "15.6.1", | ||
"@types/sinon": "10.0.1", | ||
"@types/node": "15.12.2", | ||
"@types/sinon": "10.0.2", | ||
"@types/supertest": "2.0.11", | ||
"@typescript-eslint/eslint-plugin": "4.25.0", | ||
"@typescript-eslint/parser": "4.25.0", | ||
"@typescript-eslint/eslint-plugin": "4.26.1", | ||
"@typescript-eslint/parser": "4.26.1", | ||
"@zoltu/typescript-transformer-append-js-extension": "1.0.1", | ||
@@ -57,3 +57,3 @@ "ava": "3.15.0", | ||
"dotenv": "^10.0.0", | ||
"eslint": "7.27.0", | ||
"eslint": "7.28.0", | ||
"eslint-config-airbnb-typescript": "12.3.1", | ||
@@ -74,4 +74,4 @@ "eslint-plugin-ava": "12.0.0", | ||
"fetch-blob": "2.1.2", | ||
"mime-types": "2.1.30" | ||
"mime-types": "2.1.31" | ||
} | ||
} |
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
87868
+ Addedmime-db@1.48.0(transitive)
+ Addedmime-types@2.1.31(transitive)
- Removedmime-db@1.47.0(transitive)
- Removedmime-types@2.1.30(transitive)
Updatedmime-types@2.1.31