formstream 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/History.md +5 -0
- package/README.md +1 -23
- package/lib/formstream.js +2 -12
- package/package.json +17 -19
- package/.jshintignore +0 -4
- package/.jshintrc +0 -95
- package/.npmignore +0 -7
- package/AUTHORS +0 -6
- package/index.js +0 -1
package/History.md
CHANGED
package/README.md
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
[![NPM version][npm-image]][npm-url]
|
|
4
4
|
[![build status][travis-image]][travis-url]
|
|
5
5
|
[![Test coverage][coveralls-image]][coveralls-url]
|
|
6
|
-
[![Gittip][gittip-image]][gittip-url]
|
|
7
6
|
[![David deps][david-image]][david-url]
|
|
8
|
-
[![node version][node-image]][node-url]
|
|
9
7
|
[![npm download][download-image]][download-url]
|
|
10
8
|
|
|
11
9
|
[npm-image]: https://img.shields.io/npm/v/formstream.svg?style=flat-square
|
|
@@ -14,17 +12,11 @@
|
|
|
14
12
|
[travis-url]: https://travis-ci.org/node-modules/formstream
|
|
15
13
|
[coveralls-image]: https://img.shields.io/coveralls/node-modules/formstream.svg?style=flat-square
|
|
16
14
|
[coveralls-url]: https://coveralls.io/r/node-modules/formstream?branch=master
|
|
17
|
-
[gittip-image]: https://img.shields.io/gittip/fengmk2.svg?style=flat-square
|
|
18
|
-
[gittip-url]: https://www.gittip.com/fengmk2/
|
|
19
15
|
[david-image]: https://img.shields.io/david/node-modules/formstream.svg?style=flat-square
|
|
20
16
|
[david-url]: https://david-dm.org/node-modules/formstream
|
|
21
|
-
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
|
|
22
|
-
[node-url]: http://nodejs.org/download/
|
|
23
17
|
[download-image]: https://img.shields.io/npm/dm/formstream.svg?style=flat-square
|
|
24
18
|
[download-url]: https://npmjs.org/package/formstream
|
|
25
19
|
|
|
26
|
-

