mirror of
https://github.com/abrendan/MicDropMessages.git
synced 2025-08-25 05:52:02 +02:00
Initial commit
This commit is contained in:
37
node_modules/express-data-parser/.npmignore
generated
vendored
Normal file
37
node_modules/express-data-parser/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules
|
||||
jspm_packages
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
21
node_modules/express-data-parser/LICENSE
generated
vendored
Normal file
21
node_modules/express-data-parser/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Francisco Presencia
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
33
node_modules/express-data-parser/README.md
generated
vendored
Normal file
33
node_modules/express-data-parser/README.md
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# express-data-parser
|
||||
|
||||
## Installation
|
||||
|
||||
To install it with NPM:
|
||||
|
||||
```bash
|
||||
npm install express-data-parser --save
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
It uses formidable in the back-end, so the configuration options are the same:
|
||||
|
||||
[Configuration options for Formidable](https://github.com/felixge/node-formidable#api)
|
||||
|
||||
Just pass them as the parameter:
|
||||
|
||||
```js
|
||||
var dataParser = require('express-data-parser');
|
||||
|
||||
// ...
|
||||
|
||||
app.use(dataParser({
|
||||
encoding: 'utf-8',
|
||||
uploadDir = "/my/dir"
|
||||
// ...
|
||||
}));
|
||||
```
|
||||
|
||||
## Author & License
|
||||
|
||||
[Francisco Presencia Fandos](http://francisco.io/) under the MIT License.
|
26
node_modules/express-data-parser/index.js
generated
vendored
Normal file
26
node_modules/express-data-parser/index.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
var formidable = require('formidable');
|
||||
|
||||
module.exports = function(options = {}){
|
||||
|
||||
return function(req, res, next){
|
||||
if (req.method === 'GET' || req.method === 'DELETE')
|
||||
return next();
|
||||
if (!req.headers
|
||||
|| !req.headers['content-type']
|
||||
|| !req.headers['content-type'].includes('multipart/form-data'))
|
||||
return next();
|
||||
|
||||
var form = new formidable.IncomingForm();
|
||||
|
||||
for (var key in options) {
|
||||
form[key] = options[key];
|
||||
}
|
||||
|
||||
form.parse(req, function(err, fields, files){
|
||||
if (err) next(err);
|
||||
req.body = fields;
|
||||
req.files = files;
|
||||
next();
|
||||
});
|
||||
}
|
||||
}
|
59
node_modules/express-data-parser/package.json
generated
vendored
Normal file
59
node_modules/express-data-parser/package.json
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"_from": "express-data-parser@^1.2.0",
|
||||
"_id": "express-data-parser@1.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-/sGFhBHIfSruHdOepf7q6gmAajM=",
|
||||
"_location": "/express-data-parser",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "express-data-parser@^1.2.0",
|
||||
"name": "express-data-parser",
|
||||
"escapedName": "express-data-parser",
|
||||
"rawSpec": "^1.2.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.2.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/server"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/express-data-parser/-/express-data-parser-1.2.0.tgz",
|
||||
"_shasum": "fec1858411c87d2aee1dd39ea5feeaea09806a33",
|
||||
"_spec": "express-data-parser@^1.2.0",
|
||||
"_where": "/home/runner/Socketio-Chat-Template/node_modules/server",
|
||||
"author": {
|
||||
"name": "Francisco Presencia Fandos",
|
||||
"email": "publicfrancisco@hotmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/franciscop/express-data-parser/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"formidable": "^1.0.17"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Middleware data parser for images and files using formidable",
|
||||
"homepage": "https://github.com/franciscop/express-data-parser#readme",
|
||||
"keywords": [
|
||||
"data",
|
||||
"parser",
|
||||
"middleware",
|
||||
"formidable",
|
||||
"multipart",
|
||||
"form-data",
|
||||
"form"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "express-data-parser",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/franciscop/express-data-parser.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"version": "1.2.0"
|
||||
}
|
Reference in New Issue
Block a user