Updated the Survey.

This commit is contained in:
Batuhan Berk Başoğlu 2021-03-10 20:43:28 -05:00
parent f59686eae0
commit 6d3ba1a714
1203 changed files with 140782 additions and 5 deletions

19
node_modules/responselike/LICENSE generated vendored Normal file
View file

@ -0,0 +1,19 @@
Copyright (c) 2017 Luke Childs
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.

77
node_modules/responselike/README.md generated vendored Normal file
View file

@ -0,0 +1,77 @@
# responselike
> A response-like object for mocking a Node.js HTTP response stream
[![Build Status](https://travis-ci.org/lukechilds/responselike.svg?branch=master)](https://travis-ci.org/lukechilds/responselike)
[![Coverage Status](https://coveralls.io/repos/github/lukechilds/responselike/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/responselike?branch=master)
[![npm](https://img.shields.io/npm/dm/responselike.svg)](https://www.npmjs.com/package/responselike)
[![npm](https://img.shields.io/npm/v/responselike.svg)](https://www.npmjs.com/package/responselike)
Returns a streamable response object similar to a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage). Useful for formatting cached responses so they can be consumed by code expecting a real response.
## Install
```shell
npm install --save responselike
```
Or if you're just using for testing you'll want:
```shell
npm install --save-dev responselike
```
## Usage
```js
const Response = require('responselike');
const response = new Response(200, { foo: 'bar' }, Buffer.from('Hi!'), 'https://example.com');
response.statusCode;
// 200
response.headers;
// { foo: 'bar' }
response.body;
// <Buffer 48 69 21>
response.url;
// 'https://example.com'
response.pipe(process.stdout);
// Hi!
```
## API
### new Response(statusCode, headers, body, url)
Returns a streamable response object similar to a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage).
#### statusCode
Type: `number`
HTTP response status code.
#### headers
Type: `object`
HTTP headers object. Keys will be automatically lowercased.
#### body
Type: `buffer`
A Buffer containing the response body. The Buffer contents will be streamable but is also exposed directly as `response.body`.
#### url
Type: `string`
Request URL string.
## License
MIT © Luke Childs

69
node_modules/responselike/package.json generated vendored Normal file
View file

@ -0,0 +1,69 @@
{
"_from": "responselike@^1.0.2",
"_id": "responselike@1.0.2",
"_inBundle": false,
"_integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=",
"_location": "/responselike",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "responselike@^1.0.2",
"name": "responselike",
"escapedName": "responselike",
"rawSpec": "^1.0.2",
"saveSpec": null,
"fetchSpec": "^1.0.2"
},
"_requiredBy": [
"/cacheable-request"
],
"_resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz",
"_shasum": "918720ef3b631c5642be068f15ade5a46f4ba1e7",
"_spec": "responselike@^1.0.2",
"_where": "D:\\Documents\\UniWork\\Year 4\\Semester 2\\SEG3125\\Labs\\Lab 6\\Survey_Analysis\\node_modules\\cacheable-request",
"author": {
"name": "lukechilds"
},
"bugs": {
"url": "https://github.com/lukechilds/responselike/issues"
},
"bundleDependencies": false,
"dependencies": {
"lowercase-keys": "^1.0.0"
},
"deprecated": false,
"description": "A response-like object for mocking a Node.js HTTP response stream",
"devDependencies": {
"ava": "^0.22.0",
"coveralls": "^2.13.1",
"eslint-config-xo-lukechilds": "^1.0.0",
"get-stream": "^3.0.0",
"nyc": "^11.1.0",
"xo": "^0.19.0"
},
"homepage": "https://github.com/lukechilds/responselike#readme",
"keywords": [
"http",
"https",
"response",
"mock",
"request",
"responselike"
],
"license": "MIT",
"main": "src/index.js",
"name": "responselike",
"repository": {
"type": "git",
"url": "git+https://github.com/lukechilds/responselike.git"
},
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"test": "xo && nyc ava"
},
"version": "1.0.2",
"xo": {
"extends": "xo-lukechilds"
}
}

34
node_modules/responselike/src/index.js generated vendored Normal file
View file

@ -0,0 +1,34 @@
'use strict';
const Readable = require('stream').Readable;
const lowercaseKeys = require('lowercase-keys');
class Response extends Readable {
constructor(statusCode, headers, body, url) {
if (typeof statusCode !== 'number') {
throw new TypeError('Argument `statusCode` should be a number');
}
if (typeof headers !== 'object') {
throw new TypeError('Argument `headers` should be an object');
}
if (!(body instanceof Buffer)) {
throw new TypeError('Argument `body` should be a buffer');
}
if (typeof url !== 'string') {
throw new TypeError('Argument `url` should be a string');
}
super();
this.statusCode = statusCode;
this.headers = lowercaseKeys(headers);
this.body = body;
this.url = url;
}
_read() {
this.push(this.body);
this.push(null);
}
}
module.exports = Response;