New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

formstream

Package Overview
Dependencies
Maintainers
1
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 0.0.8 to 1.0.0

.jshintignore

8

History.md
1.0.0 / 2014-11-04
==================
* fix(field): support stream.field(String, Number)
* chore: fix links
* chore: use npm scripts instead of Makefile
* fix test case on node@0.8
0.0.8 / 2014-01-17

@@ -3,0 +11,0 @@ ==================

21

lib/formstream.js

@@ -42,3 +42,3 @@ /**!

var fs = require('fs');
var dethroy = require('dethroy');
var destroy = require('destroy');

@@ -138,5 +138,18 @@ var PADDING = '--';

/**
* Add a form field
* @param {String} name field name
* @param {String|Buffer} value field value
* @return {this}
*/
FormStream.prototype.field = function (name, value) {
var buffer = new Buffer(value);
return this.buffer(name, buffer);
if (!Buffer.isBuffer(value)) {
// field(String, Number)
// https://github.com/qiniu/nodejs-sdk/issues/123
if (typeof value === 'number') {
value = String(value);
}
value = new Buffer(value);
}
return this.buffer(name, value);
};

@@ -155,3 +168,3 @@

this.once('destroy', function () {
dethroy(stream);
destroy(stream);
});

@@ -158,0 +171,0 @@

38

package.json
{
"name": "formstream",
"version": "0.0.8",
"version": "1.0.0",
"description": "A multipart/form-data encoded stream, helper for file upload.",
"main": "index.js",
"scripts": {
"test": "make test-all"
"test": "mocha --check-leaks -R spec -t 5000 -r should test/*.test.js",
"test-cov": "node --harmony node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- --check-leaks -t 5000 -r should test/*.test.js",
"test-travis": "node --harmony node_modules/.bin/istanbul cover node_modules/.bin/_mocha --report lcovonly -- --check-leaks -t 5000 -r should test/*.test.js",
"jshint": "jshint .",
"autod": "autod -w --prefix '~'",
"cnpm": "npm install --registry=https://registry.npm.taobao.org",
"contributors": "contributors -f plain -o AUTHORS"
},
"config": {
"blanket": { "pattern": "formstream/lib" },
"cov": { "threshold": 100 }
},
"repository": {
"type": "git",
"url": "git://github.com/fengmk2/formstream.git"
"url": "git://github.com/node-modules/formstream.git"
},

@@ -27,6 +29,6 @@ "keywords": [

"dependencies": {
"buffer-concat": "0.0.1",
"dethroy": "1.0.0",
"mime": "1.2.11",
"pause-stream": "0.0.11"
"buffer-concat": "~0.0.1",
"destroy": "~1.0.3",
"mime": "~1.2.11",
"pause-stream": "~0.0.11"
},

@@ -36,12 +38,10 @@ "devDependencies": {

"blanket": "*",
"connect": "2.12.0",
"connect-multiparty": "1.0.1",
"connect-multiparty": "~1.2.5",
"contributors": "*",
"cov": "*",
"coveralls": "*",
"express": "~4.10.1",
"istanbul-harmony": "*",
"mocha": "*",
"mocha-lcov-reporter": "*",
"pedding": "0.0.3",
"should": "2.1.1",
"urllib": "0.5.5"
"pedding": "~1.0.0",
"should": "~4.1.0",
"urllib": "~2.0.2"
},

@@ -48,0 +48,0 @@ "author": "fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)",

@@ -1,6 +0,26 @@

formstream [![Build Status](https://secure.travis-ci.org/fengmk2/formstream.png)](http://travis-ci.org/fengmk2/formstream) [![Coverage Status](https://coveralls.io/repos/fengmk2/formstream/badge.png)](https://coveralls.io/r/fengmk2/formstream)
==========
# formstream
[![NPM](https://nodei.co/npm/formstream.png?downloads=true&stars=true)](https://nodei.co/npm/formstream/)
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Gittip][gittip-image]][gittip-url]
[![David deps][david-image]][david-url]
[![node version][node-image]][node-url]
[![npm download][download-image]][download-url]
[npm-image]: https://img.shields.io/npm/v/formstream.svg?style=flat-square
[npm-url]: https://npmjs.org/package/formstream
[travis-image]: https://img.shields.io/travis/node-modules/formstream.svg?style=flat-square
[travis-url]: https://travis-ci.org/node-modules/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
[gittip-image]: https://img.shields.io/gittip/fengmk2.svg?style=flat-square
[gittip-url]: https://www.gittip.com/fengmk2/
[david-image]: https://img.shields.io/david/node-modules/formstream.svg?style=flat-square
[david-url]: https://david-dm.org/node-modules/formstream
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/formstream.svg?style=flat-square
[download-url]: https://npmjs.org/package/formstream
![logo](https://raw.github.com/fengmk2/formstream/master/logo.png)

@@ -171,3 +191,3 @@

## Authors
## Contributors

@@ -178,9 +198,9 @@ ```bash

project : formstream
repo age : 10 months
active : 15 days
commits : 28
repo age : 2 years, 1 month
active : 17 days
commits : 33
files : 14
authors :
21 fengmk2 75.0%
7 XiNGRZ 25.0%
26 fengmk2 78.8%
7 XiNGRZ 21.2%
```

@@ -192,3 +212,3 @@

Copyright (c) 2012 - 2013 fengmk2 &lt;fengmk2@gmail.com&gt;
Copyright (c) 2012 - 2014 fengmk2 &lt;fengmk2@gmail.com&gt;

@@ -195,0 +215,0 @@ Permission is hereby granted, free of charge, to any person obtaining

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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