Updated the Survey.
This commit is contained in:
		
							parent
							
								
									f59686eae0
								
							
						
					
					
						commit
						6d3ba1a714
					
				
					 1203 changed files with 140782 additions and 5 deletions
				
			
		
							
								
								
									
										29
									
								
								node_modules/decompress-response/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								node_modules/decompress-response/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,29 @@
 | 
			
		|||
'use strict';
 | 
			
		||||
const PassThrough = require('stream').PassThrough;
 | 
			
		||||
const zlib = require('zlib');
 | 
			
		||||
const mimicResponse = require('mimic-response');
 | 
			
		||||
 | 
			
		||||
module.exports = response => {
 | 
			
		||||
	// TODO: Use Array#includes when targeting Node.js 6
 | 
			
		||||
	if (['gzip', 'deflate'].indexOf(response.headers['content-encoding']) === -1) {
 | 
			
		||||
		return response;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	const unzip = zlib.createUnzip();
 | 
			
		||||
	const stream = new PassThrough();
 | 
			
		||||
 | 
			
		||||
	mimicResponse(response, stream);
 | 
			
		||||
 | 
			
		||||
	unzip.on('error', err => {
 | 
			
		||||
		if (err.code === 'Z_BUF_ERROR') {
 | 
			
		||||
			stream.end();
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		stream.emit('error', err);
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
	response.pipe(unzip).pipe(stream);
 | 
			
		||||
 | 
			
		||||
	return stream;
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										21
									
								
								node_modules/decompress-response/license
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								node_modules/decompress-response/license
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
`The MIT License (MIT)
 | 
			
		||||
 | 
			
		||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
							
								
								
									
										85
									
								
								node_modules/decompress-response/package.json
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										85
									
								
								node_modules/decompress-response/package.json
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,85 @@
 | 
			
		|||
{
 | 
			
		||||
  "_from": "decompress-response@^3.3.0",
 | 
			
		||||
  "_id": "decompress-response@3.3.0",
 | 
			
		||||
  "_inBundle": false,
 | 
			
		||||
  "_integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=",
 | 
			
		||||
  "_location": "/decompress-response",
 | 
			
		||||
  "_phantomChildren": {},
 | 
			
		||||
  "_requested": {
 | 
			
		||||
    "type": "range",
 | 
			
		||||
    "registry": true,
 | 
			
		||||
    "raw": "decompress-response@^3.3.0",
 | 
			
		||||
    "name": "decompress-response",
 | 
			
		||||
    "escapedName": "decompress-response",
 | 
			
		||||
    "rawSpec": "^3.3.0",
 | 
			
		||||
    "saveSpec": null,
 | 
			
		||||
    "fetchSpec": "^3.3.0"
 | 
			
		||||
  },
 | 
			
		||||
  "_requiredBy": [
 | 
			
		||||
    "/got"
 | 
			
		||||
  ],
 | 
			
		||||
  "_resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
 | 
			
		||||
  "_shasum": "80a4dd323748384bfa248083622aedec982adff3",
 | 
			
		||||
  "_spec": "decompress-response@^3.3.0",
 | 
			
		||||
  "_where": "D:\\Documents\\UniWork\\Year 4\\Semester 2\\SEG3125\\Labs\\Lab 6\\Survey_Analysis\\node_modules\\got",
 | 
			
		||||
  "bugs": {
 | 
			
		||||
    "url": "https://github.com/sindresorhus/decompress-response/issues"
 | 
			
		||||
  },
 | 
			
		||||
  "bundleDependencies": false,
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "mimic-response": "^1.0.0"
 | 
			
		||||
  },
 | 
			
		||||
  "deprecated": false,
 | 
			
		||||
  "description": "Decompress a HTTP response if needed",
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "ava": "*",
 | 
			
		||||
    "get-stream": "^3.0.0",
 | 
			
		||||
    "pify": "^3.0.0",
 | 
			
		||||
    "xo": "*"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
    "node": ">=4"
 | 
			
		||||
  },
 | 
			
		||||
  "files": [
 | 
			
		||||
    "index.js"
 | 
			
		||||
  ],
 | 
			
		||||
  "homepage": "https://github.com/sindresorhus/decompress-response#readme",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "decompress",
 | 
			
		||||
    "response",
 | 
			
		||||
    "http",
 | 
			
		||||
    "https",
 | 
			
		||||
    "zlib",
 | 
			
		||||
    "gzip",
 | 
			
		||||
    "zip",
 | 
			
		||||
    "deflate",
 | 
			
		||||
    "unzip",
 | 
			
		||||
    "ungzip",
 | 
			
		||||
    "incoming",
 | 
			
		||||
    "message",
 | 
			
		||||
    "stream",
 | 
			
		||||
    "compressed"
 | 
			
		||||
  ],
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "maintainers": [
 | 
			
		||||
    {
 | 
			
		||||
      "name": "Sindre Sorhus",
 | 
			
		||||
      "email": "sindresorhus@gmail.com",
 | 
			
		||||
      "url": "sindresorhus.com"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "name": "Vsevolod Strukchinsky",
 | 
			
		||||
      "email": "floatdrop@gmail.com",
 | 
			
		||||
      "url": "github.com/floatdrop"
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "name": "decompress-response",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
    "url": "git+https://github.com/sindresorhus/decompress-response.git"
 | 
			
		||||
  },
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "test": "xo && ava"
 | 
			
		||||
  },
 | 
			
		||||
  "version": "3.3.0"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										31
									
								
								node_modules/decompress-response/readme.md
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								node_modules/decompress-response/readme.md
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
# decompress-response [](https://travis-ci.org/sindresorhus/decompress-response)
 | 
			
		||||
 | 
			
		||||
> Decompress a HTTP response if needed
 | 
			
		||||
 | 
			
		||||
Decompresses the [response](https://nodejs.org/api/http.html#http_class_http_incomingmessage) from [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) if it's gzipped or deflated, otherwise just passes it through.
 | 
			
		||||
 | 
			
		||||
Used by [`got`](https://github.com/sindresorhus/got).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Install
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
$ npm install decompress-response
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Usage
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
const http = require('http');
 | 
			
		||||
const decompressResponse = require('decompress-response');
 | 
			
		||||
 | 
			
		||||
http.get('http://sindresorhus.com', response => {
 | 
			
		||||
	response = decompressResponse(response);
 | 
			
		||||
});
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## License
 | 
			
		||||
 | 
			
		||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue