├── .github └── FUNDING.yml ├── .gitignore ├── LICENSE ├── README.md ├── index.js ├── node_modules ├── .bin │ ├── mime │ └── mime.cmd ├── accepts │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── array-flatten │ ├── LICENSE │ ├── README.md │ ├── array-flatten.js │ └── package.json ├── basic-auth │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── body-parser │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── read.js │ │ └── types │ │ │ ├── json.js │ │ │ ├── raw.js │ │ │ ├── text.js │ │ │ └── urlencoded.js │ └── package.json ├── bytes │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── content-disposition │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── content-type │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── cookie-signature │ ├── .npmignore │ ├── History.md │ ├── Readme.md │ ├── index.js │ └── package.json ├── cookie │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── debug │ ├── .coveralls.yml │ ├── .eslintrc │ ├── .npmignore │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── component.json │ ├── karma.conf.js │ ├── node.js │ ├── package.json │ └── src │ │ ├── browser.js │ │ ├── debug.js │ │ ├── index.js │ │ ├── inspector-log.js │ │ └── node.js ├── depd │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ ├── lib │ │ ├── browser │ │ │ └── index.js │ │ └── compat │ │ │ ├── callsite-tostring.js │ │ │ ├── event-listener-count.js │ │ │ └── index.js │ └── package.json ├── destroy │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── ee-first │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── encodeurl │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── escape-html │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── etag │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── express │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ ├── lib │ │ ├── application.js │ │ ├── express.js │ │ ├── middleware │ │ │ ├── init.js │ │ │ └── query.js │ │ ├── request.js │ │ ├── response.js │ │ ├── router │ │ │ ├── index.js │ │ │ ├── layer.js │ │ │ └── route.js │ │ ├── utils.js │ │ └── view.js │ └── package.json ├── finalhandler │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── forwarded │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── fresh │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── http-errors │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── node_modules │ │ ├── depd │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── browser │ │ │ │ │ └── index.js │ │ │ │ └── compat │ │ │ │ │ ├── callsite-tostring.js │ │ │ │ │ ├── event-listener-count.js │ │ │ │ │ └── index.js │ │ │ └── package.json │ │ └── setprototypeof │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ └── package.json ├── iconv-lite │ ├── .npmignore │ ├── .travis.yml │ ├── Changelog.md │ ├── LICENSE │ ├── README.md │ ├── encodings │ │ ├── dbcs-codec.js │ │ ├── dbcs-data.js │ │ ├── index.js │ │ ├── internal.js │ │ ├── sbcs-codec.js │ │ ├── sbcs-data-generated.js │ │ ├── sbcs-data.js │ │ ├── tables │ │ │ ├── big5-added.json │ │ │ ├── cp936.json │ │ │ ├── cp949.json │ │ │ ├── cp950.json │ │ │ ├── eucjp.json │ │ │ ├── gb18030-ranges.json │ │ │ ├── gbk-added.json │ │ │ └── shiftjis.json │ │ ├── utf16.js │ │ └── utf7.js │ ├── lib │ │ ├── bom-handling.js │ │ ├── extend-node.js │ │ ├── index.d.ts │ │ ├── index.js │ │ └── streams.js │ └── package.json ├── inherits │ ├── LICENSE │ ├── README.md │ ├── inherits.js │ ├── inherits_browser.js │ └── package.json ├── ipaddr.js │ ├── .npmignore │ ├── .travis.yml │ ├── Cakefile │ ├── LICENSE │ ├── README.md │ ├── bower.json │ ├── ipaddr.min.js │ ├── lib │ │ ├── ipaddr.js │ │ └── ipaddr.js.d.ts │ ├── package.json │ ├── src │ │ └── ipaddr.coffee │ └── test │ │ └── ipaddr.test.coffee ├── media-typer │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── merge-descriptors │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── methods │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── mime-db │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── db.json │ ├── index.js │ └── package.json ├── mime-types │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── mime │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.js │ │ └── test.js │ ├── cli.js │ ├── mime.js │ ├── package.json │ └── types.json ├── morgan │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── ms │ ├── index.js │ ├── license.md │ ├── package.json │ └── readme.md ├── negotiator │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── charset.js │ │ ├── encoding.js │ │ ├── language.js │ │ └── mediaType.js │ └── package.json ├── on-finished │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── on-headers │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── parseurl │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── path-to-regexp │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── proxy-addr │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── qs │ ├── .editorconfig │ ├── .eslintignore │ ├── .eslintrc │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── dist │ │ └── qs.js │ ├── lib │ │ ├── formats.js │ │ ├── index.js │ │ ├── parse.js │ │ ├── stringify.js │ │ └── utils.js │ ├── package.json │ └── test │ │ ├── .eslintrc │ │ ├── index.js │ │ ├── parse.js │ │ ├── stringify.js │ │ └── utils.js ├── range-parser │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── raw-body │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.d.ts │ ├── index.js │ └── package.json ├── safe-buffer │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test.js ├── send │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── serve-static │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── setprototypeof │ ├── LICENSE │ ├── README.md │ ├── index.d.ts │ ├── index.js │ └── package.json ├── statuses │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── codes.json │ ├── index.js │ └── package.json ├── type-is │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── unpipe │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── utils-merge │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json └── vary │ ├── HISTORY.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── package.json ├── screenshot ├── 1.PNG ├── 2.PNG ├── 3.PNG ├── 4.PNG ├── 5.PNG └── gan.PNG ├── ui ├── app.html ├── bootstrap.min.css ├── clist.html ├── css │ ├── animate.css │ ├── bootstrap.min.css │ ├── materialize.min.css │ └── style.css ├── fonts │ └── roboto │ │ ├── Roboto-Bold.woff │ │ ├── Roboto-Bold.woff2 │ │ ├── Roboto-Light.woff │ │ ├── Roboto-Light.woff2 │ │ ├── Roboto-Medium.woff │ │ ├── Roboto-Medium.woff2 │ │ ├── Roboto-Regular.woff │ │ ├── Roboto-Regular.woff2 │ │ ├── Roboto-Thin.woff │ │ └── Roboto-Thin.woff2 ├── images │ ├── bjp.png │ ├── cong.png │ ├── e-voting-logo.png │ ├── head.jpg │ ├── rsc.png │ └── shiv.png ├── index.html ├── js │ ├── app.js │ ├── clist.js │ ├── login.js │ ├── main.js │ └── materialize.min.js └── test.html └── voting.sol /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [sanattaori] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | custom: ["UPI ID - sanattaori@axl"] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 TECHDOT 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/.bin/mime: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../mime/cli.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../mime/cli.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /node_modules/.bin/mime.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\mime\cli.js" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\mime\cli.js" %* 7 | ) -------------------------------------------------------------------------------- /node_modules/accepts/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jonathan Ong 4 | Copyright (c) 2015 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/array-flatten/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/array-flatten/README.md: -------------------------------------------------------------------------------- 1 | # Array Flatten 2 | 3 | [![NPM version][npm-image]][npm-url] 4 | [![NPM downloads][downloads-image]][downloads-url] 5 | [![Build status][travis-image]][travis-url] 6 | [![Test coverage][coveralls-image]][coveralls-url] 7 | 8 | > Flatten an array of nested arrays into a single flat array. Accepts an optional depth. 9 | 10 | ## Installation 11 | 12 | ``` 13 | npm install array-flatten --save 14 | ``` 15 | 16 | ## Usage 17 | 18 | ```javascript 19 | var flatten = require('array-flatten') 20 | 21 | flatten([1, [2, [3, [4, [5], 6], 7], 8], 9]) 22 | //=> [1, 2, 3, 4, 5, 6, 7, 8, 9] 23 | 24 | flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2) 25 | //=> [1, 2, 3, [4, [5], 6], 7, 8, 9] 26 | 27 | (function () { 28 | flatten(arguments) //=> [1, 2, 3] 29 | })(1, [2, 3]) 30 | ``` 31 | 32 | ## License 33 | 34 | MIT 35 | 36 | [npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat 37 | [npm-url]: https://npmjs.org/package/array-flatten 38 | [downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat 39 | [downloads-url]: https://npmjs.org/package/array-flatten 40 | [travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat 41 | [travis-url]: https://travis-ci.org/blakeembrey/array-flatten 42 | [coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat 43 | [coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master 44 | -------------------------------------------------------------------------------- /node_modules/array-flatten/array-flatten.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /** 4 | * Expose `arrayFlatten`. 5 | */ 6 | module.exports = arrayFlatten 7 | 8 | /** 9 | * Recursive flatten function with depth. 10 | * 11 | * @param {Array} array 12 | * @param {Array} result 13 | * @param {Number} depth 14 | * @return {Array} 15 | */ 16 | function flattenWithDepth (array, result, depth) { 17 | for (var i = 0; i < array.length; i++) { 18 | var value = array[i] 19 | 20 | if (depth > 0 && Array.isArray(value)) { 21 | flattenWithDepth(value, result, depth - 1) 22 | } else { 23 | result.push(value) 24 | } 25 | } 26 | 27 | return result 28 | } 29 | 30 | /** 31 | * Recursive flatten function. Omitting depth is slightly faster. 32 | * 33 | * @param {Array} array 34 | * @param {Array} result 35 | * @return {Array} 36 | */ 37 | function flattenForever (array, result) { 38 | for (var i = 0; i < array.length; i++) { 39 | var value = array[i] 40 | 41 | if (Array.isArray(value)) { 42 | flattenForever(value, result) 43 | } else { 44 | result.push(value) 45 | } 46 | } 47 | 48 | return result 49 | } 50 | 51 | /** 52 | * Flatten an array, with the ability to define a depth. 53 | * 54 | * @param {Array} array 55 | * @param {Number} depth 56 | * @return {Array} 57 | */ 58 | function arrayFlatten (array, depth) { 59 | if (depth == null) { 60 | return flattenForever(array, []) 61 | } 62 | 63 | return flattenWithDepth(array, [], depth) 64 | } 65 | -------------------------------------------------------------------------------- /node_modules/basic-auth/HISTORY.md: -------------------------------------------------------------------------------- 1 | 2.0.0 / 2017-09-12 2 | ================== 3 | 4 | * Drop support for Node.js below 0.8 5 | * Remove `auth(ctx)` signature -- pass in header or `auth(ctx.req)` 6 | * Use `safe-buffer` for improved Buffer API 7 | 8 | 1.1.0 / 2016-11-18 9 | ================== 10 | 11 | * Add `auth.parse` for low-level string parsing 12 | 13 | 1.0.4 / 2016-05-10 14 | ================== 15 | 16 | * Improve error message when `req` argument is not an object 17 | * Improve error message when `req` missing `headers` property 18 | 19 | 1.0.3 / 2015-07-01 20 | ================== 21 | 22 | * Fix regression accepting a Koa context 23 | 24 | 1.0.2 / 2015-06-12 25 | ================== 26 | 27 | * Improve error message when `req` argument missing 28 | * perf: enable strict mode 29 | * perf: hoist regular expression 30 | * perf: parse with regular expressions 31 | * perf: remove argument reassignment 32 | 33 | 1.0.1 / 2015-05-04 34 | ================== 35 | 36 | * Update readme 37 | 38 | 1.0.0 / 2014-07-01 39 | ================== 40 | 41 | * Support empty password 42 | * Support empty username 43 | 44 | 0.0.1 / 2013-11-30 45 | ================== 46 | 47 | * Initial release 48 | -------------------------------------------------------------------------------- /node_modules/basic-auth/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013 TJ Holowaychuk 4 | Copyright (c) 2014 Jonathan Ong 5 | Copyright (c) 2015-2016 Douglas Christopher Wilson 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /node_modules/body-parser/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jonathan Ong 4 | Copyright (c) 2014-2015 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/body-parser/lib/types/raw.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * body-parser 3 | * Copyright(c) 2014-2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module dependencies. 11 | */ 12 | 13 | var bytes = require('bytes') 14 | var debug = require('debug')('body-parser:raw') 15 | var read = require('../read') 16 | var typeis = require('type-is') 17 | 18 | /** 19 | * Module exports. 20 | */ 21 | 22 | module.exports = raw 23 | 24 | /** 25 | * Create a middleware to parse raw bodies. 26 | * 27 | * @param {object} [options] 28 | * @return {function} 29 | * @api public 30 | */ 31 | 32 | function raw (options) { 33 | var opts = options || {} 34 | 35 | var inflate = opts.inflate !== false 36 | var limit = typeof opts.limit !== 'number' 37 | ? bytes.parse(opts.limit || '100kb') 38 | : opts.limit 39 | var type = opts.type || 'application/octet-stream' 40 | var verify = opts.verify || false 41 | 42 | if (verify !== false && typeof verify !== 'function') { 43 | throw new TypeError('option verify must be function') 44 | } 45 | 46 | // create the appropriate type checking function 47 | var shouldParse = typeof type !== 'function' 48 | ? typeChecker(type) 49 | : type 50 | 51 | function parse (buf) { 52 | return buf 53 | } 54 | 55 | return function rawParser (req, res, next) { 56 | if (req._body) { 57 | debug('body already parsed') 58 | next() 59 | return 60 | } 61 | 62 | req.body = req.body || {} 63 | 64 | // skip requests without bodies 65 | if (!typeis.hasBody(req)) { 66 | debug('skip empty body') 67 | next() 68 | return 69 | } 70 | 71 | debug('content-type %j', req.headers['content-type']) 72 | 73 | // determine if request should be parsed 74 | if (!shouldParse(req)) { 75 | debug('skip parsing') 76 | next() 77 | return 78 | } 79 | 80 | // read 81 | read(req, res, next, parse, debug, { 82 | encoding: null, 83 | inflate: inflate, 84 | limit: limit, 85 | verify: verify 86 | }) 87 | } 88 | } 89 | 90 | /** 91 | * Get the simple type checker. 92 | * 93 | * @param {string} type 94 | * @return {function} 95 | */ 96 | 97 | function typeChecker (type) { 98 | return function checkType (req) { 99 | return Boolean(typeis(req, type)) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /node_modules/bytes/History.md: -------------------------------------------------------------------------------- 1 | 3.0.0 / 2017-08-31 2 | ================== 3 | 4 | * Change "kB" to "KB" in format output 5 | * Remove support for Node.js 0.6 6 | * Remove support for ComponentJS 7 | 8 | 2.5.0 / 2017-03-24 9 | ================== 10 | 11 | * Add option "unit" 12 | 13 | 2.4.0 / 2016-06-01 14 | ================== 15 | 16 | * Add option "unitSeparator" 17 | 18 | 2.3.0 / 2016-02-15 19 | ================== 20 | 21 | * Drop partial bytes on all parsed units 22 | * Fix non-finite numbers to `.format` to return `null` 23 | * Fix parsing byte string that looks like hex 24 | * perf: hoist regular expressions 25 | 26 | 2.2.0 / 2015-11-13 27 | ================== 28 | 29 | * add option "decimalPlaces" 30 | * add option "fixedDecimals" 31 | 32 | 2.1.0 / 2015-05-21 33 | ================== 34 | 35 | * add `.format` export 36 | * add `.parse` export 37 | 38 | 2.0.2 / 2015-05-20 39 | ================== 40 | 41 | * remove map recreation 42 | * remove unnecessary object construction 43 | 44 | 2.0.1 / 2015-05-07 45 | ================== 46 | 47 | * fix browserify require 48 | * remove node.extend dependency 49 | 50 | 2.0.0 / 2015-04-12 51 | ================== 52 | 53 | * add option "case" 54 | * add option "thousandsSeparator" 55 | * return "null" on invalid parse input 56 | * support proper round-trip: bytes(bytes(num)) === num 57 | * units no longer case sensitive when parsing 58 | 59 | 1.0.0 / 2014-05-05 60 | ================== 61 | 62 | * add negative support. fixes #6 63 | 64 | 0.3.0 / 2014-03-19 65 | ================== 66 | 67 | * added terabyte support 68 | 69 | 0.2.1 / 2013-04-01 70 | ================== 71 | 72 | * add .component 73 | 74 | 0.2.0 / 2012-10-28 75 | ================== 76 | 77 | * bytes(200).should.eql('200b') 78 | 79 | 0.1.0 / 2012-07-04 80 | ================== 81 | 82 | * add bytes to string conversion [yields] 83 | -------------------------------------------------------------------------------- /node_modules/bytes/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012-2014 TJ Holowaychuk 4 | Copyright (c) 2015 Jed Watson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/content-disposition/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.5.2 / 2016-12-08 2 | ================== 3 | 4 | * Fix `parse` to accept any linear whitespace character 5 | 6 | 0.5.1 / 2016-01-17 7 | ================== 8 | 9 | * perf: enable strict mode 10 | 11 | 0.5.0 / 2014-10-11 12 | ================== 13 | 14 | * Add `parse` function 15 | 16 | 0.4.0 / 2014-09-21 17 | ================== 18 | 19 | * Expand non-Unicode `filename` to the full ISO-8859-1 charset 20 | 21 | 0.3.0 / 2014-09-20 22 | ================== 23 | 24 | * Add `fallback` option 25 | * Add `type` option 26 | 27 | 0.2.0 / 2014-09-19 28 | ================== 29 | 30 | * Reduce ambiguity of file names with hex escape in buggy browsers 31 | 32 | 0.1.2 / 2014-09-19 33 | ================== 34 | 35 | * Fix periodic invalid Unicode filename header 36 | 37 | 0.1.1 / 2014-09-19 38 | ================== 39 | 40 | * Fix invalid characters appearing in `filename*` parameter 41 | 42 | 0.1.0 / 2014-09-18 43 | ================== 44 | 45 | * Make the `filename` argument optional 46 | 47 | 0.0.0 / 2014-09-18 48 | ================== 49 | 50 | * Initial release 51 | -------------------------------------------------------------------------------- /node_modules/content-disposition/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/content-type/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.4 / 2017-09-11 2 | ================== 3 | 4 | * perf: skip parameter parsing when no parameters 5 | 6 | 1.0.3 / 2017-09-10 7 | ================== 8 | 9 | * perf: remove argument reassignment 10 | 11 | 1.0.2 / 2016-05-09 12 | ================== 13 | 14 | * perf: enable strict mode 15 | 16 | 1.0.1 / 2015-02-13 17 | ================== 18 | 19 | * Improve missing `Content-Type` header error message 20 | 21 | 1.0.0 / 2015-02-01 22 | ================== 23 | 24 | * Initial implementation, derived from `media-typer@0.3.0` 25 | -------------------------------------------------------------------------------- /node_modules/content-type/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2015 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/cookie-signature/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | -------------------------------------------------------------------------------- /node_modules/cookie-signature/History.md: -------------------------------------------------------------------------------- 1 | 1.0.6 / 2015-02-03 2 | ================== 3 | 4 | * use `npm test` instead of `make test` to run tests 5 | * clearer assertion messages when checking input 6 | 7 | 8 | 1.0.5 / 2014-09-05 9 | ================== 10 | 11 | * add license to package.json 12 | 13 | 1.0.4 / 2014-06-25 14 | ================== 15 | 16 | * corrected avoidance of timing attacks (thanks @tenbits!) 17 | 18 | 1.0.3 / 2014-01-28 19 | ================== 20 | 21 | * [incorrect] fix for timing attacks 22 | 23 | 1.0.2 / 2014-01-28 24 | ================== 25 | 26 | * fix missing repository warning 27 | * fix typo in test 28 | 29 | 1.0.1 / 2013-04-15 30 | ================== 31 | 32 | * Revert "Changed underlying HMAC algo. to sha512." 33 | * Revert "Fix for timing attacks on MAC verification." 34 | 35 | 0.0.1 / 2010-01-03 36 | ================== 37 | 38 | * Initial release 39 | -------------------------------------------------------------------------------- /node_modules/cookie-signature/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # cookie-signature 3 | 4 | Sign and unsign cookies. 5 | 6 | ## Example 7 | 8 | ```js 9 | var cookie = require('cookie-signature'); 10 | 11 | var val = cookie.sign('hello', 'tobiiscool'); 12 | val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI'); 13 | 14 | var val = cookie.sign('hello', 'tobiiscool'); 15 | cookie.unsign(val, 'tobiiscool').should.equal('hello'); 16 | cookie.unsign(val, 'luna').should.be.false; 17 | ``` 18 | 19 | ## License 20 | 21 | (The MIT License) 22 | 23 | Copyright (c) 2012 LearnBoost <tj@learnboost.com> 24 | 25 | Permission is hereby granted, free of charge, to any person obtaining 26 | a copy of this software and associated documentation files (the 27 | 'Software'), to deal in the Software without restriction, including 28 | without limitation the rights to use, copy, modify, merge, publish, 29 | distribute, sublicense, and/or sell copies of the Software, and to 30 | permit persons to whom the Software is furnished to do so, subject to 31 | the following conditions: 32 | 33 | The above copyright notice and this permission notice shall be 34 | included in all copies or substantial portions of the Software. 35 | 36 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 37 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 38 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 39 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 40 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 41 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 42 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/cookie-signature/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | 5 | var crypto = require('crypto'); 6 | 7 | /** 8 | * Sign the given `val` with `secret`. 9 | * 10 | * @param {String} val 11 | * @param {String} secret 12 | * @return {String} 13 | * @api private 14 | */ 15 | 16 | exports.sign = function(val, secret){ 17 | if ('string' != typeof val) throw new TypeError("Cookie value must be provided as a string."); 18 | if ('string' != typeof secret) throw new TypeError("Secret string must be provided."); 19 | return val + '.' + crypto 20 | .createHmac('sha256', secret) 21 | .update(val) 22 | .digest('base64') 23 | .replace(/\=+$/, ''); 24 | }; 25 | 26 | /** 27 | * Unsign and decode the given `val` with `secret`, 28 | * returning `false` if the signature is invalid. 29 | * 30 | * @param {String} val 31 | * @param {String} secret 32 | * @return {String|Boolean} 33 | * @api private 34 | */ 35 | 36 | exports.unsign = function(val, secret){ 37 | if ('string' != typeof val) throw new TypeError("Signed cookie string must be provided."); 38 | if ('string' != typeof secret) throw new TypeError("Secret string must be provided."); 39 | var str = val.slice(0, val.lastIndexOf('.')) 40 | , mac = exports.sign(str, secret); 41 | 42 | return sha1(mac) == sha1(val) ? str : false; 43 | }; 44 | 45 | /** 46 | * Private 47 | */ 48 | 49 | function sha1(str){ 50 | return crypto.createHash('sha1').update(str).digest('hex'); 51 | } 52 | -------------------------------------------------------------------------------- /node_modules/cookie-signature/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "cookie-signature@1.0.6", 6 | "scope": null, 7 | "escapedName": "cookie-signature", 8 | "name": "cookie-signature", 9 | "rawSpec": "1.0.6", 10 | "spec": "1.0.6", 11 | "type": "version" 12 | }, 13 | "C:\\Users\\Sanat\\Desktop\\techdot\\node_modules\\express" 14 | ] 15 | ], 16 | "_from": "cookie-signature@1.0.6", 17 | "_id": "cookie-signature@1.0.6", 18 | "_inCache": true, 19 | "_location": "/cookie-signature", 20 | "_nodeVersion": "0.10.36", 21 | "_npmUser": { 22 | "name": "natevw", 23 | "email": "natevw@yahoo.com" 24 | }, 25 | "_npmVersion": "2.3.0", 26 | "_phantomChildren": {}, 27 | "_requested": { 28 | "raw": "cookie-signature@1.0.6", 29 | "scope": null, 30 | "escapedName": "cookie-signature", 31 | "name": "cookie-signature", 32 | "rawSpec": "1.0.6", 33 | "spec": "1.0.6", 34 | "type": "version" 35 | }, 36 | "_requiredBy": [ 37 | "/express" 38 | ], 39 | "_resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 40 | "_shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c", 41 | "_shrinkwrap": null, 42 | "_spec": "cookie-signature@1.0.6", 43 | "_where": "C:\\Users\\Sanat\\Desktop\\techdot\\node_modules\\express", 44 | "author": { 45 | "name": "TJ Holowaychuk", 46 | "email": "tj@learnboost.com" 47 | }, 48 | "bugs": { 49 | "url": "https://github.com/visionmedia/node-cookie-signature/issues" 50 | }, 51 | "dependencies": {}, 52 | "description": "Sign and unsign cookies", 53 | "devDependencies": { 54 | "mocha": "*", 55 | "should": "*" 56 | }, 57 | "directories": {}, 58 | "dist": { 59 | "shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c", 60 | "tarball": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" 61 | }, 62 | "gitHead": "391b56cf44d88c493491b7e3fc53208cfb976d2a", 63 | "homepage": "https://github.com/visionmedia/node-cookie-signature", 64 | "keywords": [ 65 | "cookie", 66 | "sign", 67 | "unsign" 68 | ], 69 | "license": "MIT", 70 | "main": "index", 71 | "maintainers": [ 72 | { 73 | "name": "tjholowaychuk", 74 | "email": "tj@vision-media.ca" 75 | }, 76 | { 77 | "name": "natevw", 78 | "email": "natevw@yahoo.com" 79 | } 80 | ], 81 | "name": "cookie-signature", 82 | "optionalDependencies": {}, 83 | "readme": "ERROR: No README data found!", 84 | "repository": { 85 | "type": "git", 86 | "url": "git+https://github.com/visionmedia/node-cookie-signature.git" 87 | }, 88 | "scripts": { 89 | "test": "mocha --require should --reporter spec" 90 | }, 91 | "version": "1.0.6" 92 | } 93 | -------------------------------------------------------------------------------- /node_modules/cookie/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012-2014 Roman Shtylman 4 | Copyright (c) 2015 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | -------------------------------------------------------------------------------- /node_modules/debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /node_modules/debug/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": 0, 8 | "no-empty": [1, { "allowEmptyCatch": true }] 9 | }, 10 | "extends": "eslint:recommended" 11 | } 12 | -------------------------------------------------------------------------------- /node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | yarn.lock 8 | coverage 9 | bower.json 10 | -------------------------------------------------------------------------------- /node_modules/debug/.travis.yml: -------------------------------------------------------------------------------- 1 | 2 | language: node_js 3 | node_js: 4 | - "6" 5 | - "5" 6 | - "4" 7 | 8 | install: 9 | - make node_modules 10 | 11 | script: 12 | - make lint 13 | - make test 14 | - make coveralls 15 | -------------------------------------------------------------------------------- /node_modules/debug/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /node_modules/debug/Makefile: -------------------------------------------------------------------------------- 1 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773 2 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) 3 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) 4 | 5 | # BIN directory 6 | BIN := $(THIS_DIR)/node_modules/.bin 7 | 8 | # Path 9 | PATH := node_modules/.bin:$(PATH) 10 | SHELL := /bin/bash 11 | 12 | # applications 13 | NODE ?= $(shell which node) 14 | YARN ?= $(shell which yarn) 15 | PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) 16 | BROWSERIFY ?= $(NODE) $(BIN)/browserify 17 | 18 | .FORCE: 19 | 20 | install: node_modules 21 | 22 | node_modules: package.json 23 | @NODE_ENV= $(PKG) install 24 | @touch node_modules 25 | 26 | lint: .FORCE 27 | eslint browser.js debug.js index.js node.js 28 | 29 | test-node: .FORCE 30 | istanbul cover node_modules/mocha/bin/_mocha -- test/**.js 31 | 32 | test-browser: .FORCE 33 | mkdir -p dist 34 | 35 | @$(BROWSERIFY) \ 36 | --standalone debug \ 37 | . > dist/debug.js 38 | 39 | karma start --single-run 40 | rimraf dist 41 | 42 | test: .FORCE 43 | concurrently \ 44 | "make test-node" \ 45 | "make test-browser" 46 | 47 | coveralls: 48 | cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js 49 | 50 | .PHONY: all install clean distclean 51 | -------------------------------------------------------------------------------- /node_modules/debug/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "repo": "visionmedia/debug", 4 | "description": "small debugging utility", 5 | "version": "2.6.9", 6 | "keywords": [ 7 | "debug", 8 | "log", 9 | "debugger" 10 | ], 11 | "main": "src/browser.js", 12 | "scripts": [ 13 | "src/browser.js", 14 | "src/debug.js" 15 | ], 16 | "dependencies": { 17 | "rauchg/ms.js": "0.7.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/debug/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['mocha', 'chai', 'sinon'], 14 | 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'dist/debug.js', 19 | 'test/*spec.js' 20 | ], 21 | 22 | 23 | // list of files to exclude 24 | exclude: [ 25 | 'src/node.js' 26 | ], 27 | 28 | 29 | // preprocess matching files before serving them to the browser 30 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 31 | preprocessors: { 32 | }, 33 | 34 | // test results reporter to use 35 | // possible values: 'dots', 'progress' 36 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 37 | reporters: ['progress'], 38 | 39 | 40 | // web server port 41 | port: 9876, 42 | 43 | 44 | // enable / disable colors in the output (reporters and logs) 45 | colors: true, 46 | 47 | 48 | // level of logging 49 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 50 | logLevel: config.LOG_INFO, 51 | 52 | 53 | // enable / disable watching file and executing tests whenever any file changes 54 | autoWatch: true, 55 | 56 | 57 | // start these browsers 58 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 59 | browsers: ['PhantomJS'], 60 | 61 | 62 | // Continuous Integration mode 63 | // if true, Karma captures browsers, runs the tests and exits 64 | singleRun: false, 65 | 66 | // Concurrency level 67 | // how many browser should be started simultaneous 68 | concurrency: Infinity 69 | }) 70 | } 71 | -------------------------------------------------------------------------------- /node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Detect Electron renderer process, which is node, but we should 3 | * treat as a browser. 4 | */ 5 | 6 | if (typeof process !== 'undefined' && process.type === 'renderer') { 7 | module.exports = require('./browser.js'); 8 | } else { 9 | module.exports = require('./node.js'); 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/debug/src/inspector-log.js: -------------------------------------------------------------------------------- 1 | module.exports = inspectorLog; 2 | 3 | // black hole 4 | const nullStream = new (require('stream').Writable)(); 5 | nullStream._write = () => {}; 6 | 7 | /** 8 | * Outputs a `console.log()` to the Node.js Inspector console *only*. 9 | */ 10 | function inspectorLog() { 11 | const stdout = console._stdout; 12 | console._stdout = nullStream; 13 | console.log.apply(console, arguments); 14 | console._stdout = stdout; 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/depd/History.md: -------------------------------------------------------------------------------- 1 | 1.1.2 / 2018-01-11 2 | ================== 3 | 4 | * perf: remove argument reassignment 5 | * Support Node.js 0.6 to 9.x 6 | 7 | 1.1.1 / 2017-07-27 8 | ================== 9 | 10 | * Remove unnecessary `Buffer` loading 11 | * Support Node.js 0.6 to 8.x 12 | 13 | 1.1.0 / 2015-09-14 14 | ================== 15 | 16 | * Enable strict mode in more places 17 | * Support io.js 3.x 18 | * Support io.js 2.x 19 | * Support web browser loading 20 | - Requires bundler like Browserify or webpack 21 | 22 | 1.0.1 / 2015-04-07 23 | ================== 24 | 25 | * Fix `TypeError`s when under `'use strict'` code 26 | * Fix useless type name on auto-generated messages 27 | * Support io.js 1.x 28 | * Support Node.js 0.12 29 | 30 | 1.0.0 / 2014-09-17 31 | ================== 32 | 33 | * No changes 34 | 35 | 0.4.5 / 2014-09-09 36 | ================== 37 | 38 | * Improve call speed to functions using the function wrapper 39 | * Support Node.js 0.6 40 | 41 | 0.4.4 / 2014-07-27 42 | ================== 43 | 44 | * Work-around v8 generating empty stack traces 45 | 46 | 0.4.3 / 2014-07-26 47 | ================== 48 | 49 | * Fix exception when global `Error.stackTraceLimit` is too low 50 | 51 | 0.4.2 / 2014-07-19 52 | ================== 53 | 54 | * Correct call site for wrapped functions and properties 55 | 56 | 0.4.1 / 2014-07-19 57 | ================== 58 | 59 | * Improve automatic message generation for function properties 60 | 61 | 0.4.0 / 2014-07-19 62 | ================== 63 | 64 | * Add `TRACE_DEPRECATION` environment variable 65 | * Remove non-standard grey color from color output 66 | * Support `--no-deprecation` argument 67 | * Support `--trace-deprecation` argument 68 | * Support `deprecate.property(fn, prop, message)` 69 | 70 | 0.3.0 / 2014-06-16 71 | ================== 72 | 73 | * Add `NO_DEPRECATION` environment variable 74 | 75 | 0.2.0 / 2014-06-15 76 | ================== 77 | 78 | * Add `deprecate.property(obj, prop, message)` 79 | * Remove `supports-color` dependency for node.js 0.8 80 | 81 | 0.1.0 / 2014-06-15 82 | ================== 83 | 84 | * Add `deprecate.function(fn, message)` 85 | * Add `process.on('deprecation', fn)` emitter 86 | * Automatically generate message when omitted from `deprecate()` 87 | 88 | 0.0.1 / 2014-06-15 89 | ================== 90 | 91 | * Fix warning for dynamic calls at singe call site 92 | 93 | 0.0.0 / 2014-06-15 94 | ================== 95 | 96 | * Initial implementation 97 | -------------------------------------------------------------------------------- /node_modules/depd/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-2017 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/depd/lib/browser/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = depd 15 | 16 | /** 17 | * Create deprecate for namespace in caller. 18 | */ 19 | 20 | function depd (namespace) { 21 | if (!namespace) { 22 | throw new TypeError('argument namespace is required') 23 | } 24 | 25 | function deprecate (message) { 26 | // no-op in browser 27 | } 28 | 29 | deprecate._file = undefined 30 | deprecate._ignored = true 31 | deprecate._namespace = namespace 32 | deprecate._traced = false 33 | deprecate._warned = Object.create(null) 34 | 35 | deprecate.function = wrapfunction 36 | deprecate.property = wrapproperty 37 | 38 | return deprecate 39 | } 40 | 41 | /** 42 | * Return a wrapped function in a deprecation message. 43 | * 44 | * This is a no-op version of the wrapper, which does nothing but call 45 | * validation. 46 | */ 47 | 48 | function wrapfunction (fn, message) { 49 | if (typeof fn !== 'function') { 50 | throw new TypeError('argument fn must be a function') 51 | } 52 | 53 | return fn 54 | } 55 | 56 | /** 57 | * Wrap property in a deprecation message. 58 | * 59 | * This is a no-op version of the wrapper, which does nothing but call 60 | * validation. 61 | */ 62 | 63 | function wrapproperty (obj, prop, message) { 64 | if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { 65 | throw new TypeError('argument obj must be object') 66 | } 67 | 68 | var descriptor = Object.getOwnPropertyDescriptor(obj, prop) 69 | 70 | if (!descriptor) { 71 | throw new TypeError('must call property on owner object') 72 | } 73 | 74 | if (!descriptor.configurable) { 75 | throw new TypeError('property must be configurable') 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /node_modules/depd/lib/compat/event-listener-count.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = eventListenerCount 15 | 16 | /** 17 | * Get the count of listeners on an event emitter of a specific type. 18 | */ 19 | 20 | function eventListenerCount (emitter, type) { 21 | return emitter.listeners(type).length 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/depd/lib/compat/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2014-2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module dependencies. 11 | * @private 12 | */ 13 | 14 | var EventEmitter = require('events').EventEmitter 15 | 16 | /** 17 | * Module exports. 18 | * @public 19 | */ 20 | 21 | lazyProperty(module.exports, 'callSiteToString', function callSiteToString () { 22 | var limit = Error.stackTraceLimit 23 | var obj = {} 24 | var prep = Error.prepareStackTrace 25 | 26 | function prepareObjectStackTrace (obj, stack) { 27 | return stack 28 | } 29 | 30 | Error.prepareStackTrace = prepareObjectStackTrace 31 | Error.stackTraceLimit = 2 32 | 33 | // capture the stack 34 | Error.captureStackTrace(obj) 35 | 36 | // slice the stack 37 | var stack = obj.stack.slice() 38 | 39 | Error.prepareStackTrace = prep 40 | Error.stackTraceLimit = limit 41 | 42 | return stack[0].toString ? toString : require('./callsite-tostring') 43 | }) 44 | 45 | lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount () { 46 | return EventEmitter.listenerCount || require('./event-listener-count') 47 | }) 48 | 49 | /** 50 | * Define a lazy property. 51 | */ 52 | 53 | function lazyProperty (obj, prop, getter) { 54 | function get () { 55 | var val = getter() 56 | 57 | Object.defineProperty(obj, prop, { 58 | configurable: true, 59 | enumerable: true, 60 | value: val 61 | }) 62 | 63 | return val 64 | } 65 | 66 | Object.defineProperty(obj, prop, { 67 | configurable: true, 68 | enumerable: true, 69 | get: get 70 | }) 71 | } 72 | 73 | /** 74 | * Call toString() on the obj 75 | */ 76 | 77 | function toString (obj) { 78 | return obj.toString() 79 | } 80 | -------------------------------------------------------------------------------- /node_modules/destroy/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/destroy/README.md: -------------------------------------------------------------------------------- 1 | # Destroy 2 | 3 | [![NPM version][npm-image]][npm-url] 4 | [![Build status][travis-image]][travis-url] 5 | [![Test coverage][coveralls-image]][coveralls-url] 6 | [![License][license-image]][license-url] 7 | [![Downloads][downloads-image]][downloads-url] 8 | [![Gittip][gittip-image]][gittip-url] 9 | 10 | Destroy a stream. 11 | 12 | This module is meant to ensure a stream gets destroyed, handling different APIs 13 | and Node.js bugs. 14 | 15 | ## API 16 | 17 | ```js 18 | var destroy = require('destroy') 19 | ``` 20 | 21 | ### destroy(stream) 22 | 23 | Destroy the given stream. In most cases, this is identical to a simple 24 | `stream.destroy()` call. The rules are as follows for a given stream: 25 | 26 | 1. If the `stream` is an instance of `ReadStream`, then call `stream.destroy()` 27 | and add a listener to the `open` event to call `stream.close()` if it is 28 | fired. This is for a Node.js bug that will leak a file descriptor if 29 | `.destroy()` is called before `open`. 30 | 2. If the `stream` is not an instance of `Stream`, then nothing happens. 31 | 3. If the `stream` has a `.destroy()` method, then call it. 32 | 33 | The function returns the `stream` passed in as the argument. 34 | 35 | ## Example 36 | 37 | ```js 38 | var destroy = require('destroy') 39 | 40 | var fs = require('fs') 41 | var stream = fs.createReadStream('package.json') 42 | 43 | // ... and later 44 | destroy(stream) 45 | ``` 46 | 47 | [npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square 48 | [npm-url]: https://npmjs.org/package/destroy 49 | [github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square 50 | [github-url]: https://github.com/stream-utils/destroy/tags 51 | [travis-image]: https://img.shields.io/travis/stream-utils/destroy.svg?style=flat-square 52 | [travis-url]: https://travis-ci.org/stream-utils/destroy 53 | [coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square 54 | [coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master 55 | [license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square 56 | [license-url]: LICENSE.md 57 | [downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square 58 | [downloads-url]: https://npmjs.org/package/destroy 59 | [gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square 60 | [gittip-url]: https://www.gittip.com/jonathanong/ 61 | -------------------------------------------------------------------------------- /node_modules/destroy/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * destroy 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module dependencies. 11 | * @private 12 | */ 13 | 14 | var ReadStream = require('fs').ReadStream 15 | var Stream = require('stream') 16 | 17 | /** 18 | * Module exports. 19 | * @public 20 | */ 21 | 22 | module.exports = destroy 23 | 24 | /** 25 | * Destroy a stream. 26 | * 27 | * @param {object} stream 28 | * @public 29 | */ 30 | 31 | function destroy(stream) { 32 | if (stream instanceof ReadStream) { 33 | return destroyReadStream(stream) 34 | } 35 | 36 | if (!(stream instanceof Stream)) { 37 | return stream 38 | } 39 | 40 | if (typeof stream.destroy === 'function') { 41 | stream.destroy() 42 | } 43 | 44 | return stream 45 | } 46 | 47 | /** 48 | * Destroy a ReadStream. 49 | * 50 | * @param {object} stream 51 | * @private 52 | */ 53 | 54 | function destroyReadStream(stream) { 55 | stream.destroy() 56 | 57 | if (typeof stream.close === 'function') { 58 | // node.js core bug work-around 59 | stream.on('open', onOpenClose) 60 | } 61 | 62 | return stream 63 | } 64 | 65 | /** 66 | * On open handler to close stream. 67 | * @private 68 | */ 69 | 70 | function onOpenClose() { 71 | if (typeof this.fd === 'number') { 72 | // actually close down the fd 73 | this.close() 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /node_modules/ee-first/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/ee-first/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ee-first 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = first 15 | 16 | /** 17 | * Get the first event in a set of event emitters and event pairs. 18 | * 19 | * @param {array} stuff 20 | * @param {function} done 21 | * @public 22 | */ 23 | 24 | function first(stuff, done) { 25 | if (!Array.isArray(stuff)) 26 | throw new TypeError('arg must be an array of [ee, events...] arrays') 27 | 28 | var cleanups = [] 29 | 30 | for (var i = 0; i < stuff.length; i++) { 31 | var arr = stuff[i] 32 | 33 | if (!Array.isArray(arr) || arr.length < 2) 34 | throw new TypeError('each array member must be [ee, events...]') 35 | 36 | var ee = arr[0] 37 | 38 | for (var j = 1; j < arr.length; j++) { 39 | var event = arr[j] 40 | var fn = listener(event, callback) 41 | 42 | // listen to the event 43 | ee.on(event, fn) 44 | // push this listener to the list of cleanups 45 | cleanups.push({ 46 | ee: ee, 47 | event: event, 48 | fn: fn, 49 | }) 50 | } 51 | } 52 | 53 | function callback() { 54 | cleanup() 55 | done.apply(null, arguments) 56 | } 57 | 58 | function cleanup() { 59 | var x 60 | for (var i = 0; i < cleanups.length; i++) { 61 | x = cleanups[i] 62 | x.ee.removeListener(x.event, x.fn) 63 | } 64 | } 65 | 66 | function thunk(fn) { 67 | done = fn 68 | } 69 | 70 | thunk.cancel = cleanup 71 | 72 | return thunk 73 | } 74 | 75 | /** 76 | * Create the event listener. 77 | * @private 78 | */ 79 | 80 | function listener(event, done) { 81 | return function onevent(arg1) { 82 | var args = new Array(arguments.length) 83 | var ee = this 84 | var err = event === 'error' 85 | ? arg1 86 | : null 87 | 88 | // copy args to prevent arguments escaping scope 89 | for (var i = 0; i < args.length; i++) { 90 | args[i] = arguments[i] 91 | } 92 | 93 | done(err, ee, event, args) 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /node_modules/encodeurl/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.2 / 2018-01-21 2 | ================== 3 | 4 | * Fix encoding `%` as last character 5 | 6 | 1.0.1 / 2016-06-09 7 | ================== 8 | 9 | * Fix encoding unpaired surrogates at start/end of string 10 | 11 | 1.0.0 / 2016-06-08 12 | ================== 13 | 14 | * Initial release 15 | -------------------------------------------------------------------------------- /node_modules/encodeurl/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2016 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/encodeurl/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * encodeurl 3 | * Copyright(c) 2016 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = encodeUrl 15 | 16 | /** 17 | * RegExp to match non-URL code points, *after* encoding (i.e. not including "%") 18 | * and including invalid escape sequences. 19 | * @private 20 | */ 21 | 22 | var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g 23 | 24 | /** 25 | * RegExp to match unmatched surrogate pair. 26 | * @private 27 | */ 28 | 29 | var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g 30 | 31 | /** 32 | * String to replace unmatched surrogate pair with. 33 | * @private 34 | */ 35 | 36 | var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2' 37 | 38 | /** 39 | * Encode a URL to a percent-encoded form, excluding already-encoded sequences. 40 | * 41 | * This function will take an already-encoded URL and encode all the non-URL 42 | * code points. This function will not encode the "%" character unless it is 43 | * not part of a valid sequence (`%20` will be left as-is, but `%foo` will 44 | * be encoded as `%25foo`). 45 | * 46 | * This encode is meant to be "safe" and does not throw errors. It will try as 47 | * hard as it can to properly encode the given URL, including replacing any raw, 48 | * unpaired surrogate pairs with the Unicode replacement character prior to 49 | * encoding. 50 | * 51 | * @param {string} url 52 | * @return {string} 53 | * @public 54 | */ 55 | 56 | function encodeUrl (url) { 57 | return String(url) 58 | .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE) 59 | .replace(ENCODE_CHARS_REGEXP, encodeURI) 60 | } 61 | -------------------------------------------------------------------------------- /node_modules/escape-html/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012-2013 TJ Holowaychuk 4 | Copyright (c) 2015 Andreas Lubbe 5 | Copyright (c) 2015 Tiancheng "Timothy" Gu 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /node_modules/escape-html/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # escape-html 3 | 4 | Escape string for use in HTML 5 | 6 | ## Example 7 | 8 | ```js 9 | var escape = require('escape-html'); 10 | var html = escape('foo & bar'); 11 | // -> foo & bar 12 | ``` 13 | 14 | ## Benchmark 15 | 16 | ``` 17 | $ npm run-script bench 18 | 19 | > escape-html@1.0.3 bench nodejs-escape-html 20 | > node benchmark/index.js 21 | 22 | 23 | http_parser@1.0 24 | node@0.10.33 25 | v8@3.14.5.9 26 | ares@1.9.0-DEV 27 | uv@0.10.29 28 | zlib@1.2.3 29 | modules@11 30 | openssl@1.0.1j 31 | 32 | 1 test completed. 33 | 2 tests completed. 34 | 3 tests completed. 35 | 36 | no special characters x 19,435,271 ops/sec ±0.85% (187 runs sampled) 37 | single special character x 6,132,421 ops/sec ±0.67% (194 runs sampled) 38 | many special characters x 3,175,826 ops/sec ±0.65% (193 runs sampled) 39 | ``` 40 | 41 | ## License 42 | 43 | MIT -------------------------------------------------------------------------------- /node_modules/escape-html/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * escape-html 3 | * Copyright(c) 2012-2013 TJ Holowaychuk 4 | * Copyright(c) 2015 Andreas Lubbe 5 | * Copyright(c) 2015 Tiancheng "Timothy" Gu 6 | * MIT Licensed 7 | */ 8 | 9 | 'use strict'; 10 | 11 | /** 12 | * Module variables. 13 | * @private 14 | */ 15 | 16 | var matchHtmlRegExp = /["'&<>]/; 17 | 18 | /** 19 | * Module exports. 20 | * @public 21 | */ 22 | 23 | module.exports = escapeHtml; 24 | 25 | /** 26 | * Escape special characters in the given string of html. 27 | * 28 | * @param {string} string The string to escape for inserting into HTML 29 | * @return {string} 30 | * @public 31 | */ 32 | 33 | function escapeHtml(string) { 34 | var str = '' + string; 35 | var match = matchHtmlRegExp.exec(str); 36 | 37 | if (!match) { 38 | return str; 39 | } 40 | 41 | var escape; 42 | var html = ''; 43 | var index = 0; 44 | var lastIndex = 0; 45 | 46 | for (index = match.index; index < str.length; index++) { 47 | switch (str.charCodeAt(index)) { 48 | case 34: // " 49 | escape = '"'; 50 | break; 51 | case 38: // & 52 | escape = '&'; 53 | break; 54 | case 39: // ' 55 | escape = '''; 56 | break; 57 | case 60: // < 58 | escape = '<'; 59 | break; 60 | case 62: // > 61 | escape = '>'; 62 | break; 63 | default: 64 | continue; 65 | } 66 | 67 | if (lastIndex !== index) { 68 | html += str.substring(lastIndex, index); 69 | } 70 | 71 | lastIndex = index + 1; 72 | html += escape; 73 | } 74 | 75 | return lastIndex !== index 76 | ? html + str.substring(lastIndex, index) 77 | : html; 78 | } 79 | -------------------------------------------------------------------------------- /node_modules/escape-html/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | { 5 | "raw": "escape-html@~1.0.3", 6 | "scope": null, 7 | "escapedName": "escape-html", 8 | "name": "escape-html", 9 | "rawSpec": "~1.0.3", 10 | "spec": ">=1.0.3 <1.1.0", 11 | "type": "range" 12 | }, 13 | "C:\\Users\\Sanat\\Desktop\\techdot\\node_modules\\express" 14 | ] 15 | ], 16 | "_from": "escape-html@>=1.0.3 <1.1.0", 17 | "_id": "escape-html@1.0.3", 18 | "_inCache": true, 19 | "_location": "/escape-html", 20 | "_npmUser": { 21 | "name": "dougwilson", 22 | "email": "doug@somethingdoug.com" 23 | }, 24 | "_npmVersion": "1.4.28", 25 | "_phantomChildren": {}, 26 | "_requested": { 27 | "raw": "escape-html@~1.0.3", 28 | "scope": null, 29 | "escapedName": "escape-html", 30 | "name": "escape-html", 31 | "rawSpec": "~1.0.3", 32 | "spec": ">=1.0.3 <1.1.0", 33 | "type": "range" 34 | }, 35 | "_requiredBy": [ 36 | "/express", 37 | "/finalhandler", 38 | "/send", 39 | "/serve-static" 40 | ], 41 | "_resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 42 | "_shasum": "0258eae4d3d0c0974de1c169188ef0051d1d1988", 43 | "_shrinkwrap": null, 44 | "_spec": "escape-html@~1.0.3", 45 | "_where": "C:\\Users\\Sanat\\Desktop\\techdot\\node_modules\\express", 46 | "bugs": { 47 | "url": "https://github.com/component/escape-html/issues" 48 | }, 49 | "dependencies": {}, 50 | "description": "Escape string for use in HTML", 51 | "devDependencies": { 52 | "beautify-benchmark": "0.2.4", 53 | "benchmark": "1.0.0" 54 | }, 55 | "directories": {}, 56 | "dist": { 57 | "shasum": "0258eae4d3d0c0974de1c169188ef0051d1d1988", 58 | "tarball": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" 59 | }, 60 | "files": [ 61 | "LICENSE", 62 | "Readme.md", 63 | "index.js" 64 | ], 65 | "gitHead": "7ac2ea3977fcac3d4c5be8d2a037812820c65f28", 66 | "homepage": "https://github.com/component/escape-html", 67 | "keywords": [ 68 | "escape", 69 | "html", 70 | "utility" 71 | ], 72 | "license": "MIT", 73 | "maintainers": [ 74 | { 75 | "name": "tjholowaychuk", 76 | "email": "tj@vision-media.ca" 77 | }, 78 | { 79 | "name": "dougwilson", 80 | "email": "doug@somethingdoug.com" 81 | } 82 | ], 83 | "name": "escape-html", 84 | "optionalDependencies": {}, 85 | "readme": "ERROR: No README data found!", 86 | "repository": { 87 | "type": "git", 88 | "url": "git+https://github.com/component/escape-html.git" 89 | }, 90 | "scripts": { 91 | "bench": "node benchmark/index.js" 92 | }, 93 | "version": "1.0.3" 94 | } 95 | -------------------------------------------------------------------------------- /node_modules/etag/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.8.1 / 2017-09-12 2 | ================== 3 | 4 | * perf: replace regular expression with substring 5 | 6 | 1.8.0 / 2017-02-18 7 | ================== 8 | 9 | * Use SHA1 instead of MD5 for ETag hashing 10 | - Improves performance for larger entities 11 | - Works with FIPS 140-2 OpenSSL configuration 12 | 13 | 1.7.0 / 2015-06-08 14 | ================== 15 | 16 | * Always include entity length in ETags for hash length extensions 17 | * Generate non-Stats ETags using MD5 only (no longer CRC32) 18 | * Improve stat performance by removing hashing 19 | * Remove base64 padding in ETags to shorten 20 | * Use MD5 instead of MD4 in weak ETags over 1KB 21 | 22 | 1.6.0 / 2015-05-10 23 | ================== 24 | 25 | * Improve support for JXcore 26 | * Remove requirement of `atime` in the stats object 27 | * Support "fake" stats objects in environments without `fs` 28 | 29 | 1.5.1 / 2014-11-19 30 | ================== 31 | 32 | * deps: crc@3.2.1 33 | - Minor fixes 34 | 35 | 1.5.0 / 2014-10-14 36 | ================== 37 | 38 | * Improve string performance 39 | * Slightly improve speed for weak ETags over 1KB 40 | 41 | 1.4.0 / 2014-09-21 42 | ================== 43 | 44 | * Support "fake" stats objects 45 | * Support Node.js 0.6 46 | 47 | 1.3.1 / 2014-09-14 48 | ================== 49 | 50 | * Use the (new and improved) `crc` for crc32 51 | 52 | 1.3.0 / 2014-08-29 53 | ================== 54 | 55 | * Default strings to strong ETags 56 | * Improve speed for weak ETags over 1KB 57 | 58 | 1.2.1 / 2014-08-29 59 | ================== 60 | 61 | * Use the (much faster) `buffer-crc32` for crc32 62 | 63 | 1.2.0 / 2014-08-24 64 | ================== 65 | 66 | * Add support for file stat objects 67 | 68 | 1.1.0 / 2014-08-24 69 | ================== 70 | 71 | * Add fast-path for empty entity 72 | * Add weak ETag generation 73 | * Shrink size of generated ETags 74 | 75 | 1.0.1 / 2014-08-24 76 | ================== 77 | 78 | * Fix behavior of string containing Unicode 79 | 80 | 1.0.0 / 2014-05-18 81 | ================== 82 | 83 | * Initial release 84 | -------------------------------------------------------------------------------- /node_modules/etag/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-2016 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/express/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2009-2014 TJ Holowaychuk 4 | Copyright (c) 2013-2014 Roman Shtylman 5 | Copyright (c) 2014-2015 Douglas Christopher Wilson 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /node_modules/express/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * express 3 | * Copyright(c) 2009-2013 TJ Holowaychuk 4 | * Copyright(c) 2013 Roman Shtylman 5 | * Copyright(c) 2014-2015 Douglas Christopher Wilson 6 | * MIT Licensed 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./lib/express'); 12 | -------------------------------------------------------------------------------- /node_modules/express/lib/middleware/init.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * express 3 | * Copyright(c) 2009-2013 TJ Holowaychuk 4 | * Copyright(c) 2013 Roman Shtylman 5 | * Copyright(c) 2014-2015 Douglas Christopher Wilson 6 | * MIT Licensed 7 | */ 8 | 9 | 'use strict'; 10 | 11 | /** 12 | * Module dependencies. 13 | * @private 14 | */ 15 | 16 | var setPrototypeOf = require('setprototypeof') 17 | 18 | /** 19 | * Initialization middleware, exposing the 20 | * request and response to each other, as well 21 | * as defaulting the X-Powered-By header field. 22 | * 23 | * @param {Function} app 24 | * @return {Function} 25 | * @api private 26 | */ 27 | 28 | exports.init = function(app){ 29 | return function expressInit(req, res, next){ 30 | if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express'); 31 | req.res = res; 32 | res.req = req; 33 | req.next = next; 34 | 35 | setPrototypeOf(req, app.request) 36 | setPrototypeOf(res, app.response) 37 | 38 | res.locals = res.locals || Object.create(null); 39 | 40 | next(); 41 | }; 42 | }; 43 | 44 | -------------------------------------------------------------------------------- /node_modules/express/lib/middleware/query.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * express 3 | * Copyright(c) 2009-2013 TJ Holowaychuk 4 | * Copyright(c) 2013 Roman Shtylman 5 | * Copyright(c) 2014-2015 Douglas Christopher Wilson 6 | * MIT Licensed 7 | */ 8 | 9 | 'use strict'; 10 | 11 | /** 12 | * Module dependencies. 13 | */ 14 | 15 | var merge = require('utils-merge') 16 | var parseUrl = require('parseurl'); 17 | var qs = require('qs'); 18 | 19 | /** 20 | * @param {Object} options 21 | * @return {Function} 22 | * @api public 23 | */ 24 | 25 | module.exports = function query(options) { 26 | var opts = merge({}, options) 27 | var queryparse = qs.parse; 28 | 29 | if (typeof options === 'function') { 30 | queryparse = options; 31 | opts = undefined; 32 | } 33 | 34 | if (opts !== undefined && opts.allowPrototypes === undefined) { 35 | // back-compat for qs module 36 | opts.allowPrototypes = true; 37 | } 38 | 39 | return function query(req, res, next){ 40 | if (!req.query) { 41 | var val = parseUrl(req).query; 42 | req.query = queryparse(val, opts); 43 | } 44 | 45 | next(); 46 | }; 47 | }; 48 | -------------------------------------------------------------------------------- /node_modules/finalhandler/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-2017 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/forwarded/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.1.2 / 2017-09-14 2 | ================== 3 | 4 | * perf: improve header parsing 5 | * perf: reduce overhead when no `X-Forwarded-For` header 6 | 7 | 0.1.1 / 2017-09-10 8 | ================== 9 | 10 | * Fix trimming leading / trailing OWS 11 | * perf: hoist regular expression 12 | 13 | 0.1.0 / 2014-09-21 14 | ================== 15 | 16 | * Initial release 17 | -------------------------------------------------------------------------------- /node_modules/forwarded/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-2017 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/forwarded/README.md: -------------------------------------------------------------------------------- 1 | # forwarded 2 | 3 | [![NPM Version][npm-image]][npm-url] 4 | [![NPM Downloads][downloads-image]][downloads-url] 5 | [![Node.js Version][node-version-image]][node-version-url] 6 | [![Build Status][travis-image]][travis-url] 7 | [![Test Coverage][coveralls-image]][coveralls-url] 8 | 9 | Parse HTTP X-Forwarded-For header 10 | 11 | ## Installation 12 | 13 | This is a [Node.js](https://nodejs.org/en/) module available through the 14 | [npm registry](https://www.npmjs.com/). Installation is done using the 15 | [`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): 16 | 17 | ```sh 18 | $ npm install forwarded 19 | ``` 20 | 21 | ## API 22 | 23 | ```js 24 | var forwarded = require('forwarded') 25 | ``` 26 | 27 | ### forwarded(req) 28 | 29 | ```js 30 | var addresses = forwarded(req) 31 | ``` 32 | 33 | Parse the `X-Forwarded-For` header from the request. Returns an array 34 | of the addresses, including the socket address for the `req`, in reverse 35 | order (i.e. index `0` is the socket address and the last index is the 36 | furthest address, typically the end-user). 37 | 38 | ## Testing 39 | 40 | ```sh 41 | $ npm test 42 | ``` 43 | 44 | ## License 45 | 46 | [MIT](LICENSE) 47 | 48 | [npm-image]: https://img.shields.io/npm/v/forwarded.svg 49 | [npm-url]: https://npmjs.org/package/forwarded 50 | [node-version-image]: https://img.shields.io/node/v/forwarded.svg 51 | [node-version-url]: https://nodejs.org/en/download/ 52 | [travis-image]: https://img.shields.io/travis/jshttp/forwarded/master.svg 53 | [travis-url]: https://travis-ci.org/jshttp/forwarded 54 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/forwarded/master.svg 55 | [coveralls-url]: https://coveralls.io/r/jshttp/forwarded?branch=master 56 | [downloads-image]: https://img.shields.io/npm/dm/forwarded.svg 57 | [downloads-url]: https://npmjs.org/package/forwarded 58 | -------------------------------------------------------------------------------- /node_modules/forwarded/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * forwarded 3 | * Copyright(c) 2014-2017 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = forwarded 15 | 16 | /** 17 | * Get all addresses in the request, using the `X-Forwarded-For` header. 18 | * 19 | * @param {object} req 20 | * @return {array} 21 | * @public 22 | */ 23 | 24 | function forwarded (req) { 25 | if (!req) { 26 | throw new TypeError('argument req is required') 27 | } 28 | 29 | // simple header parsing 30 | var proxyAddrs = parse(req.headers['x-forwarded-for'] || '') 31 | var socketAddr = req.connection.remoteAddress 32 | var addrs = [socketAddr].concat(proxyAddrs) 33 | 34 | // return all addresses 35 | return addrs 36 | } 37 | 38 | /** 39 | * Parse the X-Forwarded-For header. 40 | * 41 | * @param {string} header 42 | * @private 43 | */ 44 | 45 | function parse (header) { 46 | var end = header.length 47 | var list = [] 48 | var start = header.length 49 | 50 | // gather addresses, backwards 51 | for (var i = header.length - 1; i >= 0; i--) { 52 | switch (header.charCodeAt(i)) { 53 | case 0x20: /* */ 54 | if (start === end) { 55 | start = end = i 56 | } 57 | break 58 | case 0x2c: /* , */ 59 | if (start !== end) { 60 | list.push(header.substring(start, end)) 61 | } 62 | start = end = i 63 | break 64 | default: 65 | start = i 66 | break 67 | } 68 | } 69 | 70 | // final address 71 | if (start !== end) { 72 | list.push(header.substring(start, end)) 73 | } 74 | 75 | return list 76 | } 77 | -------------------------------------------------------------------------------- /node_modules/fresh/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.5.2 / 2017-09-13 2 | ================== 3 | 4 | * Fix regression matching multiple ETags in `If-None-Match` 5 | * perf: improve `If-None-Match` token parsing 6 | 7 | 0.5.1 / 2017-09-11 8 | ================== 9 | 10 | * Fix handling of modified headers with invalid dates 11 | * perf: improve ETag match loop 12 | 13 | 0.5.0 / 2017-02-21 14 | ================== 15 | 16 | * Fix incorrect result when `If-None-Match` has both `*` and ETags 17 | * Fix weak `ETag` matching to match spec 18 | * perf: delay reading header values until needed 19 | * perf: skip checking modified time if ETag check failed 20 | * perf: skip parsing `If-None-Match` when no `ETag` header 21 | * perf: use `Date.parse` instead of `new Date` 22 | 23 | 0.4.0 / 2017-02-05 24 | ================== 25 | 26 | * Fix false detection of `no-cache` request directive 27 | * perf: enable strict mode 28 | * perf: hoist regular expressions 29 | * perf: remove duplicate conditional 30 | * perf: remove unnecessary boolean coercions 31 | 32 | 0.3.0 / 2015-05-12 33 | ================== 34 | 35 | * Add weak `ETag` matching support 36 | 37 | 0.2.4 / 2014-09-07 38 | ================== 39 | 40 | * Support Node.js 0.6 41 | 42 | 0.2.3 / 2014-09-07 43 | ================== 44 | 45 | * Move repository to jshttp 46 | 47 | 0.2.2 / 2014-02-19 48 | ================== 49 | 50 | * Revert "Fix for blank page on Safari reload" 51 | 52 | 0.2.1 / 2014-01-29 53 | ================== 54 | 55 | * Fix for blank page on Safari reload 56 | 57 | 0.2.0 / 2013-08-11 58 | ================== 59 | 60 | * Return stale for `Cache-Control: no-cache` 61 | 62 | 0.1.0 / 2012-06-15 63 | ================== 64 | 65 | * Add `If-None-Match: *` support 66 | 67 | 0.0.1 / 2012-06-10 68 | ================== 69 | 70 | * Initial release 71 | -------------------------------------------------------------------------------- /node_modules/fresh/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 TJ Holowaychuk 4 | Copyright (c) 2016-2017 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/http-errors/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/http-errors/node_modules/depd/History.md: -------------------------------------------------------------------------------- 1 | 1.1.1 / 2017-07-27 2 | ================== 3 | 4 | * Remove unnecessary `Buffer` loading 5 | * Support Node.js 0.6 to 8.x 6 | 7 | 1.1.0 / 2015-09-14 8 | ================== 9 | 10 | * Enable strict mode in more places 11 | * Support io.js 3.x 12 | * Support io.js 2.x 13 | * Support web browser loading 14 | - Requires bundler like Browserify or webpack 15 | 16 | 1.0.1 / 2015-04-07 17 | ================== 18 | 19 | * Fix `TypeError`s when under `'use strict'` code 20 | * Fix useless type name on auto-generated messages 21 | * Support io.js 1.x 22 | * Support Node.js 0.12 23 | 24 | 1.0.0 / 2014-09-17 25 | ================== 26 | 27 | * No changes 28 | 29 | 0.4.5 / 2014-09-09 30 | ================== 31 | 32 | * Improve call speed to functions using the function wrapper 33 | * Support Node.js 0.6 34 | 35 | 0.4.4 / 2014-07-27 36 | ================== 37 | 38 | * Work-around v8 generating empty stack traces 39 | 40 | 0.4.3 / 2014-07-26 41 | ================== 42 | 43 | * Fix exception when global `Error.stackTraceLimit` is too low 44 | 45 | 0.4.2 / 2014-07-19 46 | ================== 47 | 48 | * Correct call site for wrapped functions and properties 49 | 50 | 0.4.1 / 2014-07-19 51 | ================== 52 | 53 | * Improve automatic message generation for function properties 54 | 55 | 0.4.0 / 2014-07-19 56 | ================== 57 | 58 | * Add `TRACE_DEPRECATION` environment variable 59 | * Remove non-standard grey color from color output 60 | * Support `--no-deprecation` argument 61 | * Support `--trace-deprecation` argument 62 | * Support `deprecate.property(fn, prop, message)` 63 | 64 | 0.3.0 / 2014-06-16 65 | ================== 66 | 67 | * Add `NO_DEPRECATION` environment variable 68 | 69 | 0.2.0 / 2014-06-15 70 | ================== 71 | 72 | * Add `deprecate.property(obj, prop, message)` 73 | * Remove `supports-color` dependency for node.js 0.8 74 | 75 | 0.1.0 / 2014-06-15 76 | ================== 77 | 78 | * Add `deprecate.function(fn, message)` 79 | * Add `process.on('deprecation', fn)` emitter 80 | * Automatically generate message when omitted from `deprecate()` 81 | 82 | 0.0.1 / 2014-06-15 83 | ================== 84 | 85 | * Fix warning for dynamic calls at singe call site 86 | 87 | 0.0.0 / 2014-06-15 88 | ================== 89 | 90 | * Initial implementation 91 | -------------------------------------------------------------------------------- /node_modules/http-errors/node_modules/depd/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-2017 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/http-errors/node_modules/depd/lib/browser/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = depd 15 | 16 | /** 17 | * Create deprecate for namespace in caller. 18 | */ 19 | 20 | function depd (namespace) { 21 | if (!namespace) { 22 | throw new TypeError('argument namespace is required') 23 | } 24 | 25 | function deprecate (message) { 26 | // no-op in browser 27 | } 28 | 29 | deprecate._file = undefined 30 | deprecate._ignored = true 31 | deprecate._namespace = namespace 32 | deprecate._traced = false 33 | deprecate._warned = Object.create(null) 34 | 35 | deprecate.function = wrapfunction 36 | deprecate.property = wrapproperty 37 | 38 | return deprecate 39 | } 40 | 41 | /** 42 | * Return a wrapped function in a deprecation message. 43 | * 44 | * This is a no-op version of the wrapper, which does nothing but call 45 | * validation. 46 | */ 47 | 48 | function wrapfunction (fn, message) { 49 | if (typeof fn !== 'function') { 50 | throw new TypeError('argument fn must be a function') 51 | } 52 | 53 | return fn 54 | } 55 | 56 | /** 57 | * Wrap property in a deprecation message. 58 | * 59 | * This is a no-op version of the wrapper, which does nothing but call 60 | * validation. 61 | */ 62 | 63 | function wrapproperty (obj, prop, message) { 64 | if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { 65 | throw new TypeError('argument obj must be object') 66 | } 67 | 68 | var descriptor = Object.getOwnPropertyDescriptor(obj, prop) 69 | 70 | if (!descriptor) { 71 | throw new TypeError('must call property on owner object') 72 | } 73 | 74 | if (!descriptor.configurable) { 75 | throw new TypeError('property must be configurable') 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /node_modules/http-errors/node_modules/depd/lib/compat/event-listener-count.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = eventListenerCount 15 | 16 | /** 17 | * Get the count of listeners on an event emitter of a specific type. 18 | */ 19 | 20 | function eventListenerCount (emitter, type) { 21 | return emitter.listeners(type).length 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/http-errors/node_modules/depd/lib/compat/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2014-2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module dependencies. 11 | * @private 12 | */ 13 | 14 | var EventEmitter = require('events').EventEmitter 15 | 16 | /** 17 | * Module exports. 18 | * @public 19 | */ 20 | 21 | lazyProperty(module.exports, 'callSiteToString', function callSiteToString () { 22 | var limit = Error.stackTraceLimit 23 | var obj = {} 24 | var prep = Error.prepareStackTrace 25 | 26 | function prepareObjectStackTrace (obj, stack) { 27 | return stack 28 | } 29 | 30 | Error.prepareStackTrace = prepareObjectStackTrace 31 | Error.stackTraceLimit = 2 32 | 33 | // capture the stack 34 | Error.captureStackTrace(obj) 35 | 36 | // slice the stack 37 | var stack = obj.stack.slice() 38 | 39 | Error.prepareStackTrace = prep 40 | Error.stackTraceLimit = limit 41 | 42 | return stack[0].toString ? toString : require('./callsite-tostring') 43 | }) 44 | 45 | lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount () { 46 | return EventEmitter.listenerCount || require('./event-listener-count') 47 | }) 48 | 49 | /** 50 | * Define a lazy property. 51 | */ 52 | 53 | function lazyProperty (obj, prop, getter) { 54 | function get () { 55 | var val = getter() 56 | 57 | Object.defineProperty(obj, prop, { 58 | configurable: true, 59 | enumerable: true, 60 | value: val 61 | }) 62 | 63 | return val 64 | } 65 | 66 | Object.defineProperty(obj, prop, { 67 | configurable: true, 68 | enumerable: true, 69 | get: get 70 | }) 71 | } 72 | 73 | /** 74 | * Call toString() on the obj 75 | */ 76 | 77 | function toString (obj) { 78 | return obj.toString() 79 | } 80 | -------------------------------------------------------------------------------- /node_modules/http-errors/node_modules/setprototypeof/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Wes Todd 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 10 | SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 12 | OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 13 | CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /node_modules/http-errors/node_modules/setprototypeof/README.md: -------------------------------------------------------------------------------- 1 | # Polyfill for `Object.setPrototypeOf` 2 | 3 | A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8. 4 | 5 | ## Usage: 6 | 7 | ``` 8 | $ npm install --save setprototypeof 9 | ``` 10 | 11 | ```javascript 12 | var setPrototypeOf = require('setprototypeof'); 13 | 14 | var obj = {}; 15 | setPrototypeOf(obj, { 16 | foo: function() { 17 | return 'bar'; 18 | } 19 | }); 20 | obj.foo(); // bar 21 | ``` 22 | -------------------------------------------------------------------------------- /node_modules/http-errors/node_modules/setprototypeof/index.js: -------------------------------------------------------------------------------- 1 | module.exports = Object.setPrototypeOf || ({__proto__:[]} instanceof Array ? setProtoOf : mixinProperties); 2 | 3 | function setProtoOf(obj, proto) { 4 | obj.__proto__ = proto; 5 | return obj; 6 | } 7 | 8 | function mixinProperties(obj, proto) { 9 | for (var prop in proto) { 10 | if (!obj.hasOwnProperty(prop)) { 11 | obj[prop] = proto[prop]; 12 | } 13 | } 14 | return obj; 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/iconv-lite/.npmignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *sublime-* 3 | generation 4 | test 5 | wiki 6 | coverage 7 | -------------------------------------------------------------------------------- /node_modules/iconv-lite/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "0.10" 5 | - "0.11" 6 | - "0.12" 7 | - "iojs" 8 | - "4" 9 | - "6" 10 | - "8" 11 | - "node" 12 | 13 | 14 | env: 15 | - CXX=g++-4.8 16 | addons: 17 | apt: 18 | sources: 19 | - ubuntu-toolchain-r-test 20 | packages: 21 | - gcc-4.8 22 | - g++-4.8 23 | 24 | -------------------------------------------------------------------------------- /node_modules/iconv-lite/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Alexander Shtuchkin 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /node_modules/iconv-lite/encodings/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | // Update this array if you add/rename/remove files in this directory. 4 | // We support Browserify by skipping automatic module discovery and requiring modules directly. 5 | var modules = [ 6 | require("./internal"), 7 | require("./utf16"), 8 | require("./utf7"), 9 | require("./sbcs-codec"), 10 | require("./sbcs-data"), 11 | require("./sbcs-data-generated"), 12 | require("./dbcs-codec"), 13 | require("./dbcs-data"), 14 | ]; 15 | 16 | // Put all encoding/alias/codec definitions to single object and export it. 17 | for (var i = 0; i < modules.length; i++) { 18 | var module = modules[i]; 19 | for (var enc in module) 20 | if (Object.prototype.hasOwnProperty.call(module, enc)) 21 | exports[enc] = module[enc]; 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/iconv-lite/encodings/sbcs-codec.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var Buffer = require("buffer").Buffer; 3 | 4 | // Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that 5 | // correspond to encoded bytes (if 128 - then lower half is ASCII). 6 | 7 | exports._sbcs = SBCSCodec; 8 | function SBCSCodec(codecOptions, iconv) { 9 | if (!codecOptions) 10 | throw new Error("SBCS codec is called without the data.") 11 | 12 | // Prepare char buffer for decoding. 13 | if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) 14 | throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); 15 | 16 | if (codecOptions.chars.length === 128) { 17 | var asciiString = ""; 18 | for (var i = 0; i < 128; i++) 19 | asciiString += String.fromCharCode(i); 20 | codecOptions.chars = asciiString + codecOptions.chars; 21 | } 22 | 23 | this.decodeBuf = new Buffer(codecOptions.chars, 'ucs2'); 24 | 25 | // Encoding buffer. 26 | var encodeBuf = new Buffer(65536); 27 | encodeBuf.fill(iconv.defaultCharSingleByte.charCodeAt(0)); 28 | 29 | for (var i = 0; i < codecOptions.chars.length; i++) 30 | encodeBuf[codecOptions.chars.charCodeAt(i)] = i; 31 | 32 | this.encodeBuf = encodeBuf; 33 | } 34 | 35 | SBCSCodec.prototype.encoder = SBCSEncoder; 36 | SBCSCodec.prototype.decoder = SBCSDecoder; 37 | 38 | 39 | function SBCSEncoder(options, codec) { 40 | this.encodeBuf = codec.encodeBuf; 41 | } 42 | 43 | SBCSEncoder.prototype.write = function(str) { 44 | var buf = new Buffer(str.length); 45 | for (var i = 0; i < str.length; i++) 46 | buf[i] = this.encodeBuf[str.charCodeAt(i)]; 47 | 48 | return buf; 49 | } 50 | 51 | SBCSEncoder.prototype.end = function() { 52 | } 53 | 54 | 55 | function SBCSDecoder(options, codec) { 56 | this.decodeBuf = codec.decodeBuf; 57 | } 58 | 59 | SBCSDecoder.prototype.write = function(buf) { 60 | // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. 61 | var decodeBuf = this.decodeBuf; 62 | var newBuf = new Buffer(buf.length*2); 63 | var idx1 = 0, idx2 = 0; 64 | for (var i = 0; i < buf.length; i++) { 65 | idx1 = buf[i]*2; idx2 = i*2; 66 | newBuf[idx2] = decodeBuf[idx1]; 67 | newBuf[idx2+1] = decodeBuf[idx1+1]; 68 | } 69 | return newBuf.toString('ucs2'); 70 | } 71 | 72 | SBCSDecoder.prototype.end = function() { 73 | } 74 | -------------------------------------------------------------------------------- /node_modules/iconv-lite/encodings/tables/gb18030-ranges.json: -------------------------------------------------------------------------------- 1 | {"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} -------------------------------------------------------------------------------- /node_modules/iconv-lite/encodings/tables/gbk-added.json: -------------------------------------------------------------------------------- 1 | [ 2 | ["a140","",62], 3 | ["a180","",32], 4 | ["a240","",62], 5 | ["a280","",32], 6 | ["a2ab","",5], 7 | ["a2e3","€"], 8 | ["a2ef",""], 9 | ["a2fd",""], 10 | ["a340","",62], 11 | ["a380","",31," "], 12 | ["a440","",62], 13 | ["a480","",32], 14 | ["a4f4","",10], 15 | ["a540","",62], 16 | ["a580","",32], 17 | ["a5f7","",7], 18 | ["a640","",62], 19 | ["a680","",32], 20 | ["a6b9","",7], 21 | ["a6d9","",6], 22 | ["a6ec",""], 23 | ["a6f3",""], 24 | ["a6f6","",8], 25 | ["a740","",62], 26 | ["a780","",32], 27 | ["a7c2","",14], 28 | ["a7f2","",12], 29 | ["a896","",10], 30 | ["a8bc",""], 31 | ["a8bf","ǹ"], 32 | ["a8c1",""], 33 | ["a8ea","",20], 34 | ["a958",""], 35 | ["a95b",""], 36 | ["a95d",""], 37 | ["a989","〾⿰",11], 38 | ["a997","",12], 39 | ["a9f0","",14], 40 | ["aaa1","",93], 41 | ["aba1","",93], 42 | ["aca1","",93], 43 | ["ada1","",93], 44 | ["aea1","",93], 45 | ["afa1","",93], 46 | ["d7fa","",4], 47 | ["f8a1","",93], 48 | ["f9a1","",93], 49 | ["faa1","",93], 50 | ["fba1","",93], 51 | ["fca1","",93], 52 | ["fda1","",93], 53 | ["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], 54 | ["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93] 55 | ] 56 | -------------------------------------------------------------------------------- /node_modules/iconv-lite/lib/bom-handling.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var BOMChar = '\uFEFF'; 4 | 5 | exports.PrependBOM = PrependBOMWrapper 6 | function PrependBOMWrapper(encoder, options) { 7 | this.encoder = encoder; 8 | this.addBOM = true; 9 | } 10 | 11 | PrependBOMWrapper.prototype.write = function(str) { 12 | if (this.addBOM) { 13 | str = BOMChar + str; 14 | this.addBOM = false; 15 | } 16 | 17 | return this.encoder.write(str); 18 | } 19 | 20 | PrependBOMWrapper.prototype.end = function() { 21 | return this.encoder.end(); 22 | } 23 | 24 | 25 | //------------------------------------------------------------------------------ 26 | 27 | exports.StripBOM = StripBOMWrapper; 28 | function StripBOMWrapper(decoder, options) { 29 | this.decoder = decoder; 30 | this.pass = false; 31 | this.options = options || {}; 32 | } 33 | 34 | StripBOMWrapper.prototype.write = function(buf) { 35 | var res = this.decoder.write(buf); 36 | if (this.pass || !res) 37 | return res; 38 | 39 | if (res[0] === BOMChar) { 40 | res = res.slice(1); 41 | if (typeof this.options.stripBOM === 'function') 42 | this.options.stripBOM(); 43 | } 44 | 45 | this.pass = true; 46 | return res; 47 | } 48 | 49 | StripBOMWrapper.prototype.end = function() { 50 | return this.decoder.end(); 51 | } 52 | 53 | -------------------------------------------------------------------------------- /node_modules/iconv-lite/lib/index.d.ts: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. 4 | * REQUIREMENT: This definition is dependent on the @types/node definition. 5 | * Install with `npm install @types/node --save-dev` 6 | *--------------------------------------------------------------------------------------------*/ 7 | 8 | declare module 'iconv-lite' { 9 | export function decode(buffer: NodeBuffer, encoding: string, options?: Options): string; 10 | 11 | export function encode(content: string, encoding: string, options?: Options): NodeBuffer; 12 | 13 | export function encodingExists(encoding: string): boolean; 14 | 15 | export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; 16 | 17 | export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; 18 | } 19 | 20 | export interface Options { 21 | stripBOM?: boolean; 22 | addBOM?: boolean; 23 | defaultEncoding?: string; 24 | } 25 | -------------------------------------------------------------------------------- /node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /node_modules/inherits/README.md: -------------------------------------------------------------------------------- 1 | Browser-friendly inheritance fully compatible with standard node.js 2 | [inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). 3 | 4 | This package exports standard `inherits` from node.js `util` module in 5 | node environment, but also provides alternative browser-friendly 6 | implementation through [browser 7 | field](https://gist.github.com/shtylman/4339901). Alternative 8 | implementation is a literal copy of standard one located in standalone 9 | module to avoid requiring of `util`. It also has a shim for old 10 | browsers with no `Object.create` support. 11 | 12 | While keeping you sure you are using standard `inherits` 13 | implementation in node.js environment, it allows bundlers such as 14 | [browserify](https://github.com/substack/node-browserify) to not 15 | include full `util` package to your client code if all you need is 16 | just `inherits` function. It worth, because browser shim for `util` 17 | package is large and `inherits` is often the single function you need 18 | from it. 19 | 20 | It's recommended to use this package instead of 21 | `require('util').inherits` for any code that has chances to be used 22 | not only in node.js but in browser too. 23 | 24 | ## usage 25 | 26 | ```js 27 | var inherits = require('inherits'); 28 | // then use exactly as the standard one 29 | ``` 30 | 31 | ## note on version ~1.0 32 | 33 | Version ~1.0 had completely different motivation and is not compatible 34 | neither with 2.0 nor with standard node.js `inherits`. 35 | 36 | If you are using version ~1.0 and planning to switch to ~2.0, be 37 | careful: 38 | 39 | * new version uses `super_` instead of `super` for referencing 40 | superclass 41 | * new version overwrites current prototype while old one preserves any 42 | existing fields on it 43 | -------------------------------------------------------------------------------- /node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | try { 2 | var util = require('util'); 3 | if (typeof util.inherits !== 'function') throw ''; 4 | module.exports = util.inherits; 5 | } catch (e) { 6 | module.exports = require('./inherits_browser.js'); 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | ctor.super_ = superCtor 5 | ctor.prototype = Object.create(superCtor.prototype, { 6 | constructor: { 7 | value: ctor, 8 | enumerable: false, 9 | writable: true, 10 | configurable: true 11 | } 12 | }); 13 | }; 14 | } else { 15 | // old school shim for old browsers 16 | module.exports = function inherits(ctor, superCtor) { 17 | ctor.super_ = superCtor 18 | var TempCtor = function () {} 19 | TempCtor.prototype = superCtor.prototype 20 | ctor.prototype = new TempCtor() 21 | ctor.prototype.constructor = ctor 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/ipaddr.js/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | -------------------------------------------------------------------------------- /node_modules/ipaddr.js/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - "0.10" 5 | - "0.11" 6 | - "0.12" 7 | - "4.0" 8 | - "4.1" 9 | - "4.2" 10 | - "5" 11 | -------------------------------------------------------------------------------- /node_modules/ipaddr.js/Cakefile: -------------------------------------------------------------------------------- 1 | fs = require 'fs' 2 | CoffeeScript = require 'coffee-script' 3 | nodeunit = require 'nodeunit' 4 | UglifyJS = require 'uglify-js' 5 | 6 | task 'build', 'build javascript files from sources', (cb) -> 7 | source = fs.readFileSync 'src/ipaddr.coffee', 'utf-8' 8 | fs.writeFileSync 'lib/ipaddr.js', CoffeeScript.compile source.toString() 9 | 10 | source = fs.readFileSync 'lib/ipaddr.js', 'utf-8' 11 | fs.writeFileSync('ipaddr.min.js', UglifyJS.minify(source).code) 12 | 13 | task 'test', 'run the bundled tests', (cb) -> 14 | nodeunit.reporters.default.run ['test'] 15 | -------------------------------------------------------------------------------- /node_modules/ipaddr.js/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011-2017 whitequark 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/ipaddr.js/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ipaddr.js", 3 | "version": "1.6.0", 4 | "homepage": "https://github.com/whitequark/ipaddr.js", 5 | "authors": [ 6 | "whitequark " 7 | ], 8 | "description": "IP address manipulation library in JavaScript (CoffeeScript, actually)", 9 | "main": "lib/ipaddr.js", 10 | "moduleType": [ 11 | "globals", 12 | "node" 13 | ], 14 | "keywords": [ 15 | "javscript", 16 | "ip", 17 | "address", 18 | "ipv4", 19 | "ipv6" 20 | ], 21 | "license": "MIT", 22 | "ignore": [ 23 | "**/.*", 24 | "node_modules", 25 | "bower_components", 26 | "test", 27 | "tests" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/media-typer/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.3.0 / 2014-09-07 2 | ================== 3 | 4 | * Support Node.js 0.6 5 | * Throw error when parameter format invalid on parse 6 | 7 | 0.2.0 / 2014-06-18 8 | ================== 9 | 10 | * Add `typer.format()` to format media types 11 | 12 | 0.1.0 / 2014-06-17 13 | ================== 14 | 15 | * Accept `req` as argument to `parse` 16 | * Accept `res` as argument to `parse` 17 | * Parse media type with extra LWS between type and first parameter 18 | 19 | 0.0.0 / 2014-06-13 20 | ================== 21 | 22 | * Initial implementation 23 | -------------------------------------------------------------------------------- /node_modules/media-typer/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/media-typer/README.md: -------------------------------------------------------------------------------- 1 | # media-typer 2 | 3 | [![NPM Version][npm-image]][npm-url] 4 | [![NPM Downloads][downloads-image]][downloads-url] 5 | [![Node.js Version][node-version-image]][node-version-url] 6 | [![Build Status][travis-image]][travis-url] 7 | [![Test Coverage][coveralls-image]][coveralls-url] 8 | 9 | Simple RFC 6838 media type parser 10 | 11 | ## Installation 12 | 13 | ```sh 14 | $ npm install media-typer 15 | ``` 16 | 17 | ## API 18 | 19 | ```js 20 | var typer = require('media-typer') 21 | ``` 22 | 23 | ### typer.parse(string) 24 | 25 | ```js 26 | var obj = typer.parse('image/svg+xml; charset=utf-8') 27 | ``` 28 | 29 | Parse a media type string. This will return an object with the following 30 | properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`): 31 | 32 | - `type`: The type of the media type (always lower case). Example: `'image'` 33 | 34 | - `subtype`: The subtype of the media type (always lower case). Example: `'svg'` 35 | 36 | - `suffix`: The suffix of the media type (always lower case). Example: `'xml'` 37 | 38 | - `parameters`: An object of the parameters in the media type (name of parameter always lower case). Example: `{charset: 'utf-8'}` 39 | 40 | ### typer.parse(req) 41 | 42 | ```js 43 | var obj = typer.parse(req) 44 | ``` 45 | 46 | Parse the `content-type` header from the given `req`. Short-cut for 47 | `typer.parse(req.headers['content-type'])`. 48 | 49 | ### typer.parse(res) 50 | 51 | ```js 52 | var obj = typer.parse(res) 53 | ``` 54 | 55 | Parse the `content-type` header set on the given `res`. Short-cut for 56 | `typer.parse(res.getHeader('content-type'))`. 57 | 58 | ### typer.format(obj) 59 | 60 | ```js 61 | var obj = typer.format({type: 'image', subtype: 'svg', suffix: 'xml'}) 62 | ``` 63 | 64 | Format an object into a media type string. This will return a string of the 65 | mime type for the given object. For the properties of the object, see the 66 | documentation for `typer.parse(string)`. 67 | 68 | ## License 69 | 70 | [MIT](LICENSE) 71 | 72 | [npm-image]: https://img.shields.io/npm/v/media-typer.svg?style=flat 73 | [npm-url]: https://npmjs.org/package/media-typer 74 | [node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat 75 | [node-version-url]: http://nodejs.org/download/ 76 | [travis-image]: https://img.shields.io/travis/jshttp/media-typer.svg?style=flat 77 | [travis-url]: https://travis-ci.org/jshttp/media-typer 78 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/media-typer.svg?style=flat 79 | [coveralls-url]: https://coveralls.io/r/jshttp/media-typer 80 | [downloads-image]: https://img.shields.io/npm/dm/media-typer.svg?style=flat 81 | [downloads-url]: https://npmjs.org/package/media-typer 82 | -------------------------------------------------------------------------------- /node_modules/merge-descriptors/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.1 / 2016-01-17 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.0.0 / 2015-03-01 7 | ================== 8 | 9 | * Add option to only add new descriptors 10 | * Add simple argument validation 11 | * Add jsdoc to source file 12 | 13 | 0.0.2 / 2013-12-14 14 | ================== 15 | 16 | * Move repository to `component` organization 17 | 18 | 0.0.1 / 2013-10-29 19 | ================== 20 | 21 | * Initial release 22 | -------------------------------------------------------------------------------- /node_modules/merge-descriptors/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013 Jonathan Ong 4 | Copyright (c) 2015 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/merge-descriptors/README.md: -------------------------------------------------------------------------------- 1 | # Merge Descriptors 2 | 3 | [![NPM Version][npm-image]][npm-url] 4 | [![NPM Downloads][downloads-image]][downloads-url] 5 | [![Build Status][travis-image]][travis-url] 6 | [![Test Coverage][coveralls-image]][coveralls-url] 7 | 8 | Merge objects using descriptors. 9 | 10 | ```js 11 | var thing = { 12 | get name() { 13 | return 'jon' 14 | } 15 | } 16 | 17 | var animal = { 18 | 19 | } 20 | 21 | merge(animal, thing) 22 | 23 | animal.name === 'jon' 24 | ``` 25 | 26 | ## API 27 | 28 | ### merge(destination, source) 29 | 30 | Redefines `destination`'s descriptors with `source`'s. 31 | 32 | ### merge(destination, source, false) 33 | 34 | Defines `source`'s descriptors on `destination` if `destination` does not have 35 | a descriptor by the same name. 36 | 37 | ## License 38 | 39 | [MIT](LICENSE) 40 | 41 | [npm-image]: https://img.shields.io/npm/v/merge-descriptors.svg 42 | [npm-url]: https://npmjs.org/package/merge-descriptors 43 | [travis-image]: https://img.shields.io/travis/component/merge-descriptors/master.svg 44 | [travis-url]: https://travis-ci.org/component/merge-descriptors 45 | [coveralls-image]: https://img.shields.io/coveralls/component/merge-descriptors/master.svg 46 | [coveralls-url]: https://coveralls.io/r/component/merge-descriptors?branch=master 47 | [downloads-image]: https://img.shields.io/npm/dm/merge-descriptors.svg 48 | [downloads-url]: https://npmjs.org/package/merge-descriptors 49 | -------------------------------------------------------------------------------- /node_modules/merge-descriptors/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * merge-descriptors 3 | * Copyright(c) 2014 Jonathan Ong 4 | * Copyright(c) 2015 Douglas Christopher Wilson 5 | * MIT Licensed 6 | */ 7 | 8 | 'use strict' 9 | 10 | /** 11 | * Module exports. 12 | * @public 13 | */ 14 | 15 | module.exports = merge 16 | 17 | /** 18 | * Module variables. 19 | * @private 20 | */ 21 | 22 | var hasOwnProperty = Object.prototype.hasOwnProperty 23 | 24 | /** 25 | * Merge the property descriptors of `src` into `dest` 26 | * 27 | * @param {object} dest Object to add descriptors to 28 | * @param {object} src Object to clone descriptors from 29 | * @param {boolean} [redefine=true] Redefine `dest` properties with `src` properties 30 | * @returns {object} Reference to dest 31 | * @public 32 | */ 33 | 34 | function merge(dest, src, redefine) { 35 | if (!dest) { 36 | throw new TypeError('argument dest is required') 37 | } 38 | 39 | if (!src) { 40 | throw new TypeError('argument src is required') 41 | } 42 | 43 | if (redefine === undefined) { 44 | // Default to true 45 | redefine = true 46 | } 47 | 48 | Object.getOwnPropertyNames(src).forEach(function forEachOwnPropertyName(name) { 49 | if (!redefine && hasOwnProperty.call(dest, name)) { 50 | // Skip desriptor 51 | return 52 | } 53 | 54 | // Copy descriptor 55 | var descriptor = Object.getOwnPropertyDescriptor(src, name) 56 | Object.defineProperty(dest, name, descriptor) 57 | }) 58 | 59 | return dest 60 | } 61 | -------------------------------------------------------------------------------- /node_modules/methods/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.1.2 / 2016-01-17 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.1.1 / 2014-12-30 7 | ================== 8 | 9 | * Improve `browserify` support 10 | 11 | 1.1.0 / 2014-07-05 12 | ================== 13 | 14 | * Add `CONNECT` method 15 | 16 | 1.0.1 / 2014-06-02 17 | ================== 18 | 19 | * Fix module to work with harmony transform 20 | 21 | 1.0.0 / 2014-05-08 22 | ================== 23 | 24 | * Add `PURGE` method 25 | 26 | 0.1.0 / 2013-10-28 27 | ================== 28 | 29 | * Add `http.METHODS` support 30 | -------------------------------------------------------------------------------- /node_modules/methods/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013-2014 TJ Holowaychuk 4 | Copyright (c) 2015-2016 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | -------------------------------------------------------------------------------- /node_modules/methods/README.md: -------------------------------------------------------------------------------- 1 | # Methods 2 | 3 | [![NPM Version][npm-image]][npm-url] 4 | [![NPM Downloads][downloads-image]][downloads-url] 5 | [![Node.js Version][node-version-image]][node-version-url] 6 | [![Build Status][travis-image]][travis-url] 7 | [![Test Coverage][coveralls-image]][coveralls-url] 8 | 9 | HTTP verbs that Node.js core's HTTP parser supports. 10 | 11 | This module provides an export that is just like `http.METHODS` from Node.js core, 12 | with the following differences: 13 | 14 | * All method names are lower-cased. 15 | * Contains a fallback list of methods for Node.js versions that do not have a 16 | `http.METHODS` export (0.10 and lower). 17 | * Provides the fallback list when using tools like `browserify` without pulling 18 | in the `http` shim module. 19 | 20 | ## Install 21 | 22 | ```bash 23 | $ npm install methods 24 | ``` 25 | 26 | ## API 27 | 28 | ```js 29 | var methods = require('methods') 30 | ``` 31 | 32 | ### methods 33 | 34 | This is an array of lower-cased method names that Node.js supports. If Node.js 35 | provides the `http.METHODS` export, then this is the same array lower-cased, 36 | otherwise it is a snapshot of the verbs from Node.js 0.10. 37 | 38 | ## License 39 | 40 | [MIT](LICENSE) 41 | 42 | [npm-image]: https://img.shields.io/npm/v/methods.svg?style=flat 43 | [npm-url]: https://npmjs.org/package/methods 44 | [node-version-image]: https://img.shields.io/node/v/methods.svg?style=flat 45 | [node-version-url]: https://nodejs.org/en/download/ 46 | [travis-image]: https://img.shields.io/travis/jshttp/methods.svg?style=flat 47 | [travis-url]: https://travis-ci.org/jshttp/methods 48 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/methods.svg?style=flat 49 | [coveralls-url]: https://coveralls.io/r/jshttp/methods?branch=master 50 | [downloads-image]: https://img.shields.io/npm/dm/methods.svg?style=flat 51 | [downloads-url]: https://npmjs.org/package/methods 52 | -------------------------------------------------------------------------------- /node_modules/methods/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * methods 3 | * Copyright(c) 2013-2014 TJ Holowaychuk 4 | * Copyright(c) 2015-2016 Douglas Christopher Wilson 5 | * MIT Licensed 6 | */ 7 | 8 | 'use strict'; 9 | 10 | /** 11 | * Module dependencies. 12 | * @private 13 | */ 14 | 15 | var http = require('http'); 16 | 17 | /** 18 | * Module exports. 19 | * @public 20 | */ 21 | 22 | module.exports = getCurrentNodeMethods() || getBasicNodeMethods(); 23 | 24 | /** 25 | * Get the current Node.js methods. 26 | * @private 27 | */ 28 | 29 | function getCurrentNodeMethods() { 30 | return http.METHODS && http.METHODS.map(function lowerCaseMethod(method) { 31 | return method.toLowerCase(); 32 | }); 33 | } 34 | 35 | /** 36 | * Get the "basic" Node.js methods, a snapshot from Node.js 0.10. 37 | * @private 38 | */ 39 | 40 | function getBasicNodeMethods() { 41 | return [ 42 | 'get', 43 | 'post', 44 | 'put', 45 | 'head', 46 | 'delete', 47 | 'options', 48 | 'trace', 49 | 'copy', 50 | 'lock', 51 | 'mkcol', 52 | 'move', 53 | 'purge', 54 | 'propfind', 55 | 'proppatch', 56 | 'unlock', 57 | 'report', 58 | 'mkactivity', 59 | 'checkout', 60 | 'merge', 61 | 'm-search', 62 | 'notify', 63 | 'subscribe', 64 | 'unsubscribe', 65 | 'patch', 66 | 'search', 67 | 'connect' 68 | ]; 69 | } 70 | -------------------------------------------------------------------------------- /node_modules/mime-db/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/mime-db/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * mime-db 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | */ 10 | 11 | module.exports = require('./db.json') 12 | -------------------------------------------------------------------------------- /node_modules/mime-types/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jonathan Ong 4 | Copyright (c) 2015 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/mime/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2010 Benjamin Thomas, Robert Kieffer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/mime/README.md: -------------------------------------------------------------------------------- 1 | # mime 2 | 3 | Comprehensive MIME type mapping API based on mime-db module. 4 | 5 | ## Install 6 | 7 | Install with [npm](http://github.com/isaacs/npm): 8 | 9 | npm install mime 10 | 11 | ## Contributing / Testing 12 | 13 | npm run test 14 | 15 | ## Command Line 16 | 17 | mime [path_string] 18 | 19 | E.g. 20 | 21 | > mime scripts/jquery.js 22 | application/javascript 23 | 24 | ## API - Queries 25 | 26 | ### mime.lookup(path) 27 | Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. 28 | 29 | ```js 30 | var mime = require('mime'); 31 | 32 | mime.lookup('/path/to/file.txt'); // => 'text/plain' 33 | mime.lookup('file.txt'); // => 'text/plain' 34 | mime.lookup('.TXT'); // => 'text/plain' 35 | mime.lookup('htm'); // => 'text/html' 36 | ``` 37 | 38 | ### mime.default_type 39 | Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) 40 | 41 | ### mime.extension(type) 42 | Get the default extension for `type` 43 | 44 | ```js 45 | mime.extension('text/html'); // => 'html' 46 | mime.extension('application/octet-stream'); // => 'bin' 47 | ``` 48 | 49 | ### mime.charsets.lookup() 50 | 51 | Map mime-type to charset 52 | 53 | ```js 54 | mime.charsets.lookup('text/plain'); // => 'UTF-8' 55 | ``` 56 | 57 | (The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) 58 | 59 | ## API - Defining Custom Types 60 | 61 | Custom type mappings can be added on a per-project basis via the following APIs. 62 | 63 | ### mime.define() 64 | 65 | Add custom mime/extension mappings 66 | 67 | ```js 68 | mime.define({ 69 | 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], 70 | 'application/x-my-type': ['x-mt', 'x-mtt'], 71 | // etc ... 72 | }); 73 | 74 | mime.lookup('x-sft'); // => 'text/x-some-format' 75 | ``` 76 | 77 | The first entry in the extensions array is returned by `mime.extension()`. E.g. 78 | 79 | ```js 80 | mime.extension('text/x-some-format'); // => 'x-sf' 81 | ``` 82 | 83 | ### mime.load(filepath) 84 | 85 | Load mappings from an Apache ".types" format file 86 | 87 | ```js 88 | mime.load('./my_project.types'); 89 | ``` 90 | The .types file format is simple - See the `types` dir for examples. 91 | -------------------------------------------------------------------------------- /node_modules/mime/build/build.js: -------------------------------------------------------------------------------- 1 | var db = require('mime-db'); 2 | 3 | var mapByType = {}; 4 | Object.keys(db).forEach(function(key) { 5 | var extensions = db[key].extensions; 6 | if (extensions) { 7 | mapByType[key] = extensions; 8 | } 9 | }); 10 | 11 | console.log(JSON.stringify(mapByType)); 12 | -------------------------------------------------------------------------------- /node_modules/mime/build/test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Usage: node test.js 3 | */ 4 | 5 | var mime = require('../mime'); 6 | var assert = require('assert'); 7 | var path = require('path'); 8 | 9 | // 10 | // Test mime lookups 11 | // 12 | 13 | assert.equal('text/plain', mime.lookup('text.txt')); // normal file 14 | assert.equal('text/plain', mime.lookup('TEXT.TXT')); // uppercase 15 | assert.equal('text/plain', mime.lookup('dir/text.txt')); // dir + file 16 | assert.equal('text/plain', mime.lookup('.text.txt')); // hidden file 17 | assert.equal('text/plain', mime.lookup('.txt')); // nameless 18 | assert.equal('text/plain', mime.lookup('txt')); // extension-only 19 | assert.equal('text/plain', mime.lookup('/txt')); // extension-less () 20 | assert.equal('text/plain', mime.lookup('\\txt')); // Windows, extension-less 21 | assert.equal('application/octet-stream', mime.lookup('text.nope')); // unrecognized 22 | assert.equal('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default 23 | 24 | // 25 | // Test extensions 26 | // 27 | 28 | assert.equal('txt', mime.extension(mime.types.text)); 29 | assert.equal('html', mime.extension(mime.types.htm)); 30 | assert.equal('bin', mime.extension('application/octet-stream')); 31 | assert.equal('bin', mime.extension('application/octet-stream ')); 32 | assert.equal('html', mime.extension(' text/html; charset=UTF-8')); 33 | assert.equal('html', mime.extension('text/html; charset=UTF-8 ')); 34 | assert.equal('html', mime.extension('text/html; charset=UTF-8')); 35 | assert.equal('html', mime.extension('text/html ; charset=UTF-8')); 36 | assert.equal('html', mime.extension('text/html;charset=UTF-8')); 37 | assert.equal('html', mime.extension('text/Html;charset=UTF-8')); 38 | assert.equal(undefined, mime.extension('unrecognized')); 39 | 40 | // 41 | // Test node.types lookups 42 | // 43 | 44 | assert.equal('application/font-woff', mime.lookup('file.woff')); 45 | assert.equal('application/octet-stream', mime.lookup('file.buffer')); 46 | // TODO: Uncomment once #157 is resolved 47 | // assert.equal('audio/mp4', mime.lookup('file.m4a')); 48 | assert.equal('font/otf', mime.lookup('file.otf')); 49 | 50 | // 51 | // Test charsets 52 | // 53 | 54 | assert.equal('UTF-8', mime.charsets.lookup('text/plain')); 55 | assert.equal('UTF-8', mime.charsets.lookup(mime.types.js)); 56 | assert.equal('UTF-8', mime.charsets.lookup(mime.types.json)); 57 | assert.equal(undefined, mime.charsets.lookup(mime.types.bin)); 58 | assert.equal('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); 59 | 60 | console.log('\nAll tests passed'); 61 | -------------------------------------------------------------------------------- /node_modules/mime/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var mime = require('./mime.js'); 4 | var file = process.argv[2]; 5 | var type = mime.lookup(file); 6 | 7 | process.stdout.write(type + '\n'); 8 | 9 | -------------------------------------------------------------------------------- /node_modules/morgan/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jonathan Ong 4 | Copyright (c) 2014-2017 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/ms/license.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zeit, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/ms/readme.md: -------------------------------------------------------------------------------- 1 | # ms 2 | 3 | [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) 4 | [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) 5 | 6 | Use this package to easily convert various time formats to milliseconds. 7 | 8 | ## Examples 9 | 10 | ```js 11 | ms('2 days') // 172800000 12 | ms('1d') // 86400000 13 | ms('10h') // 36000000 14 | ms('2.5 hrs') // 9000000 15 | ms('2h') // 7200000 16 | ms('1m') // 60000 17 | ms('5s') // 5000 18 | ms('1y') // 31557600000 19 | ms('100') // 100 20 | ``` 21 | 22 | ### Convert from milliseconds 23 | 24 | ```js 25 | ms(60000) // "1m" 26 | ms(2 * 60000) // "2m" 27 | ms(ms('10 hours')) // "10h" 28 | ``` 29 | 30 | ### Time format written-out 31 | 32 | ```js 33 | ms(60000, { long: true }) // "1 minute" 34 | ms(2 * 60000, { long: true }) // "2 minutes" 35 | ms(ms('10 hours'), { long: true }) // "10 hours" 36 | ``` 37 | 38 | ## Features 39 | 40 | - Works both in [node](https://nodejs.org) and in the browser. 41 | - If a number is supplied to `ms`, a string with a unit is returned. 42 | - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). 43 | - If you pass a string with a number and a valid unit, the number of equivalent ms is returned. 44 | 45 | ## Caught a bug? 46 | 47 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device 48 | 2. Link the package to the global module directory: `npm link` 49 | 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! 50 | 51 | As always, you can run the tests using: `npm test` 52 | -------------------------------------------------------------------------------- /node_modules/negotiator/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.6.1 / 2016-05-02 2 | ================== 3 | 4 | * perf: improve `Accept` parsing speed 5 | * perf: improve `Accept-Charset` parsing speed 6 | * perf: improve `Accept-Encoding` parsing speed 7 | * perf: improve `Accept-Language` parsing speed 8 | 9 | 0.6.0 / 2015-09-29 10 | ================== 11 | 12 | * Fix including type extensions in parameters in `Accept` parsing 13 | * Fix parsing `Accept` parameters with quoted equals 14 | * Fix parsing `Accept` parameters with quoted semicolons 15 | * Lazy-load modules from main entry point 16 | * perf: delay type concatenation until needed 17 | * perf: enable strict mode 18 | * perf: hoist regular expressions 19 | * perf: remove closures getting spec properties 20 | * perf: remove a closure from media type parsing 21 | * perf: remove property delete from media type parsing 22 | 23 | 0.5.3 / 2015-05-10 24 | ================== 25 | 26 | * Fix media type parameter matching to be case-insensitive 27 | 28 | 0.5.2 / 2015-05-06 29 | ================== 30 | 31 | * Fix comparing media types with quoted values 32 | * Fix splitting media types with quoted commas 33 | 34 | 0.5.1 / 2015-02-14 35 | ================== 36 | 37 | * Fix preference sorting to be stable for long acceptable lists 38 | 39 | 0.5.0 / 2014-12-18 40 | ================== 41 | 42 | * Fix list return order when large accepted list 43 | * Fix missing identity encoding when q=0 exists 44 | * Remove dynamic building of Negotiator class 45 | 46 | 0.4.9 / 2014-10-14 47 | ================== 48 | 49 | * Fix error when media type has invalid parameter 50 | 51 | 0.4.8 / 2014-09-28 52 | ================== 53 | 54 | * Fix all negotiations to be case-insensitive 55 | * Stable sort preferences of same quality according to client order 56 | * Support Node.js 0.6 57 | 58 | 0.4.7 / 2014-06-24 59 | ================== 60 | 61 | * Handle invalid provided languages 62 | * Handle invalid provided media types 63 | 64 | 0.4.6 / 2014-06-11 65 | ================== 66 | 67 | * Order by specificity when quality is the same 68 | 69 | 0.4.5 / 2014-05-29 70 | ================== 71 | 72 | * Fix regression in empty header handling 73 | 74 | 0.4.4 / 2014-05-29 75 | ================== 76 | 77 | * Fix behaviors when headers are not present 78 | 79 | 0.4.3 / 2014-04-16 80 | ================== 81 | 82 | * Handle slashes on media params correctly 83 | 84 | 0.4.2 / 2014-02-28 85 | ================== 86 | 87 | * Fix media type sorting 88 | * Handle media types params strictly 89 | 90 | 0.4.1 / 2014-01-16 91 | ================== 92 | 93 | * Use most specific matches 94 | 95 | 0.4.0 / 2014-01-09 96 | ================== 97 | 98 | * Remove preferred prefix from methods 99 | -------------------------------------------------------------------------------- /node_modules/negotiator/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012-2014 Federico Romero 4 | Copyright (c) 2012-2014 Isaac Z. Schlueter 5 | Copyright (c) 2014-2015 Douglas Christopher Wilson 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /node_modules/on-finished/HISTORY.md: -------------------------------------------------------------------------------- 1 | 2.3.0 / 2015-05-26 2 | ================== 3 | 4 | * Add defined behavior for HTTP `CONNECT` requests 5 | * Add defined behavior for HTTP `Upgrade` requests 6 | * deps: ee-first@1.1.1 7 | 8 | 2.2.1 / 2015-04-22 9 | ================== 10 | 11 | * Fix `isFinished(req)` when data buffered 12 | 13 | 2.2.0 / 2014-12-22 14 | ================== 15 | 16 | * Add message object to callback arguments 17 | 18 | 2.1.1 / 2014-10-22 19 | ================== 20 | 21 | * Fix handling of pipelined requests 22 | 23 | 2.1.0 / 2014-08-16 24 | ================== 25 | 26 | * Check if `socket` is detached 27 | * Return `undefined` for `isFinished` if state unknown 28 | 29 | 2.0.0 / 2014-08-16 30 | ================== 31 | 32 | * Add `isFinished` function 33 | * Move to `jshttp` organization 34 | * Remove support for plain socket argument 35 | * Rename to `on-finished` 36 | * Support both `req` and `res` as arguments 37 | * deps: ee-first@1.0.5 38 | 39 | 1.2.2 / 2014-06-10 40 | ================== 41 | 42 | * Reduce listeners added to emitters 43 | - avoids "event emitter leak" warnings when used multiple times on same request 44 | 45 | 1.2.1 / 2014-06-08 46 | ================== 47 | 48 | * Fix returned value when already finished 49 | 50 | 1.2.0 / 2014-06-05 51 | ================== 52 | 53 | * Call callback when called on already-finished socket 54 | 55 | 1.1.4 / 2014-05-27 56 | ================== 57 | 58 | * Support node.js 0.8 59 | 60 | 1.1.3 / 2014-04-30 61 | ================== 62 | 63 | * Make sure errors passed as instanceof `Error` 64 | 65 | 1.1.2 / 2014-04-18 66 | ================== 67 | 68 | * Default the `socket` to passed-in object 69 | 70 | 1.1.1 / 2014-01-16 71 | ================== 72 | 73 | * Rename module to `finished` 74 | 75 | 1.1.0 / 2013-12-25 76 | ================== 77 | 78 | * Call callback when called on already-errored socket 79 | 80 | 1.0.1 / 2013-12-20 81 | ================== 82 | 83 | * Actually pass the error to the callback 84 | 85 | 1.0.0 / 2013-12-20 86 | ================== 87 | 88 | * Initial release 89 | -------------------------------------------------------------------------------- /node_modules/on-finished/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013 Jonathan Ong 4 | Copyright (c) 2014 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/on-headers/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.1 / 2015-09-29 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.0.0 / 2014-08-10 7 | ================== 8 | 9 | * Honor `res.statusCode` change in `listener` 10 | * Move to `jshttp` orgainzation 11 | * Prevent `arguments`-related de-opt 12 | 13 | 0.0.0 / 2014-05-13 14 | ================== 15 | 16 | * Initial implementation 17 | -------------------------------------------------------------------------------- /node_modules/on-headers/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/on-headers/README.md: -------------------------------------------------------------------------------- 1 | # on-headers 2 | 3 | [![NPM Version][npm-image]][npm-url] 4 | [![NPM Downloads][downloads-image]][downloads-url] 5 | [![Node.js Version][node-version-image]][node-version-url] 6 | [![Build Status][travis-image]][travis-url] 7 | [![Test Coverage][coveralls-image]][coveralls-url] 8 | 9 | Execute a listener when a response is about to write headers. 10 | 11 | ## Installation 12 | 13 | ```sh 14 | $ npm install on-headers 15 | ``` 16 | 17 | ## API 18 | 19 | ```js 20 | var onHeaders = require('on-headers') 21 | ``` 22 | 23 | ### onHeaders(res, listener) 24 | 25 | This will add the listener `listener` to fire when headers are emitted for `res`. 26 | The listener is passed the `response` object as it's context (`this`). Headers are 27 | considered to be emitted only once, right before they are sent to the client. 28 | 29 | When this is called multiple times on the same `res`, the `listener`s are fired 30 | in the reverse order they were added. 31 | 32 | ## Examples 33 | 34 | ```js 35 | var http = require('http') 36 | var onHeaders = require('on-headers') 37 | 38 | http 39 | .createServer(onRequest) 40 | .listen(3000) 41 | 42 | function addPoweredBy() { 43 | // set if not set by end of request 44 | if (!this.getHeader('X-Powered-By')) { 45 | this.setHeader('X-Powered-By', 'Node.js') 46 | } 47 | } 48 | 49 | function onRequest(req, res) { 50 | onHeaders(res, addPoweredBy) 51 | 52 | res.setHeader('Content-Type', 'text/plain') 53 | res.end('hello!') 54 | } 55 | ``` 56 | 57 | ## Testing 58 | 59 | ```sh 60 | $ npm test 61 | ``` 62 | 63 | ## License 64 | 65 | [MIT](LICENSE) 66 | 67 | [npm-image]: https://img.shields.io/npm/v/on-headers.svg 68 | [npm-url]: https://npmjs.org/package/on-headers 69 | [node-version-image]: https://img.shields.io/node/v/on-headers.svg 70 | [node-version-url]: http://nodejs.org/download/ 71 | [travis-image]: https://img.shields.io/travis/jshttp/on-headers/master.svg 72 | [travis-url]: https://travis-ci.org/jshttp/on-headers 73 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/on-headers/master.svg 74 | [coveralls-url]: https://coveralls.io/r/jshttp/on-headers?branch=master 75 | [downloads-image]: https://img.shields.io/npm/dm/on-headers.svg 76 | [downloads-url]: https://npmjs.org/package/on-headers 77 | -------------------------------------------------------------------------------- /node_modules/on-headers/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * on-headers 3 | * Copyright(c) 2014 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Reference to Array slice. 11 | */ 12 | 13 | var slice = Array.prototype.slice 14 | 15 | /** 16 | * Execute a listener when a response is about to write headers. 17 | * 18 | * @param {Object} res 19 | * @return {Function} listener 20 | * @api public 21 | */ 22 | 23 | module.exports = function onHeaders(res, listener) { 24 | if (!res) { 25 | throw new TypeError('argument res is required') 26 | } 27 | 28 | if (typeof listener !== 'function') { 29 | throw new TypeError('argument listener must be a function') 30 | } 31 | 32 | res.writeHead = createWriteHead(res.writeHead, listener) 33 | } 34 | 35 | function createWriteHead(prevWriteHead, listener) { 36 | var fired = false; 37 | 38 | // return function with core name and argument list 39 | return function writeHead(statusCode) { 40 | // set headers from arguments 41 | var args = setWriteHeadHeaders.apply(this, arguments); 42 | 43 | // fire listener 44 | if (!fired) { 45 | fired = true 46 | listener.call(this) 47 | 48 | // pass-along an updated status code 49 | if (typeof args[0] === 'number' && this.statusCode !== args[0]) { 50 | args[0] = this.statusCode 51 | args.length = 1 52 | } 53 | } 54 | 55 | prevWriteHead.apply(this, args); 56 | } 57 | } 58 | 59 | function setWriteHeadHeaders(statusCode) { 60 | var length = arguments.length 61 | var headerIndex = length > 1 && typeof arguments[1] === 'string' 62 | ? 2 63 | : 1 64 | 65 | var headers = length >= headerIndex + 1 66 | ? arguments[headerIndex] 67 | : undefined 68 | 69 | this.statusCode = statusCode 70 | 71 | // the following block is from node.js core 72 | if (Array.isArray(headers)) { 73 | // handle array case 74 | for (var i = 0, len = headers.length; i < len; ++i) { 75 | this.setHeader(headers[i][0], headers[i][1]) 76 | } 77 | } else if (headers) { 78 | // handle object case 79 | var keys = Object.keys(headers) 80 | for (var i = 0; i < keys.length; i++) { 81 | var k = keys[i] 82 | if (k) this.setHeader(k, headers[k]) 83 | } 84 | } 85 | 86 | // copy leading arguments 87 | var args = new Array(Math.min(length, headerIndex)) 88 | for (var i = 0; i < args.length; i++) { 89 | args[i] = arguments[i] 90 | } 91 | 92 | return args 93 | } 94 | -------------------------------------------------------------------------------- /node_modules/parseurl/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.3.2 / 2017-09-09 2 | ================== 3 | 4 | * perf: reduce overhead for full URLs 5 | * perf: unroll the "fast-path" `RegExp` 6 | 7 | 1.3.1 / 2016-01-17 8 | ================== 9 | 10 | * perf: enable strict mode 11 | 12 | 1.3.0 / 2014-08-09 13 | ================== 14 | 15 | * Add `parseurl.original` for parsing `req.originalUrl` with fallback 16 | * Return `undefined` if `req.url` is `undefined` 17 | 18 | 1.2.0 / 2014-07-21 19 | ================== 20 | 21 | * Cache URLs based on original value 22 | * Remove no-longer-needed URL mis-parse work-around 23 | * Simplify the "fast-path" `RegExp` 24 | 25 | 1.1.3 / 2014-07-08 26 | ================== 27 | 28 | * Fix typo 29 | 30 | 1.1.2 / 2014-07-08 31 | ================== 32 | 33 | * Seriously fix Node.js 0.8 compatibility 34 | 35 | 1.1.1 / 2014-07-08 36 | ================== 37 | 38 | * Fix Node.js 0.8 compatibility 39 | 40 | 1.1.0 / 2014-07-08 41 | ================== 42 | 43 | * Incorporate URL href-only parse fast-path 44 | 45 | 1.0.1 / 2014-03-08 46 | ================== 47 | 48 | * Add missing `require` 49 | 50 | 1.0.0 / 2014-03-08 51 | ================== 52 | 53 | * Genesis from `connect` 54 | -------------------------------------------------------------------------------- /node_modules/parseurl/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | (The MIT License) 3 | 4 | Copyright (c) 2014 Jonathan Ong 5 | Copyright (c) 2014-2017 Douglas Christopher Wilson 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /node_modules/path-to-regexp/History.md: -------------------------------------------------------------------------------- 1 | 0.1.7 / 2015-07-28 2 | ================== 3 | 4 | * Fixed regression with escaped round brackets and matching groups. 5 | 6 | 0.1.6 / 2015-06-19 7 | ================== 8 | 9 | * Replace `index` feature by outputting all parameters, unnamed and named. 10 | 11 | 0.1.5 / 2015-05-08 12 | ================== 13 | 14 | * Add an index property for position in match result. 15 | 16 | 0.1.4 / 2015-03-05 17 | ================== 18 | 19 | * Add license information 20 | 21 | 0.1.3 / 2014-07-06 22 | ================== 23 | 24 | * Better array support 25 | * Improved support for trailing slash in non-ending mode 26 | 27 | 0.1.0 / 2014-03-06 28 | ================== 29 | 30 | * add options.end 31 | 32 | 0.0.2 / 2013-02-10 33 | ================== 34 | 35 | * Update to match current express 36 | * add .license property to component.json 37 | -------------------------------------------------------------------------------- /node_modules/path-to-regexp/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/path-to-regexp/Readme.md: -------------------------------------------------------------------------------- 1 | # Path-to-RegExp 2 | 3 | Turn an Express-style path string such as `/user/:name` into a regular expression. 4 | 5 | **Note:** This is a legacy branch. You should upgrade to `1.x`. 6 | 7 | ## Usage 8 | 9 | ```javascript 10 | var pathToRegexp = require('path-to-regexp'); 11 | ``` 12 | 13 | ### pathToRegexp(path, keys, options) 14 | 15 | - **path** A string in the express format, an array of such strings, or a regular expression 16 | - **keys** An array to be populated with the keys present in the url. Once the function completes, this will be an array of strings. 17 | - **options** 18 | - **options.sensitive** Defaults to false, set this to true to make routes case sensitive 19 | - **options.strict** Defaults to false, set this to true to make the trailing slash matter. 20 | - **options.end** Defaults to true, set this to false to only match the prefix of the URL. 21 | 22 | ```javascript 23 | var keys = []; 24 | var exp = pathToRegexp('/foo/:bar', keys); 25 | //keys = ['bar'] 26 | //exp = /^\/foo\/(?:([^\/]+?))\/?$/i 27 | ``` 28 | 29 | ## Live Demo 30 | 31 | You can see a live demo of this library in use at [express-route-tester](http://forbeslindesay.github.com/express-route-tester/). 32 | 33 | ## License 34 | 35 | MIT 36 | -------------------------------------------------------------------------------- /node_modules/proxy-addr/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-2016 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/qs/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | max_line_length = 140 11 | 12 | [test/*] 13 | max_line_length = off 14 | 15 | [*.md] 16 | max_line_length = off 17 | 18 | [*.json] 19 | max_line_length = off 20 | 21 | [Makefile] 22 | max_line_length = off 23 | 24 | [CHANGELOG.md] 25 | indent_style = space 26 | indent_size = 2 27 | 28 | [LICENSE] 29 | indent_size = 2 30 | max_line_length = off 31 | -------------------------------------------------------------------------------- /node_modules/qs/.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /node_modules/qs/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "@ljharb", 5 | 6 | "rules": { 7 | "complexity": [2, 28], 8 | "consistent-return": 1, 9 | "func-name-matching": 0, 10 | "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], 11 | "indent": [2, 4], 12 | "max-params": [2, 12], 13 | "max-statements": [2, 45], 14 | "no-continue": 1, 15 | "no-magic-numbers": 0, 16 | "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], 17 | "operator-linebreak": [2, "before"], 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/qs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Nathan LaFreniere and other contributors. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * The names of any contributors may not be used to endorse or promote 12 | products derived from this software without specific prior written 13 | permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | 26 | * * * 27 | 28 | The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors 29 | -------------------------------------------------------------------------------- /node_modules/qs/lib/formats.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var replace = String.prototype.replace; 4 | var percentTwenties = /%20/g; 5 | 6 | module.exports = { 7 | 'default': 'RFC3986', 8 | formatters: { 9 | RFC1738: function (value) { 10 | return replace.call(value, percentTwenties, '+'); 11 | }, 12 | RFC3986: function (value) { 13 | return value; 14 | } 15 | }, 16 | RFC1738: 'RFC1738', 17 | RFC3986: 'RFC3986' 18 | }; 19 | -------------------------------------------------------------------------------- /node_modules/qs/lib/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var stringify = require('./stringify'); 4 | var parse = require('./parse'); 5 | var formats = require('./formats'); 6 | 7 | module.exports = { 8 | formats: formats, 9 | parse: parse, 10 | stringify: stringify 11 | }; 12 | -------------------------------------------------------------------------------- /node_modules/qs/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "array-bracket-newline": 0, 4 | "array-element-newline": 0, 5 | "consistent-return": 2, 6 | "max-lines": 0, 7 | "max-nested-callbacks": [2, 3], 8 | "max-statements": 0, 9 | "no-buffer-constructor": 0, 10 | "no-extend-native": 0, 11 | "no-magic-numbers": 0, 12 | "object-curly-newline": 0, 13 | "sort-keys": 0 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/qs/test/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('./parse'); 4 | 5 | require('./stringify'); 6 | 7 | require('./utils'); 8 | -------------------------------------------------------------------------------- /node_modules/qs/test/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var test = require('tape'); 4 | var utils = require('../lib/utils'); 5 | 6 | test('merge()', function (t) { 7 | t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); 8 | 9 | var oneMerged = utils.merge({ foo: 'bar' }, { foo: { first: '123' } }); 10 | t.deepEqual(oneMerged, { foo: ['bar', { first: '123' }] }, 'merges a standalone and an object into an array'); 11 | 12 | var twoMerged = utils.merge({ foo: ['bar', { first: '123' }] }, { foo: { second: '456' } }); 13 | t.deepEqual(twoMerged, { foo: { 0: 'bar', 1: { first: '123' }, second: '456' } }, 'merges a standalone and two objects into an array'); 14 | 15 | var sandwiched = utils.merge({ foo: ['bar', { first: '123', second: '456' }] }, { foo: 'baz' }); 16 | t.deepEqual(sandwiched, { foo: ['bar', { first: '123', second: '456' }, 'baz'] }, 'merges an object sandwiched by two standalones into an array'); 17 | 18 | var nestedArrays = utils.merge({ foo: ['baz'] }, { foo: ['bar', 'xyzzy'] }); 19 | t.deepEqual(nestedArrays, { foo: ['baz', 'bar', 'xyzzy'] }); 20 | 21 | t.end(); 22 | }); 23 | 24 | test('assign()', function (t) { 25 | var target = { a: 1, b: 2 }; 26 | var source = { b: 3, c: 4 }; 27 | var result = utils.assign(target, source); 28 | 29 | t.equal(result, target, 'returns the target'); 30 | t.deepEqual(target, { a: 1, b: 3, c: 4 }, 'target and source are merged'); 31 | t.deepEqual(source, { b: 3, c: 4 }, 'source is untouched'); 32 | 33 | t.end(); 34 | }); 35 | -------------------------------------------------------------------------------- /node_modules/range-parser/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.2.0 / 2016-06-01 2 | ================== 3 | 4 | * Add `combine` option to combine overlapping ranges 5 | 6 | 1.1.0 / 2016-05-13 7 | ================== 8 | 9 | * Fix incorrectly returning -1 when there is at least one valid range 10 | * perf: remove internal function 11 | 12 | 1.0.3 / 2015-10-29 13 | ================== 14 | 15 | * perf: enable strict mode 16 | 17 | 1.0.2 / 2014-09-08 18 | ================== 19 | 20 | * Support Node.js 0.6 21 | 22 | 1.0.1 / 2014-09-07 23 | ================== 24 | 25 | * Move repository to jshttp 26 | 27 | 1.0.0 / 2013-12-11 28 | ================== 29 | 30 | * Add repository to package.json 31 | * Add MIT license 32 | 33 | 0.0.4 / 2012-06-17 34 | ================== 35 | 36 | * Change ret -1 for unsatisfiable and -2 when invalid 37 | 38 | 0.0.3 / 2012-06-17 39 | ================== 40 | 41 | * Fix last-byte-pos default to len - 1 42 | 43 | 0.0.2 / 2012-06-14 44 | ================== 45 | 46 | * Add `.type` 47 | 48 | 0.0.1 / 2012-06-11 49 | ================== 50 | 51 | * Initial release 52 | -------------------------------------------------------------------------------- /node_modules/range-parser/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012-2014 TJ Holowaychuk 4 | Copyright (c) 2015-2016 Douglas Christopher Wilson [ 57 | // { start: 0, end: 10 }, 58 | // { start: 50, end: 60 } 59 | // ] 60 | ``` 61 | 62 | ## License 63 | 64 | [MIT](LICENSE) 65 | 66 | [npm-image]: https://img.shields.io/npm/v/range-parser.svg 67 | [npm-url]: https://npmjs.org/package/range-parser 68 | [node-version-image]: https://img.shields.io/node/v/range-parser.svg 69 | [node-version-url]: https://nodejs.org/endownload 70 | [travis-image]: https://img.shields.io/travis/jshttp/range-parser.svg 71 | [travis-url]: https://travis-ci.org/jshttp/range-parser 72 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/range-parser.svg 73 | [coveralls-url]: https://coveralls.io/r/jshttp/range-parser 74 | [downloads-image]: https://img.shields.io/npm/dm/range-parser.svg 75 | [downloads-url]: https://npmjs.org/package/range-parser 76 | -------------------------------------------------------------------------------- /node_modules/raw-body/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2014 Jonathan Ong 4 | Copyright (c) 2014-2015 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/raw-body/index.d.ts: -------------------------------------------------------------------------------- 1 | import { Readable } from 'stream'; 2 | 3 | declare namespace getRawBody { 4 | export type Encoding = string | true; 5 | 6 | export interface Options { 7 | /** 8 | * The expected length of the stream. 9 | */ 10 | length?: number | string | null; 11 | /** 12 | * The byte limit of the body. This is the number of bytes or any string 13 | * format supported by `bytes`, for example `1000`, `'500kb'` or `'3mb'`. 14 | */ 15 | limit?: number | string | null; 16 | /** 17 | * The encoding to use to decode the body into a string. By default, a 18 | * `Buffer` instance will be returned when no encoding is specified. Most 19 | * likely, you want `utf-8`, so setting encoding to `true` will decode as 20 | * `utf-8`. You can use any type of encoding supported by `iconv-lite`. 21 | */ 22 | encoding?: Encoding | null; 23 | } 24 | 25 | export interface RawBodyError extends Error { 26 | /** 27 | * The limit in bytes. 28 | */ 29 | limit?: number; 30 | /** 31 | * The expected length of the stream. 32 | */ 33 | length?: number; 34 | expected?: number; 35 | /** 36 | * The received bytes. 37 | */ 38 | received?: number; 39 | /** 40 | * The encoding. 41 | */ 42 | encoding?: string; 43 | /** 44 | * The corresponding status code for the error. 45 | */ 46 | status: number; 47 | statusCode: number; 48 | /** 49 | * The error type. 50 | */ 51 | type: string; 52 | } 53 | } 54 | 55 | /** 56 | * Gets the entire buffer of a stream either as a `Buffer` or a string. 57 | * Validates the stream's length against an expected length and maximum 58 | * limit. Ideal for parsing request bodies. 59 | */ 60 | declare function getRawBody( 61 | stream: Readable, 62 | callback: (err: getRawBody.RawBodyError, body: Buffer) => void 63 | ): void; 64 | 65 | declare function getRawBody( 66 | stream: Readable, 67 | options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding, 68 | callback: (err: getRawBody.RawBodyError, body: string) => void 69 | ): void; 70 | 71 | declare function getRawBody( 72 | stream: Readable, 73 | options: getRawBody.Options, 74 | callback: (err: getRawBody.RawBodyError, body: Buffer) => void 75 | ): void; 76 | 77 | declare function getRawBody( 78 | stream: Readable, 79 | options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding 80 | ): Promise; 81 | 82 | declare function getRawBody( 83 | stream: Readable, 84 | options?: getRawBody.Options 85 | ): Promise; 86 | 87 | export = getRawBody; 88 | -------------------------------------------------------------------------------- /node_modules/safe-buffer/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 'node' 4 | - '5' 5 | - '4' 6 | - '0.12' 7 | - '0.10' 8 | -------------------------------------------------------------------------------- /node_modules/safe-buffer/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Feross Aboukhadijeh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/safe-buffer/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable node/no-deprecated-api */ 2 | var buffer = require('buffer') 3 | var Buffer = buffer.Buffer 4 | 5 | // alternative to using Object.keys for old browsers 6 | function copyProps (src, dst) { 7 | for (var key in src) { 8 | dst[key] = src[key] 9 | } 10 | } 11 | if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { 12 | module.exports = buffer 13 | } else { 14 | // Copy properties from require('buffer') 15 | copyProps(buffer, exports) 16 | exports.Buffer = SafeBuffer 17 | } 18 | 19 | function SafeBuffer (arg, encodingOrOffset, length) { 20 | return Buffer(arg, encodingOrOffset, length) 21 | } 22 | 23 | // Copy static methods from Buffer 24 | copyProps(Buffer, SafeBuffer) 25 | 26 | SafeBuffer.from = function (arg, encodingOrOffset, length) { 27 | if (typeof arg === 'number') { 28 | throw new TypeError('Argument must not be a number') 29 | } 30 | return Buffer(arg, encodingOrOffset, length) 31 | } 32 | 33 | SafeBuffer.alloc = function (size, fill, encoding) { 34 | if (typeof size !== 'number') { 35 | throw new TypeError('Argument must be a number') 36 | } 37 | var buf = Buffer(size) 38 | if (fill !== undefined) { 39 | if (typeof encoding === 'string') { 40 | buf.fill(fill, encoding) 41 | } else { 42 | buf.fill(fill) 43 | } 44 | } else { 45 | buf.fill(0) 46 | } 47 | return buf 48 | } 49 | 50 | SafeBuffer.allocUnsafe = function (size) { 51 | if (typeof size !== 'number') { 52 | throw new TypeError('Argument must be a number') 53 | } 54 | return Buffer(size) 55 | } 56 | 57 | SafeBuffer.allocUnsafeSlow = function (size) { 58 | if (typeof size !== 'number') { 59 | throw new TypeError('Argument must be a number') 60 | } 61 | return buffer.SlowBuffer(size) 62 | } 63 | -------------------------------------------------------------------------------- /node_modules/send/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 TJ Holowaychuk 4 | Copyright (c) 2014-2016 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/serve-static/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2010 Sencha Inc. 4 | Copyright (c) 2011 LearnBoost 5 | Copyright (c) 2011 TJ Holowaychuk 6 | Copyright (c) 2014-2016 Douglas Christopher Wilson 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | 'Software'), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /node_modules/setprototypeof/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Wes Todd 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 10 | SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 12 | OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 13 | CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /node_modules/setprototypeof/README.md: -------------------------------------------------------------------------------- 1 | # Polyfill for `Object.setPrototypeOf` 2 | 3 | A simple cross platform implementation to set the prototype of an instianted object. Supports all modern browsers and at least back to IE8. 4 | 5 | ## Usage: 6 | 7 | ``` 8 | $ npm install --save setprototypeof 9 | ``` 10 | 11 | ```javascript 12 | var setPrototypeOf = require('setprototypeof'); 13 | 14 | var obj = {}; 15 | setPrototypeOf(obj, { 16 | foo: function() { 17 | return 'bar'; 18 | } 19 | }); 20 | obj.foo(); // bar 21 | ``` 22 | 23 | TypeScript is also supported: 24 | ```typescript 25 | import setPrototypeOf = require('setprototypeof'); 26 | ``` -------------------------------------------------------------------------------- /node_modules/setprototypeof/index.d.ts: -------------------------------------------------------------------------------- 1 | declare function setPrototypeOf(o: any, proto: object | null): any; 2 | export = setPrototypeOf; 3 | -------------------------------------------------------------------------------- /node_modules/setprototypeof/index.js: -------------------------------------------------------------------------------- 1 | module.exports = Object.setPrototypeOf || ({__proto__:[]} instanceof Array ? setProtoOf : mixinProperties); 2 | 3 | function setProtoOf(obj, proto) { 4 | obj.__proto__ = proto; 5 | return obj; 6 | } 7 | 8 | function mixinProperties(obj, proto) { 9 | for (var prop in proto) { 10 | if (!obj.hasOwnProperty(prop)) { 11 | obj[prop] = proto[prop]; 12 | } 13 | } 14 | return obj; 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/statuses/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.4.0 / 2017-10-20 2 | ================== 3 | 4 | * Add `STATUS_CODES` export 5 | 6 | 1.3.1 / 2016-11-11 7 | ================== 8 | 9 | * Fix return type in JSDoc 10 | 11 | 1.3.0 / 2016-05-17 12 | ================== 13 | 14 | * Add `421 Misdirected Request` 15 | * perf: enable strict mode 16 | 17 | 1.2.1 / 2015-02-01 18 | ================== 19 | 20 | * Fix message for status 451 21 | - `451 Unavailable For Legal Reasons` 22 | 23 | 1.2.0 / 2014-09-28 24 | ================== 25 | 26 | * Add `208 Already Repored` 27 | * Add `226 IM Used` 28 | * Add `306 (Unused)` 29 | * Add `415 Unable For Legal Reasons` 30 | * Add `508 Loop Detected` 31 | 32 | 1.1.1 / 2014-09-24 33 | ================== 34 | 35 | * Add missing 308 to `codes.json` 36 | 37 | 1.1.0 / 2014-09-21 38 | ================== 39 | 40 | * Add `codes.json` for universal support 41 | 42 | 1.0.4 / 2014-08-20 43 | ================== 44 | 45 | * Package cleanup 46 | 47 | 1.0.3 / 2014-06-08 48 | ================== 49 | 50 | * Add 308 to `.redirect` category 51 | 52 | 1.0.2 / 2014-03-13 53 | ================== 54 | 55 | * Add `.retry` category 56 | 57 | 1.0.1 / 2014-03-12 58 | ================== 59 | 60 | * Initial release 61 | -------------------------------------------------------------------------------- /node_modules/statuses/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong 5 | Copyright (c) 2016 Douglas Christopher Wilson 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/statuses/codes.json: -------------------------------------------------------------------------------- 1 | { 2 | "100": "Continue", 3 | "101": "Switching Protocols", 4 | "102": "Processing", 5 | "200": "OK", 6 | "201": "Created", 7 | "202": "Accepted", 8 | "203": "Non-Authoritative Information", 9 | "204": "No Content", 10 | "205": "Reset Content", 11 | "206": "Partial Content", 12 | "207": "Multi-Status", 13 | "208": "Already Reported", 14 | "226": "IM Used", 15 | "300": "Multiple Choices", 16 | "301": "Moved Permanently", 17 | "302": "Found", 18 | "303": "See Other", 19 | "304": "Not Modified", 20 | "305": "Use Proxy", 21 | "306": "(Unused)", 22 | "307": "Temporary Redirect", 23 | "308": "Permanent Redirect", 24 | "400": "Bad Request", 25 | "401": "Unauthorized", 26 | "402": "Payment Required", 27 | "403": "Forbidden", 28 | "404": "Not Found", 29 | "405": "Method Not Allowed", 30 | "406": "Not Acceptable", 31 | "407": "Proxy Authentication Required", 32 | "408": "Request Timeout", 33 | "409": "Conflict", 34 | "410": "Gone", 35 | "411": "Length Required", 36 | "412": "Precondition Failed", 37 | "413": "Payload Too Large", 38 | "414": "URI Too Long", 39 | "415": "Unsupported Media Type", 40 | "416": "Range Not Satisfiable", 41 | "417": "Expectation Failed", 42 | "418": "I'm a teapot", 43 | "421": "Misdirected Request", 44 | "422": "Unprocessable Entity", 45 | "423": "Locked", 46 | "424": "Failed Dependency", 47 | "425": "Unordered Collection", 48 | "426": "Upgrade Required", 49 | "428": "Precondition Required", 50 | "429": "Too Many Requests", 51 | "431": "Request Header Fields Too Large", 52 | "451": "Unavailable For Legal Reasons", 53 | "500": "Internal Server Error", 54 | "501": "Not Implemented", 55 | "502": "Bad Gateway", 56 | "503": "Service Unavailable", 57 | "504": "Gateway Timeout", 58 | "505": "HTTP Version Not Supported", 59 | "506": "Variant Also Negotiates", 60 | "507": "Insufficient Storage", 61 | "508": "Loop Detected", 62 | "509": "Bandwidth Limit Exceeded", 63 | "510": "Not Extended", 64 | "511": "Network Authentication Required" 65 | } 66 | -------------------------------------------------------------------------------- /node_modules/statuses/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * statuses 3 | * Copyright(c) 2014 Jonathan Ong 4 | * Copyright(c) 2016 Douglas Christopher Wilson 5 | * MIT Licensed 6 | */ 7 | 8 | 'use strict' 9 | 10 | /** 11 | * Module dependencies. 12 | * @private 13 | */ 14 | 15 | var codes = require('./codes.json') 16 | 17 | /** 18 | * Module exports. 19 | * @public 20 | */ 21 | 22 | module.exports = status 23 | 24 | // status code to message map 25 | status.STATUS_CODES = codes 26 | 27 | // array of status codes 28 | status.codes = populateStatusesMap(status, codes) 29 | 30 | // status codes for redirects 31 | status.redirect = { 32 | 300: true, 33 | 301: true, 34 | 302: true, 35 | 303: true, 36 | 305: true, 37 | 307: true, 38 | 308: true 39 | } 40 | 41 | // status codes for empty bodies 42 | status.empty = { 43 | 204: true, 44 | 205: true, 45 | 304: true 46 | } 47 | 48 | // status codes for when you should retry the request 49 | status.retry = { 50 | 502: true, 51 | 503: true, 52 | 504: true 53 | } 54 | 55 | /** 56 | * Populate the statuses map for given codes. 57 | * @private 58 | */ 59 | 60 | function populateStatusesMap (statuses, codes) { 61 | var arr = [] 62 | 63 | Object.keys(codes).forEach(function forEachCode (code) { 64 | var message = codes[code] 65 | var status = Number(code) 66 | 67 | // Populate properties 68 | statuses[status] = message 69 | statuses[message] = status 70 | statuses[message.toLowerCase()] = status 71 | 72 | // Add to array 73 | arr.push(status) 74 | }) 75 | 76 | return arr 77 | } 78 | 79 | /** 80 | * Get the status code. 81 | * 82 | * Given a number, this will throw if it is not a known status 83 | * code, otherwise the code will be returned. Given a string, 84 | * the string will be parsed for a number and return the code 85 | * if valid, otherwise will lookup the code assuming this is 86 | * the status message. 87 | * 88 | * @param {string|number} code 89 | * @returns {number} 90 | * @public 91 | */ 92 | 93 | function status (code) { 94 | if (typeof code === 'number') { 95 | if (!status[code]) throw new Error('invalid status code: ' + code) 96 | return code 97 | } 98 | 99 | if (typeof code !== 'string') { 100 | throw new TypeError('code must be a number or string') 101 | } 102 | 103 | // '403' 104 | var n = parseInt(code, 10) 105 | if (!isNaN(n)) { 106 | if (!status[n]) throw new Error('invalid status code: ' + n) 107 | return n 108 | } 109 | 110 | n = status[code.toLowerCase()] 111 | if (!n) throw new Error('invalid status message: "' + code + '"') 112 | return n 113 | } 114 | -------------------------------------------------------------------------------- /node_modules/type-is/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jonathan Ong 4 | Copyright (c) 2014-2015 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/unpipe/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.0 / 2015-06-14 2 | ================== 3 | 4 | * Initial release 5 | -------------------------------------------------------------------------------- /node_modules/unpipe/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2015 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/unpipe/README.md: -------------------------------------------------------------------------------- 1 | # unpipe 2 | 3 | [![NPM Version][npm-image]][npm-url] 4 | [![NPM Downloads][downloads-image]][downloads-url] 5 | [![Node.js Version][node-image]][node-url] 6 | [![Build Status][travis-image]][travis-url] 7 | [![Test Coverage][coveralls-image]][coveralls-url] 8 | 9 | Unpipe a stream from all destinations. 10 | 11 | ## Installation 12 | 13 | ```sh 14 | $ npm install unpipe 15 | ``` 16 | 17 | ## API 18 | 19 | ```js 20 | var unpipe = require('unpipe') 21 | ``` 22 | 23 | ### unpipe(stream) 24 | 25 | Unpipes all destinations from a given stream. With stream 2+, this is 26 | equivalent to `stream.unpipe()`. When used with streams 1 style streams 27 | (typically Node.js 0.8 and below), this module attempts to undo the 28 | actions done in `stream.pipe(dest)`. 29 | 30 | ## License 31 | 32 | [MIT](LICENSE) 33 | 34 | [npm-image]: https://img.shields.io/npm/v/unpipe.svg 35 | [npm-url]: https://npmjs.org/package/unpipe 36 | [node-image]: https://img.shields.io/node/v/unpipe.svg 37 | [node-url]: http://nodejs.org/download/ 38 | [travis-image]: https://img.shields.io/travis/stream-utils/unpipe.svg 39 | [travis-url]: https://travis-ci.org/stream-utils/unpipe 40 | [coveralls-image]: https://img.shields.io/coveralls/stream-utils/unpipe.svg 41 | [coveralls-url]: https://coveralls.io/r/stream-utils/unpipe?branch=master 42 | [downloads-image]: https://img.shields.io/npm/dm/unpipe.svg 43 | [downloads-url]: https://npmjs.org/package/unpipe 44 | -------------------------------------------------------------------------------- /node_modules/unpipe/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * unpipe 3 | * Copyright(c) 2015 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = unpipe 15 | 16 | /** 17 | * Determine if there are Node.js pipe-like data listeners. 18 | * @private 19 | */ 20 | 21 | function hasPipeDataListeners(stream) { 22 | var listeners = stream.listeners('data') 23 | 24 | for (var i = 0; i < listeners.length; i++) { 25 | if (listeners[i].name === 'ondata') { 26 | return true 27 | } 28 | } 29 | 30 | return false 31 | } 32 | 33 | /** 34 | * Unpipe a stream from all destinations. 35 | * 36 | * @param {object} stream 37 | * @public 38 | */ 39 | 40 | function unpipe(stream) { 41 | if (!stream) { 42 | throw new TypeError('argument stream is required') 43 | } 44 | 45 | if (typeof stream.unpipe === 'function') { 46 | // new-style 47 | stream.unpipe() 48 | return 49 | } 50 | 51 | // Node.js 0.8 hack 52 | if (!hasPipeDataListeners(stream)) { 53 | return 54 | } 55 | 56 | var listener 57 | var listeners = stream.listeners('close') 58 | 59 | for (var i = 0; i < listeners.length; i++) { 60 | listener = listeners[i] 61 | 62 | if (listener.name !== 'cleanup' && listener.name !== 'onclose') { 63 | continue 64 | } 65 | 66 | // invoke the listener 67 | listener.call(stream) 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /node_modules/utils-merge/.npmignore: -------------------------------------------------------------------------------- 1 | CONTRIBUTING.md 2 | Makefile 3 | docs/ 4 | examples/ 5 | reports/ 6 | test/ 7 | 8 | .jshintrc 9 | .travis.yml 10 | -------------------------------------------------------------------------------- /node_modules/utils-merge/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2017 Jared Hanson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/utils-merge/README.md: -------------------------------------------------------------------------------- 1 | # utils-merge 2 | 3 | [![Version](https://img.shields.io/npm/v/utils-merge.svg?label=version)](https://www.npmjs.com/package/utils-merge) 4 | [![Build](https://img.shields.io/travis/jaredhanson/utils-merge.svg)](https://travis-ci.org/jaredhanson/utils-merge) 5 | [![Quality](https://img.shields.io/codeclimate/github/jaredhanson/utils-merge.svg?label=quality)](https://codeclimate.com/github/jaredhanson/utils-merge) 6 | [![Coverage](https://img.shields.io/coveralls/jaredhanson/utils-merge.svg)](https://coveralls.io/r/jaredhanson/utils-merge) 7 | [![Dependencies](https://img.shields.io/david/jaredhanson/utils-merge.svg)](https://david-dm.org/jaredhanson/utils-merge) 8 | 9 | 10 | Merges the properties from a source object into a destination object. 11 | 12 | ## Install 13 | 14 | ```bash 15 | $ npm install utils-merge 16 | ``` 17 | 18 | ## Usage 19 | 20 | ```javascript 21 | var a = { foo: 'bar' } 22 | , b = { bar: 'baz' }; 23 | 24 | merge(a, b); 25 | // => { foo: 'bar', bar: 'baz' } 26 | ``` 27 | 28 | ## License 29 | 30 | [The MIT License](http://opensource.org/licenses/MIT) 31 | 32 | Copyright (c) 2013-2017 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)> 33 | 34 | Sponsor 35 | -------------------------------------------------------------------------------- /node_modules/utils-merge/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Merge object b with object a. 3 | * 4 | * var a = { foo: 'bar' } 5 | * , b = { bar: 'baz' }; 6 | * 7 | * merge(a, b); 8 | * // => { foo: 'bar', bar: 'baz' } 9 | * 10 | * @param {Object} a 11 | * @param {Object} b 12 | * @return {Object} 13 | * @api public 14 | */ 15 | 16 | exports = module.exports = function(a, b){ 17 | if (a && b) { 18 | for (var key in b) { 19 | a[key] = b[key]; 20 | } 21 | } 22 | return a; 23 | }; 24 | -------------------------------------------------------------------------------- /node_modules/vary/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.1.2 / 2017-09-23 2 | ================== 3 | 4 | * perf: improve header token parsing speed 5 | 6 | 1.1.1 / 2017-03-20 7 | ================== 8 | 9 | * perf: hoist regular expression 10 | 11 | 1.1.0 / 2015-09-29 12 | ================== 13 | 14 | * Only accept valid field names in the `field` argument 15 | - Ensures the resulting string is a valid HTTP header value 16 | 17 | 1.0.1 / 2015-07-08 18 | ================== 19 | 20 | * Fix setting empty header from empty `field` 21 | * perf: enable strict mode 22 | * perf: remove argument reassignments 23 | 24 | 1.0.0 / 2014-08-10 25 | ================== 26 | 27 | * Accept valid `Vary` header string as `field` 28 | * Add `vary.append` for low-level string manipulation 29 | * Move to `jshttp` orgainzation 30 | 31 | 0.1.0 / 2014-06-05 32 | ================== 33 | 34 | * Support array of fields to set 35 | 36 | 0.0.0 / 2014-06-04 37 | ================== 38 | 39 | * Initial release 40 | -------------------------------------------------------------------------------- /node_modules/vary/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-2017 Douglas Christopher Wilson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "techdot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "dependencies": { 7 | "cookie-parser": "^1.4.5", 8 | "express": "^4.16.3", 9 | "morgan": "^1.10.0", 10 | "password-hash": "^1.2.2", 11 | "request": "^2.88.2", 12 | "solc": "^0.4.11", 13 | "web3": "^0.19.1" 14 | }, 15 | "devDependencies": {}, 16 | "scripts": { 17 | "test": "echo \"Error: no test specified\" && exit 1" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "git+https://github.com/sanattaori/techdot.git" 22 | }, 23 | "author": "", 24 | "license": "ISC", 25 | "bugs": { 26 | "url": "https://github.com/sanattaori/techdot/issues" 27 | }, 28 | "homepage": "https://github.com/sanattaori/techdot#readme" 29 | } 30 | -------------------------------------------------------------------------------- /screenshot/1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/screenshot/1.PNG -------------------------------------------------------------------------------- /screenshot/2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/screenshot/2.PNG -------------------------------------------------------------------------------- /screenshot/3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/screenshot/3.PNG -------------------------------------------------------------------------------- /screenshot/4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/screenshot/4.PNG -------------------------------------------------------------------------------- /screenshot/5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/screenshot/5.PNG -------------------------------------------------------------------------------- /screenshot/gan.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/screenshot/gan.PNG -------------------------------------------------------------------------------- /ui/fonts/roboto/Roboto-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/fonts/roboto/Roboto-Bold.woff -------------------------------------------------------------------------------- /ui/fonts/roboto/Roboto-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/fonts/roboto/Roboto-Bold.woff2 -------------------------------------------------------------------------------- /ui/fonts/roboto/Roboto-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/fonts/roboto/Roboto-Light.woff -------------------------------------------------------------------------------- /ui/fonts/roboto/Roboto-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/fonts/roboto/Roboto-Light.woff2 -------------------------------------------------------------------------------- /ui/fonts/roboto/Roboto-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/fonts/roboto/Roboto-Medium.woff -------------------------------------------------------------------------------- /ui/fonts/roboto/Roboto-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/fonts/roboto/Roboto-Medium.woff2 -------------------------------------------------------------------------------- /ui/fonts/roboto/Roboto-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/fonts/roboto/Roboto-Regular.woff -------------------------------------------------------------------------------- /ui/fonts/roboto/Roboto-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/fonts/roboto/Roboto-Regular.woff2 -------------------------------------------------------------------------------- /ui/fonts/roboto/Roboto-Thin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/fonts/roboto/Roboto-Thin.woff -------------------------------------------------------------------------------- /ui/fonts/roboto/Roboto-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/fonts/roboto/Roboto-Thin.woff2 -------------------------------------------------------------------------------- /ui/images/bjp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/images/bjp.png -------------------------------------------------------------------------------- /ui/images/cong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/images/cong.png -------------------------------------------------------------------------------- /ui/images/e-voting-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/images/e-voting-logo.png -------------------------------------------------------------------------------- /ui/images/head.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/images/head.jpg -------------------------------------------------------------------------------- /ui/images/rsc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/images/rsc.png -------------------------------------------------------------------------------- /ui/images/shiv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/images/shiv.png -------------------------------------------------------------------------------- /ui/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Aadhaar-Voting | Login 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 |