|
|
27
|
-
|
|
28
20
|
A [multipart/form-data](http://tools.ietf.org/html/rfc2388) encoded stream, helper for file upload.
|
|
29
21
|
|
|
30
22
|
## Install
|
|
@@ -188,26 +180,12 @@ Emitted when the stream has received no more 'data' events will happen.
|
|
|
188
180
|
|
|
189
181
|
See [Node.js Documentation](http://nodejs.org/api/stream.html#stream_event_end) for more.
|
|
190
182
|
|
|
191
|
-
## Contributors
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
$ git summary
|
|
195
|
-
|
|
196
|
-
project : formstream
|
|
197
|
-
repo age : 2 years, 1 month
|
|
198
|
-
active : 17 days
|
|
199
|
-
commits : 33
|
|
200
|
-
files : 14
|
|
201
|
-
authors :
|
|
202
|
-
26 fengmk2 78.8%
|
|
203
|
-
7 XiNGRZ 21.2%
|
|
204
|
-
```
|
|
205
|
-
|
|
206
183
|
## License
|
|
207
184
|
|
|
208
185
|
(The MIT License)
|
|
209
186
|
|
|
210
187
|
Copyright (c) 2012 - 2014 fengmk2 <fengmk2@gmail.com>
|
|
188
|
+
Copyright(c) node-modules and other contributors.
|
|
211
189
|
|
|
212
190
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
213
191
|
a copy of this software and associated documentation files (the
|
package/lib/formstream.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* formstream - lib/formstream.js
|
|
3
|
-
*
|
|
4
|
-
* Copyright(c) 2012 - 2014 fengmk2 <fengmk2@gmail.com>
|
|
5
|
-
* MIT Licensed
|
|
6
|
-
*
|
|
1
|
+
/**
|
|
7
2
|
* Data format:
|
|
8
3
|
*
|
|
9
4
|
|
|
@@ -26,13 +21,8 @@ Content-Type: image/png\r\n
|
|
|
26
21
|
*
|
|
27
22
|
*/
|
|
28
23
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Module dependencies.
|
|
33
|
-
*/
|
|
24
|
+
'use strict';
|
|
34
25
|
|
|
35
|
-
require('buffer-concat');
|
|
36
26
|
var Stream = require('stream');
|
|
37
27
|
var parseStream = require('pause-stream');
|
|
38
28
|
var util = require('util');
|
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "formstream",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A multipart/form-data encoded stream, helper for file upload.",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "lib/formstream.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"lib"
|
|
8
|
+
],
|
|
6
9
|
"scripts": {
|
|
7
|
-
"test": "mocha
|
|
8
|
-
"test-cov": "
|
|
9
|
-
"test-travis": "
|
|
10
|
+
"test": "mocha -R spec -t 5000 -r should test/*.test.js",
|
|
11
|
+
"test-cov": "istanbul cover node_modules/.bin/_mocha -- -t 5000 -r should test/*.test.js",
|
|
12
|
+
"test-travis": "istanbul cover node_modules/.bin/_mocha --report lcovonly -- -t 5000 -r should test/*.test.js",
|
|
10
13
|
"jshint": "jshint .",
|
|
11
|
-
"autod": "autod -w --prefix '
|
|
12
|
-
"cnpm": "npm install --registry=https://registry.npm.taobao.org",
|
|
13
|
-
"contributors": "contributors -f plain -o AUTHORS"
|
|
14
|
+
"autod": "autod -w --prefix '^'"
|
|
14
15
|
},
|
|
15
16
|
"repository": {
|
|
16
17
|
"type": "git",
|
|
@@ -26,22 +27,19 @@
|
|
|
26
27
|
"request"
|
|
27
28
|
],
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"mime": "~1.2.11",
|
|
30
|
+
"destroy": "^1.0.4",
|
|
31
|
+
"mime": "^1.3.4",
|
|
32
32
|
"pause-stream": "~0.0.11"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"autod": "*",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"express": "~4.10.1",
|
|
40
|
-
"istanbul-harmony": "*",
|
|
36
|
+
"connect-multiparty": "1",
|
|
37
|
+
"express": "4",
|
|
38
|
+
"istanbul": "*",
|
|
41
39
|
"mocha": "*",
|
|
42
|
-
"pedding": "
|
|
43
|
-
"should": "
|
|
44
|
-
"urllib": "
|
|
40
|
+
"pedding": "1",
|
|
41
|
+
"should": "4",
|
|
42
|
+
"urllib": "2"
|
|
45
43
|
},
|
|
46
44
|
"author": "fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)",
|
|
47
45
|
"license": "MIT"
|
package/.jshintignore
DELETED
package/.jshintrc
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// JSHint Default Configuration File (as on JSHint website)
|
|
3
|
-
// See http://jshint.com/docs/ for more details
|
|
4
|
-
|
|
5
|
-
"maxerr" : 50, // {int} Maximum error before stopping
|
|
6
|
-
|
|
7
|
-
// Enforcing
|
|
8
|
-
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
|
|
9
|
-
"camelcase" : false, // true: Identifiers must be in camelCase
|
|
10
|
-
"curly" : true, // true: Require {} for every new block or scope
|
|
11
|
-
"eqeqeq" : true, // true: Require triple equals (===) for comparison
|
|
12
|
-
"forin" : false, // true: Require filtering for..in loops with obj.hasOwnProperty()
|
|
13
|
-
"immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
|
|
14
|
-
"indent" : false, // {int} Number of spaces to use for indentation
|
|
15
|
-
"latedef" : false, // true: Require variables/functions to be defined before being used
|
|
16
|
-
"newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()`
|
|
17
|
-
"noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
|
|
18
|
-
"noempty" : true, // true: Prohibit use of empty blocks
|
|
19
|
-
"nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
|
|
20
|
-
"plusplus" : false, // true: Prohibit use of `++` & `--`
|
|
21
|
-
"quotmark" : false, // Quotation mark consistency:
|
|
22
|
-
// false : do nothing (default)
|
|
23
|
-
// true : ensure whatever is used is consistent
|
|
24
|
-
// "single" : require single quotes
|
|
25
|
-
// "double" : require double quotes
|
|
26
|
-
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
|
|
27
|
-
"unused" : true, // true: Require all defined variables be used
|
|
28
|
-
"strict" : true, // true: Requires all functions run in ES5 Strict Mode
|
|
29
|
-
"trailing" : false, // true: Prohibit trailing whitespaces
|
|
30
|
-
"maxparams" : false, // {int} Max number of formal params allowed per function
|
|
31
|
-
"maxdepth" : false, // {int} Max depth of nested blocks (within functions)
|
|
32
|
-
"maxstatements" : false, // {int} Max number statements per function
|
|
33
|
-
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
|
|
34
|
-
"maxlen" : false, // {int} Max number of characters per line
|
|
35
|
-
|
|
36
|
-
// Relaxing
|
|
37
|
-
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
|
|
38
|
-
"boss" : true, // true: Tolerate assignments where comparisons would be expected
|
|
39
|
-
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
|
|
40
|
-
"eqnull" : false, // true: Tolerate use of `== null`
|
|
41
|
-
"es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
|
|
42
|
-
"esnext" : true, // true: Allow ES.next (ES6) syntax (ex: `const`)
|
|
43
|
-
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
|
|
44
|
-
// (ex: `for each`, multiple try/catch, function expression…)
|
|
45
|
-
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
|
|
46
|
-
"expr" : true, // true: Tolerate `ExpressionStatement` as Programs
|
|
47
|
-
"funcscope" : false, // true: Tolerate defining variables inside control statements"
|
|
48
|
-
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
|
|
49
|
-
"iterator" : false, // true: Tolerate using the `__iterator__` property
|
|
50
|
-
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
|
|
51
|
-
"laxbreak" : true, // true: Tolerate possibly unsafe line breakings
|
|
52
|
-
"laxcomma" : false, // true: Tolerate comma-first style coding
|
|
53
|
-
"loopfunc" : false, // true: Tolerate functions being defined in loops
|
|
54
|
-
"multistr" : true, // true: Tolerate multi-line strings
|
|
55
|
-
"proto" : false, // true: Tolerate using the `__proto__` property
|
|
56
|
-
"scripturl" : false, // true: Tolerate script-targeted URLs
|
|
57
|
-
"smarttabs" : false, // true: Tolerate mixed tabs/spaces when used for alignment
|
|
58
|
-
"shadow" : true, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
|
|
59
|
-
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
|
|
60
|
-
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
|
|
61
|
-
"validthis" : false, // true: Tolerate using this in a non-constructor function
|
|
62
|
-
|
|
63
|
-
// Environments
|
|
64
|
-
"browser" : true, // Web Browser (window, document, etc)
|
|
65
|
-
"couch" : false, // CouchDB
|
|
66
|
-
"devel" : true, // Development/debugging (alert, confirm, etc)
|
|
67
|
-
"dojo" : false, // Dojo Toolkit
|
|
68
|
-
"jquery" : false, // jQuery
|
|
69
|
-
"mootools" : false, // MooTools
|
|
70
|
-
"node" : true, // Node.js
|
|
71
|
-
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
|
|
72
|
-
"prototypejs" : false, // Prototype and Scriptaculous
|
|
73
|
-
"rhino" : false, // Rhino
|
|
74
|
-
"worker" : false, // Web Workers
|
|
75
|
-
"wsh" : false, // Windows Scripting Host
|
|
76
|
-
"yui" : false, // Yahoo User Interface
|
|
77
|
-
"noyield" : true, // allow generators without a yield
|
|
78
|
-
|
|
79
|
-
// Legacy
|
|
80
|
-
"nomen" : false, // true: Prohibit dangling `_` in variables
|
|
81
|
-
"onevar" : false, // true: Allow only one `var` statement per function
|
|
82
|
-
"passfail" : false, // true: Stop on first error
|
|
83
|
-
"white" : false, // true: Check against strict whitespace and indentation rules
|
|
84
|
-
|
|
85
|
-
// Custom Globals
|
|
86
|
-
"globals" : { // additional predefined global variables
|
|
87
|
-
// mocha
|
|
88
|
-
"describe": true,
|
|
89
|
-
"it": true,
|
|
90
|
-
"before": true,
|
|
91
|
-
"afterEach": true,
|
|
92
|
-
"beforeEach": true,
|
|
93
|
-
"after": true
|
|
94
|
-
}
|
|
95
|
-
}
|
package/.npmignore
DELETED
package/AUTHORS
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# Ordered by date of first contribution.
|
|
2
|
-
# Auto-generated by 'contributors' on Tue, 04 Nov 2014 03:23:27 GMT.
|
|
3
|
-
# https://github.com/xingrz/node-contributors
|
|
4
|
-
|
|
5
|
-
fengmk2 <fengmk2@gmail.com> (https://github.com/fengmk2)
|
|
6
|
-
xingrz <chenxingyu92@gmail.com> (https://github.com/xingrz)
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./lib/formstream');
|