Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

formstream

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formstream - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

14

lib/formstream.js
/**
* Data format:
* Form Data format:
*

@@ -10,2 +10,7 @@

--FormStreamBoundary1349886663601\r\n
Content-Disposition: form-data; name="data"\r\n
Content-Type: application/json\r\n
\r\n
<JSON-FORMAT-CONTENT>\r\n
--FormStreamBoundary1349886663601\r\n
Content-Disposition: form-data; name="file"; filename="formstream.test.js"\r\n

@@ -53,2 +58,4 @@ Content-Type: application/javascript\r\n

this._knownStreamSize = 0;
this.isFormStream = true;
}

@@ -133,5 +140,6 @@

* @param {String|Buffer} value field value
* @param {String} [mimeType] field mimeType
* @return {this}
*/
FormStream.prototype.field = function (name, value) {
FormStream.prototype.field = function (name, value, mimeType) {
if (!Buffer.isBuffer(value)) {

@@ -145,3 +153,3 @@ // field(String, Number)

}
return this.buffer(name, value);
return this.buffer(name, value, null, mimeType);
};

@@ -148,0 +156,0 @@

{
"name": "formstream",
"version": "1.3.1",
"version": "1.4.0",
"description": "A multipart/form-data encoded stream, helper for file upload.",

@@ -16,3 +16,4 @@ "main": "lib/formstream.js",

"lint": "jshint .",
"tsd": "tsd"
"tsd": "tsd",
"contributor": "git-contributor"
},

@@ -42,2 +43,3 @@ "repository": {

"express": "^4.16.4",
"git-contributor": "^2.1.5",
"jshint": "^2.13.6",

@@ -44,0 +46,0 @@ "pedding": "1",

# formstream
[![NPM version][npm-image]][npm-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![npm download][download-image]][download-url]

@@ -9,4 +8,2 @@

[npm-url]: https://npmjs.org/package/formstream
[coveralls-image]: https://img.shields.io/coveralls/node-modules/formstream.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/node-modules/formstream?branch=master
[download-image]: https://img.shields.io/npm/dm/formstream.svg?style=flat-square

@@ -182,3 +179,3 @@ [download-url]: https://npmjs.org/package/formstream

Copyright (c) 2012 - 2014 fengmk2 &lt;fengmk2@gmail.com&gt;
Copyright (c) 2012 - 2014 fengmk2 <fengmk2@gmail.com>
Copyright(c) node-modules and other contributors.

@@ -204,1 +201,12 @@

SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<!-- GITCONTRIBUTOR_START -->
## Contributors
|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/288288?v=4" width="100px;"/><br/><sub><b>xingrz</b></sub>](https://github.com/xingrz)<br/>|[<img src="https://avatars.githubusercontent.com/u/32174276?v=4" width="100px;"/><br/><sub><b>semantic-release-bot</b></sub>](https://github.com/semantic-release-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/13151189?v=4" width="100px;"/><br/><sub><b>fjc0k</b></sub>](https://github.com/fjc0k)<br/>|[<img src="https://avatars.githubusercontent.com/u/18096247?v=4" width="100px;"/><br/><sub><b>mrspeiser</b></sub>](https://github.com/mrspeiser)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|
| :---: | :---: | :---: | :---: | :---: | :---: |
[<img src="https://avatars.githubusercontent.com/u/7326406?v=4" width="100px;"/><br/><sub><b>shaozj</b></sub>](https://github.com/shaozj)<br/>
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Wed May 15 2024 00:34:12 GMT+0800`.
<!-- GITCONTRIBUTOR_END -->

@@ -10,3 +10,3 @@ import { Readable, Stream } from 'stream'

*/
field(name: string, value: string): this
field(name: string, value: string, contentType?: string): this

@@ -13,0 +13,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