18 |
19 |

Welcome to Aadhaar-Voting

20 | 21 | 22 |
23 |
24 | 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 |
33 |
34 | × 35 | Error! 36 |
37 |
38 |
39 | 49 | 50 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /ui/js/login.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | var cookie = readCookie('auth'); 3 | if (cookie != null) { 4 | window.location = "/app"; 5 | } 6 | //check cookie 7 | function readCookie(name) { 8 | var nameEQ = name + "="; 9 | var ca = document.cookie.split(';'); 10 | for(var i=0;i < ca.length;i++) { 11 | var c = ca[i]; 12 | while (c.charAt(0)==' ') c = c.substring(1,c.length); 13 | if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 14 | } 15 | return null; 16 | } 17 | 18 | //error hide 19 | $(messagebox).hide() 20 | 21 | $(login).click(function(){ 22 | if (($('#username').val()=="")) { 23 | $(messagebox).show() 24 | $(errormsg).text('Please Enter Username'); 25 | } else if (($('#password').val()=="")) { 26 | $(messagebox).show() 27 | $(errormsg).text('Please Enter valid Password'); 28 | 29 | } else { 30 | $(messagebox).hide() 31 | $.ajax({ 32 | url: "/login", 33 | method: "post", 34 | dataType: 'json', 35 | contentType: 'application/json' , 36 | data: JSON.stringify({ 37 | "username": $('#username').val(), 38 | "password": $('#password').val(), 39 | }), 40 | success: function (data) { 41 | console.log(data.message); 42 | $(messagebox).show() 43 | $(errormsg).text('Redirecting...') 44 | var d = new Date(); 45 | d.setTime(d.getTime() + (1*24*60*60*100)); 46 | var expires = "expires="+ d.toUTCString(); 47 | document.cookie = 'auth' + "=" + data.message + ";" + expires + ";path=/"; 48 | window.location = '/app'; 49 | }, 50 | statusCode: { 51 | 500: function() { 52 | $(messagebox).show() 53 | console.log('error'); 54 | $(errormsg).text('Error Invalid Username/Password'); 55 | } 56 | } 57 | 58 | });//.done(function(msg){ 59 | // $(errormsg).text('Redirecting...'); 60 | 61 | // }).fail(function(e){ 62 | // $(errormsg).text(e); 63 | // }); 64 | } 65 | }); 66 | }); -------------------------------------------------------------------------------- /ui/js/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanattaori/techdot/34d6412d6c7c58f4bd79de6638152164aa5786cd/ui/js/main.js -------------------------------------------------------------------------------- /ui/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
Election SymbolCandidate NameVote
Mandar vote
AlanJellybean$3.76
JonathanLollipop$7.00
44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /voting.sol: -------------------------------------------------------------------------------- 1 | pragma solidity ^0.4.11; 2 | // We have to specify what version of compiler this code will compile with 3 | 4 | contract Voting { 5 | /* mapping field below is equivalent to an associative array or hash. 6 | The key of the mapping is candidate name stored as type bytes32 and value is 7 | an unsigned integer to store the vote count 8 | */ 9 | 10 | mapping (bytes32 => uint8) public votesReceived; 11 | 12 | /* Solidity doesn't let you pass in an array of strings in the constructor (yet). 13 | We will use an array of bytes32 instead to store the list of candidates 14 | */ 15 | 16 | bytes32[] public candidateList; 17 | 18 | /* This is the constructor which will be called once when you 19 | deploy the contract to the blockchain. When we deploy the contract, 20 | we will pass an array of candidates who will be contesting in the election 21 | */ 22 | function Voting(bytes32[] candidateNames) { 23 | candidateList = candidateNames; 24 | } 25 | 26 | // This function returns the total votes a candidate has received so far 27 | function totalVotesFor(bytes32 candidate) returns (uint8) { 28 | if (validCandidate(candidate) == false) throw; 29 | return votesReceived[candidate]; 30 | } 31 | 32 | // This function increments the vote count for the specified candidate. This 33 | // is equivalent to casting a vote 34 | function voteForCandidate(bytes32 candidate) { 35 | if (validCandidate(candidate) == false) throw; 36 | votesReceived[candidate] += 1; 37 | } 38 | 39 | function validCandidate(bytes32 candidate) returns (bool) { 40 | for(uint i = 0; i < candidateList.length; i++) { 41 | if (candidateList[i] == candidate) { 42 | return true; 43 | } 44 | } 45 | return false; 46 | } 47 | } 48 | --------------------------------------------------------------------------------