├── .gitattributes ├── LICENSE ├── README-Localized ├── README-de-de.md ├── README-es-es.md ├── README-fr-fr.md ├── README-ja-jp.md ├── README-pt-br.md ├── README-ru-ru.md ├── README-zh-cn.md └── README-zh-tw.md ├── README.md ├── Word-Add-in-JS-Redact.yml ├── app.js ├── ca.crt ├── ca.key ├── css ├── bodystyles.css ├── common.css └── styles.css ├── dialogAlert.html ├── dialogCount.html ├── gen-cert.sh ├── index.html ├── media ├── InsertSpec_16x16_ px.png ├── InsertSpec_32x32_px.png ├── InsertSpec_80x80_px.png ├── groupIcon1_default16.png ├── groupIcon1_default32.png └── groupIcon1_default80.png ├── node_modules ├── 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 │ ├── node_modules │ │ ├── accepts │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ ├── mime-types │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ ├── node_modules │ │ │ │ │ │ └── mime-db │ │ │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── db.json │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── package.json │ │ │ │ │ └── package.json │ │ │ │ └── negotiator │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ ├── lib │ │ │ │ │ ├── charset.js │ │ │ │ │ ├── encoding.js │ │ │ │ │ ├── language.js │ │ │ │ │ └── mediaType.js │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ ├── array-flatten │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── array-flatten.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 │ │ │ ├── .jshintrc │ │ │ ├── .npmignore │ │ │ ├── History.md │ │ │ ├── Makefile │ │ │ ├── Readme.md │ │ │ ├── bower.json │ │ │ ├── browser.js │ │ │ ├── component.json │ │ │ ├── debug.js │ │ │ ├── node.js │ │ │ ├── node_modules │ │ │ │ └── ms │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── History.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ ├── depd │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── browser │ │ │ │ │ └── index.js │ │ │ │ └── compat │ │ │ │ │ ├── buffer-concat.js │ │ │ │ │ ├── callsite-tostring.js │ │ │ │ │ ├── event-listener-count.js │ │ │ │ │ └── index.js │ │ │ └── package.json │ │ ├── escape-html │ │ │ ├── LICENSE │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── etag │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── finalhandler │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ └── unpipe │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ ├── fresh │ │ │ ├── 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 │ │ ├── on-finished │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ └── ee-first │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ └── 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 │ │ │ ├── node_modules │ │ │ │ ├── forwarded │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ └── ipaddr.js │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── Cakefile │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── bower.json │ │ │ │ │ ├── ipaddr.min.js │ │ │ │ │ ├── lib │ │ │ │ │ └── ipaddr.js │ │ │ │ │ ├── package.json │ │ │ │ │ ├── src │ │ │ │ │ └── ipaddr.coffee │ │ │ │ │ └── test │ │ │ │ │ └── ipaddr.test.coffee │ │ │ └── package.json │ │ ├── qs │ │ │ ├── .eslintignore │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bower.json │ │ │ ├── lib │ │ │ │ ├── index.js │ │ │ │ ├── parse.js │ │ │ │ ├── stringify.js │ │ │ │ └── utils.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ ├── parse.js │ │ │ │ ├── stringify.js │ │ │ │ └── utils.js │ │ ├── range-parser │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── send │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ ├── .bin │ │ │ │ │ ├── mime │ │ │ │ │ └── mime.cmd │ │ │ │ ├── destroy │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ ├── http-errors │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ ├── node_modules │ │ │ │ │ │ └── inherits │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── inherits.js │ │ │ │ │ │ │ ├── inherits_browser.js │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ └── test.js │ │ │ │ │ └── package.json │ │ │ │ ├── mime │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── build │ │ │ │ │ │ ├── build.js │ │ │ │ │ │ └── test.js │ │ │ │ │ ├── cli.js │ │ │ │ │ ├── mime.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── types.json │ │ │ │ ├── ms │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── History.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ └── statuses │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── codes.json │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ ├── serve-static │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── type-is │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ ├── media-typer │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ └── mime-types │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── index.js │ │ │ │ │ ├── node_modules │ │ │ │ │ └── mime-db │ │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── db.json │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── package.json │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ ├── utils-merge │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ └── vary │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ └── package.json └── path │ ├── LICENSE │ ├── README.md │ ├── package.json │ └── path.js ├── package.json ├── scripts ├── redact.js ├── redactCommon.js ├── search.js └── textfield.js ├── server.crt ├── server.csr ├── server.js ├── server.key └── word-add-in-js-redact-manifest.xml /.gitattributes: -------------------------------------------------------------------------------- 1 | *.html linguist-language=JavaScript 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Word-Add-in-JS-SpecKit 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | MIT License 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 all 15 | 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 THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /Word-Add-in-JS-Redact.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:Sample 2 | sample: 3 | - name: 'Word add-in: How to search, highlight, and redact text' 4 | path: '' 5 | description: This Word add-in sample shows how you can create an add-in that searches, highlights and redacts text. 6 | readme: '' 7 | generateZip: FALSE 8 | isLive: TRUE 9 | technologies: 10 | - Office Add-ins 11 | azureDeploy: '' 12 | author: rick-kirkham 13 | platforms: [] 14 | languages: 15 | - JavaScript 16 | extensions: 17 | products: 18 | - Word 19 | scenarios: [] 20 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the project root for license information. 4 | */ 5 | (function() { 6 | "use strict"; 7 | 8 | // The initialize function is run each time a page of the add-in is loaded into the task pane. 9 | Office.initialize = function(reason) { 10 | $(document).ready(function() { 11 | 12 | // Use this to check whether the new API is supported in the Word client. 13 | // The createDocument method call is in the 1.3 requirement set. 14 | // The 1.3 requirement set check is not implemented in preview. 15 | // The 1.2 API requirement set check is the minimum requirement check in Word. 16 | // Update this to target the correct set after 1.3 is generally available. 17 | if (Office.context.requirements.isSetSupported("WordApi", 1.2)) { 18 | // Initialize stylized fabric UI for text fields. 19 | $(".ms-TextField").TextField(); 20 | 21 | // If you need to initialize something you can do so here. 22 | // This is in search.js. 23 | $('#btnSearch').click(RedactAddin.searchWords); 24 | // This is in redact.js. 25 | $('#btnRedact').click(RedactAddin.redactUserInput); 26 | // This is in redact.js. 27 | $('#btnRedactSelection').click(RedactAddin.redactSelectedTexts); 28 | } 29 | else { 30 | // Just letting you know that this code will not work with your version of Word. 31 | console.log('This add-in requires the latest version of Word.'); 32 | } 33 | }); 34 | }; 35 | })(); 36 | -------------------------------------------------------------------------------- /ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIID2zCCAsOgAwIBAgIJAKznZ4/BWq02MA0GCSqGSIb3DQEBCwUAMIGDMQswCQYD 3 | VQQGEwJVUzELMAkGA1UECAwCV0ExEDAOBgNVBAcMB1JlZG1vbmQxFTATBgNVBAoM 4 | DE1heERldkFkZGluczEnMCUGA1UECwwed29yZC1hZGQtaW4tamF2YXNjcmlwdC1z 5 | cGVja2l0MRUwEwYDVQQDDAxsb2NhbGhvc3QtY2EwHhcNMTYwNDA2MjIxMjU5WhcN 6 | MjEwNDA2MjIxMjU5WjCBgzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAldBMRAwDgYD 7 | VQQHDAdSZWRtb25kMRUwEwYDVQQKDAxNYXhEZXZBZGRpbnMxJzAlBgNVBAsMHndv 8 | cmQtYWRkLWluLWphdmFzY3JpcHQtc3BlY2tpdDEVMBMGA1UEAwwMbG9jYWxob3N0 9 | LWNhMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3vlEYzlCZu69EZ5P 10 | bDm2aB6X7GXn4B9NRdLmMnj3WaQMtJrkZVY6OcTk97Iu1bA7SAgT1saDW2OXWBW2 11 | JMJSV/gWGVSqWQFnhUcNyMpBHM9oA17067t78rtaGJV3QicqxmUVrNS87P2CM7RA 12 | 9UMfcEH1Y2DzHcjgo8xjNdkCFOyZUWjutzgu+nEJAJZ4xEaIe8XRjcMDaf96Csl8 13 | pJCsigoRh0xkCST+YBIsoFu38RTxptUFaKBKlP4FF6nSfLflelWzSqsSpo42sMch 14 | Uz7ZzVqbwLP8XLrTY2gDlpTqTvecfU68/6vVe+Z83VFUnB98zVm+w0baNehyKb0W 15 | 3gEOwwIDAQABo1AwTjAdBgNVHQ4EFgQUVRdpoDxmIz6AIXf5fMOPsj37flcwHwYD 16 | VR0jBBgwFoAUVRdpoDxmIz6AIXf5fMOPsj37flcwDAYDVR0TBAUwAwEB/zANBgkq 17 | hkiG9w0BAQsFAAOCAQEAz7t/OWQ77uyrBR52TguFeP3QKGlD8MCKqOaD83LqEzGm 18 | XroGZZUSyI90wxU7Gdg4jzlf50o5OP+jMuKVIGxmPiTzje3QK1Fr98547Z0jxpqh 19 | oDAh0i92XimMCrnthcD3IMziQ91eqNX45R2sv4oX+2YgtPabQATUoIn37yJs1IkH 20 | 51ZvyjCfU3wO0h2Oo2bdcM6O9HA7+5RCQrf89LH6etVPmMgNPW9GPGY+g87Lx/YJ 21 | BEG4WNAFUDyxG8IeAZEOGxerXWQvy0VFW5rrtE0AdowarNaP/5PBjLGY/yyhQn/k 22 | 1KpRMxih3fHT3h+5HPhYX++NDIJ6KHfA1P5iGGV5vA== 23 | -----END CERTIFICATE----- 24 | -------------------------------------------------------------------------------- /ca.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEogIBAAKCAQEA3vlEYzlCZu69EZ5PbDm2aB6X7GXn4B9NRdLmMnj3WaQMtJrk 3 | ZVY6OcTk97Iu1bA7SAgT1saDW2OXWBW2JMJSV/gWGVSqWQFnhUcNyMpBHM9oA170 4 | 67t78rtaGJV3QicqxmUVrNS87P2CM7RA9UMfcEH1Y2DzHcjgo8xjNdkCFOyZUWju 5 | tzgu+nEJAJZ4xEaIe8XRjcMDaf96Csl8pJCsigoRh0xkCST+YBIsoFu38RTxptUF 6 | aKBKlP4FF6nSfLflelWzSqsSpo42sMchUz7ZzVqbwLP8XLrTY2gDlpTqTvecfU68 7 | /6vVe+Z83VFUnB98zVm+w0baNehyKb0W3gEOwwIDAQABAoIBABgeXHBjNDSQJHFw 8 | b2TkhT+T95kBmOhcWm5wFqhk/1R580nh60yu3BN9ocrNQlWo/3CWNxcnV/QdvLQx 9 | fQdS4bdURYet6dNA3KLFAc+zWQG1yal7rwCEwi6KZ397Q3ArbmwRaRvN0zXLYjcX 10 | i2M8RH1PFS0Pwpx5Kxtss1qSw6/hiC1b7k3Cja4glAiYfBHTEf8gqzp8gFUUCXAJ 11 | YL3NDIdpnXcZVyzEPH8MkzzTvsA427SK76cE+DpkARYG2mGqb/fDvYdpMmmjFEWC 12 | VxN8ZHk6X6aF8EkpPn9vD0B10aIhU2ZOHJR+UvQ+RP6oG/NXDBODXuBei7Yzauj6 13 | /G4trfkCgYEA8+TSjw9dWeIj4T2RdguK4O1N7+E/Bmfm9ny8lFoRU2K8XBEXOfqZ 14 | 5UU2biNXV5QgdophG//q7AfLCGACrAGWNBqx6uzsO+gguCeekWrKh9YRo8cfIdmI 15 | wST3DgGB1bxpp/4x80Irp36PKxGhSOwfxS/o3mnfrVbjYtOwutjg6bUCgYEA6gqc 16 | YWZ16zUJlVs20lHqkiKBL4bAe6IPUp69r18gCThqYutc6f1gCvBHh2cPux1Nm9B8 17 | SGLMuZ0dxaUhKLOCajBhG9oyxAHwnw08L6OSQjwVnxH42vp0kPk639wtVKM0KSld 18 | CTQrTLNgA5RAZpDexI8f04nsNcOR25KmAJ0ngZcCgYBOpkW4WI4UBDbp1b7owEQi 19 | 0KPHbW2zlSIH7qWpeXoI19hCIEjLK6MhKjapQcBSv7PQRkOWkeqh/slchAmYilJz 20 | rwAc8BYmI28Zs70Qy81QDJpXpEjH06ykDFWXMKk70ayIvhJBjd8h/lAQ5XiLWYnN 21 | PuvrfVziOxjMr9NYDcRJ2QKBgCdjvcoOyo3ZkVFX1rQzIT2THRb4oPCt59JJ8TbQ 22 | 1b13h0A6yJqBEGcG5aL+T4F4fxVYU3KDXl1m+hnHnvsQq0Rf/BgJ8z1V7j92pMiH 23 | yRfosOLizXVdbbzwlV4T2nVCOocq9QOViiwQjHpNu0EH5NZEGGEr91tdHPFNjy7P 24 | RFTlAoGAIG+9aiL4mWXxSf2aQi3XVNN7B8sywhEFe/Cy0zjStbCiWxFoN9CrMIrW 25 | GTxMVwfaBzAPb4zg2l8XiTgiNRWuwUNxVwk/IwnPYKcJ+zlqZ618EgPcfnlsExYl 26 | AbVAe5j8oTXmeHbgMfg2Apw7JgZdz5XE2M42ZuuYRy5VPjTEJrQ= 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /css/bodystyles.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See License.txt in the project root. 3 | */ 4 | html, 5 | body { 6 | margin: 0; 7 | padding: 0; 8 | width: 100%; 9 | height: 100%; 10 | background-color:#E6E6E6; } 11 | 12 | .home { 13 | width: 100%; 14 | height: 100%; } 15 | 16 | .header { 17 | padding: 20px; } 18 | .header__titleBar { 19 | margin-bottom: 45px; 20 | text-transform: uppercase; } 21 | .header__button { 22 | margin: 15px 0px 10px 0px; } 23 | .header--text { 24 | margin: 0 0 6px 0; 25 | padding: 0; } 26 | .header--spacer { 27 | margin-top: 15px; } 28 | 29 | 30 | .flex-container { 31 | display: -ms-flexbox; 32 | display: -webkit-flex; 33 | display: flex; 34 | -webkit-flex-direction: column; 35 | -ms-flex-direction: column; 36 | flex-direction: column; 37 | -webkit-flex-wrap: nowrap; 38 | -ms-flex-wrap: nowrap; 39 | flex-wrap: nowrap; 40 | -webkit-justify-content: center; 41 | -ms-flex-pack: center; 42 | justify-content: center; 43 | -webkit-align-content: stretch; 44 | -ms-flex-line-pack: stretch; 45 | align-content: stretch; 46 | -webkit-align-items: stretch; 47 | -ms-flex-align: stretch; 48 | align-items: stretch; } 49 | 50 | .flex-item:nth-child(1) { 51 | -webkit-order: 0; 52 | -ms-flex-order: 0; 53 | order: 0; 54 | -webkit-flex: 0 1 auto; 55 | -ms-flex: 0 1 auto; 56 | flex: 0 1 auto; 57 | -webkit-align-self: stretch; 58 | -ms-flex-item-align: stretch; 59 | align-self: stretch; } 60 | 61 | .flex-item:nth-child(2) { 62 | -webkit-order: 0; 63 | -ms-flex-order: 0; 64 | order: 0; 65 | -webkit-flex: 1 1 auto; 66 | -ms-flex: 1 1 auto; 67 | flex: 1 1 auto; 68 | -webkit-align-self: stretch; 69 | -ms-flex-item-align: stretch; 70 | align-self: stretch; } 71 | -------------------------------------------------------------------------------- /dialogAlert.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 39 | 40 | 41 |

42 |

43 | 44 | -------------------------------------------------------------------------------- /dialogCount.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 39 | 40 | 41 |

42 |

43 | 44 | -------------------------------------------------------------------------------- /gen-cert.sh: -------------------------------------------------------------------------------- 1 | 2 | if [[ $(uname) == *"MINGW"* ]] 3 | then 4 | # This script is intended to run in that Git Bash environment. Note the form for -subj 5 | echo "Generating RSA key for the root CA and store it in ca.key:" 6 | openssl genrsa -out ca.key 2048 7 | 8 | echo "" 9 | echo "Create the self-signed root CA certificate in ca.crt:" 10 | 11 | openssl req -new -x509 -days 1826 -key ca.key -out ca.crt -subj "//C=US\ST=WA\L=Redmond\O=MaxDevAddins\OU=word-add-in-javascript-speckit\CN=localhost-ca" 12 | 13 | echo "" 14 | echo "Create private key for subordinate CA:" 15 | openssl genrsa -out server.key 4096 16 | 17 | echo "" 18 | echo "Request a certificate for the subordinate CA:" 19 | 20 | openssl req -new -key server.key -out server.csr -subj "//C=US\ST=WA\L=Redmond\O=MaxDevAddins\OU=word-add-in-javascript-speckit\CN=localhost" 21 | 22 | echo "" 23 | echo "Process the subordinate CA cert request and sign it with the root CA:" 24 | openssl x509 -req -days 730 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt 25 | 26 | echo "" 27 | echo "NEXT STEP (required): install the root CA (ca.crt) in your Trusted Root Certification Authorities store." 28 | 29 | else 30 | echo "create certs not with Git Bash env, you'll need to set execute perms: chmod +x gen-cert.sh" 31 | fi -------------------------------------------------------------------------------- /media/InsertSpec_16x16_ px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/Word-Add-in-JS-Redact/0bd26ec735a47cccb613c5b56e2927597ac5665d/media/InsertSpec_16x16_ px.png -------------------------------------------------------------------------------- /media/InsertSpec_32x32_px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/Word-Add-in-JS-Redact/0bd26ec735a47cccb613c5b56e2927597ac5665d/media/InsertSpec_32x32_px.png -------------------------------------------------------------------------------- /media/InsertSpec_80x80_px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/Word-Add-in-JS-Redact/0bd26ec735a47cccb613c5b56e2927597ac5665d/media/InsertSpec_80x80_px.png -------------------------------------------------------------------------------- /media/groupIcon1_default16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/Word-Add-in-JS-Redact/0bd26ec735a47cccb613c5b56e2927597ac5665d/media/groupIcon1_default16.png -------------------------------------------------------------------------------- /media/groupIcon1_default32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/Word-Add-in-JS-Redact/0bd26ec735a47cccb613c5b56e2927597ac5665d/media/groupIcon1_default32.png -------------------------------------------------------------------------------- /media/groupIcon1_default80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/Word-Add-in-JS-Redact/0bd26ec735a47cccb613c5b56e2927597ac5665d/media/groupIcon1_default80.png -------------------------------------------------------------------------------- /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 | * Initialization middleware, exposing the 13 | * request and response to each other, as well 14 | * as defaulting the X-Powered-By header field. 15 | * 16 | * @param {Function} app 17 | * @return {Function} 18 | * @api private 19 | */ 20 | 21 | exports.init = function(app){ 22 | return function expressInit(req, res, next){ 23 | if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express'); 24 | req.res = res; 25 | res.req = req; 26 | req.next = next; 27 | 28 | req.__proto__ = app.request; 29 | res.__proto__ = app.response; 30 | 31 | res.locals = res.locals || Object.create(null); 32 | 33 | next(); 34 | }; 35 | }; 36 | 37 | -------------------------------------------------------------------------------- /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 parseUrl = require('parseurl'); 16 | var qs = require('qs'); 17 | 18 | /** 19 | * @param {Object} options 20 | * @return {Function} 21 | * @api public 22 | */ 23 | 24 | module.exports = function query(options) { 25 | var opts = Object.create(options || null); 26 | var queryparse = qs.parse; 27 | 28 | if (typeof options === 'function') { 29 | queryparse = options; 30 | opts = undefined; 31 | } 32 | 33 | if (opts !== undefined) { 34 | if (opts.allowDots === undefined) { 35 | opts.allowDots = false; 36 | } 37 | 38 | if (opts.allowPrototypes === undefined) { 39 | opts.allowPrototypes = true; 40 | } 41 | } 42 | 43 | return function query(req, res, next){ 44 | if (!req.query) { 45 | var val = parseUrl(req).query; 46 | req.query = queryparse(val, opts); 47 | } 48 | 49 | next(); 50 | }; 51 | }; 52 | -------------------------------------------------------------------------------- /node_modules/express/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/express/node_modules/accepts/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/express/node_modules/accepts/node_modules/mime-types/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/express/node_modules/accepts/node_modules/mime-types/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/express/node_modules/accepts/node_modules/negotiator/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.5.3 / 2015-05-10 2 | ================== 3 | 4 | * Fix media type parameter matching to be case-insensitive 5 | 6 | 0.5.2 / 2015-05-06 7 | ================== 8 | 9 | * Fix comparing media types with quoted values 10 | * Fix splitting media types with quoted commas 11 | 12 | 0.5.1 / 2015-02-14 13 | ================== 14 | 15 | * Fix preference sorting to be stable for long acceptable lists 16 | 17 | 0.5.0 / 2014-12-18 18 | ================== 19 | 20 | * Fix list return order when large accepted list 21 | * Fix missing identity encoding when q=0 exists 22 | * Remove dynamic building of Negotiator class 23 | 24 | 0.4.9 / 2014-10-14 25 | ================== 26 | 27 | * Fix error when media type has invalid parameter 28 | 29 | 0.4.8 / 2014-09-28 30 | ================== 31 | 32 | * Fix all negotiations to be case-insensitive 33 | * Stable sort preferences of same quality according to client order 34 | * Support Node.js 0.6 35 | 36 | 0.4.7 / 2014-06-24 37 | ================== 38 | 39 | * Handle invalid provided languages 40 | * Handle invalid provided media types 41 | 42 | 0.4.6 / 2014-06-11 43 | ================== 44 | 45 | * Order by specificity when quality is the same 46 | 47 | 0.4.5 / 2014-05-29 48 | ================== 49 | 50 | * Fix regression in empty header handling 51 | 52 | 0.4.4 / 2014-05-29 53 | ================== 54 | 55 | * Fix behaviors when headers are not present 56 | 57 | 0.4.3 / 2014-04-16 58 | ================== 59 | 60 | * Handle slashes on media params correctly 61 | 62 | 0.4.2 / 2014-02-28 63 | ================== 64 | 65 | * Fix media type sorting 66 | * Handle media types params strictly 67 | 68 | 0.4.1 / 2014-01-16 69 | ================== 70 | 71 | * Use most specific matches 72 | 73 | 0.4.0 / 2014-01-09 74 | ================== 75 | 76 | * Remove preferred prefix from methods 77 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/accepts/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/express/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/express/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/express/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/express/node_modules/array-flatten/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "array-flatten", 3 | "version": "1.1.1", 4 | "description": "Flatten an array of nested arrays into a single flat array", 5 | "main": "array-flatten.js", 6 | "files": [ 7 | "array-flatten.js", 8 | "LICENSE" 9 | ], 10 | "scripts": { 11 | "test": "istanbul cover _mocha -- -R spec" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git://github.com/blakeembrey/array-flatten.git" 16 | }, 17 | "keywords": [ 18 | "array", 19 | "flatten", 20 | "arguments", 21 | "depth" 22 | ], 23 | "author": { 24 | "name": "Blake Embrey", 25 | "email": "hello@blakeembrey.com", 26 | "url": "http://blakeembrey.me" 27 | }, 28 | "license": "MIT", 29 | "bugs": { 30 | "url": "https://github.com/blakeembrey/array-flatten/issues" 31 | }, 32 | "homepage": "https://github.com/blakeembrey/array-flatten", 33 | "devDependencies": { 34 | "istanbul": "^0.3.13", 35 | "mocha": "^2.2.4", 36 | "pre-commit": "^1.0.7", 37 | "standard": "^3.7.3" 38 | }, 39 | "gitHead": "1963a9189229d408e1e8f585a00c8be9edbd1803", 40 | "_id": "array-flatten@1.1.1", 41 | "_shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2", 42 | "_from": "array-flatten@1.1.1", 43 | "_npmVersion": "2.11.3", 44 | "_nodeVersion": "2.3.3", 45 | "_npmUser": { 46 | "name": "blakeembrey", 47 | "email": "hello@blakeembrey.com" 48 | }, 49 | "maintainers": [ 50 | { 51 | "name": "blakeembrey", 52 | "email": "hello@blakeembrey.com" 53 | } 54 | ], 55 | "dist": { 56 | "shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2", 57 | "tarball": "http://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" 58 | }, 59 | "directories": {}, 60 | "_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 61 | "readme": "ERROR: No README data found!" 62 | } 63 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/content-disposition/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.5.1 / 2016-01-17 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 0.5.0 / 2014-10-11 7 | ================== 8 | 9 | * Add `parse` function 10 | 11 | 0.4.0 / 2014-09-21 12 | ================== 13 | 14 | * Expand non-Unicode `filename` to the full ISO-8859-1 charset 15 | 16 | 0.3.0 / 2014-09-20 17 | ================== 18 | 19 | * Add `fallback` option 20 | * Add `type` option 21 | 22 | 0.2.0 / 2014-09-19 23 | ================== 24 | 25 | * Reduce ambiguity of file names with hex escape in buggy browsers 26 | 27 | 0.1.2 / 2014-09-19 28 | ================== 29 | 30 | * Fix periodic invalid Unicode filename header 31 | 32 | 0.1.1 / 2014-09-19 33 | ================== 34 | 35 | * Fix invalid characters appearing in `filename*` parameter 36 | 37 | 0.1.0 / 2014-09-18 38 | ================== 39 | 40 | * Make the `filename` argument optional 41 | 42 | 0.0.0 / 2014-09-18 43 | ================== 44 | 45 | * Initial release 46 | -------------------------------------------------------------------------------- /node_modules/express/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/express/node_modules/content-disposition/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "content-disposition", 3 | "description": "Create and parse Content-Disposition header", 4 | "version": "0.5.1", 5 | "contributors": [ 6 | { 7 | "name": "Douglas Christopher Wilson", 8 | "email": "doug@somethingdoug.com" 9 | } 10 | ], 11 | "license": "MIT", 12 | "keywords": [ 13 | "content-disposition", 14 | "http", 15 | "rfc6266", 16 | "res" 17 | ], 18 | "repository": { 19 | "type": "git", 20 | "url": "git+https://github.com/jshttp/content-disposition.git" 21 | }, 22 | "devDependencies": { 23 | "istanbul": "0.4.2", 24 | "mocha": "1.21.5" 25 | }, 26 | "files": [ 27 | "LICENSE", 28 | "HISTORY.md", 29 | "README.md", 30 | "index.js" 31 | ], 32 | "engines": { 33 | "node": ">= 0.6" 34 | }, 35 | "scripts": { 36 | "test": "mocha --reporter spec --bail --check-leaks test/", 37 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", 38 | "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" 39 | }, 40 | "gitHead": "7b391db3af5629d4c698f1de21802940bb9f22a5", 41 | "bugs": { 42 | "url": "https://github.com/jshttp/content-disposition/issues" 43 | }, 44 | "homepage": "https://github.com/jshttp/content-disposition", 45 | "_id": "content-disposition@0.5.1", 46 | "_shasum": "87476c6a67c8daa87e32e87616df883ba7fb071b", 47 | "_from": "content-disposition@0.5.1", 48 | "_npmVersion": "1.4.28", 49 | "_npmUser": { 50 | "name": "dougwilson", 51 | "email": "doug@somethingdoug.com" 52 | }, 53 | "maintainers": [ 54 | { 55 | "name": "dougwilson", 56 | "email": "doug@somethingdoug.com" 57 | } 58 | ], 59 | "dist": { 60 | "shasum": "87476c6a67c8daa87e32e87616df883ba7fb071b", 61 | "tarball": "http://registry.npmjs.org/content-disposition/-/content-disposition-0.5.1.tgz" 62 | }, 63 | "directories": {}, 64 | "_resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.1.tgz", 65 | "readme": "ERROR: No README data found!" 66 | } 67 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/content-type/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.1 / 2015-02-13 2 | ================== 3 | 4 | * Improve missing `Content-Type` header error message 5 | 6 | 1.0.0 / 2015-02-01 7 | ================== 8 | 9 | * Initial implementation, derived from `media-typer@0.3.0` 10 | -------------------------------------------------------------------------------- /node_modules/express/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/express/node_modules/content-type/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "content-type", 3 | "description": "Create and parse HTTP Content-Type header", 4 | "version": "1.0.1", 5 | "author": { 6 | "name": "Douglas Christopher Wilson", 7 | "email": "doug@somethingdoug.com" 8 | }, 9 | "license": "MIT", 10 | "keywords": [ 11 | "content-type", 12 | "http", 13 | "req", 14 | "res", 15 | "rfc7231" 16 | ], 17 | "repository": { 18 | "type": "git", 19 | "url": "git+https://github.com/jshttp/content-type.git" 20 | }, 21 | "devDependencies": { 22 | "istanbul": "0.3.5", 23 | "mocha": "~1.21.5" 24 | }, 25 | "files": [ 26 | "LICENSE", 27 | "HISTORY.md", 28 | "README.md", 29 | "index.js" 30 | ], 31 | "engines": { 32 | "node": ">= 0.6" 33 | }, 34 | "scripts": { 35 | "test": "mocha --reporter spec --check-leaks --bail test/", 36 | "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", 37 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" 38 | }, 39 | "gitHead": "3aa58f9c5a358a3634b8601602177888b4a477d8", 40 | "bugs": { 41 | "url": "https://github.com/jshttp/content-type/issues" 42 | }, 43 | "homepage": "https://github.com/jshttp/content-type", 44 | "_id": "content-type@1.0.1", 45 | "_shasum": "a19d2247327dc038050ce622b7a154ec59c5e600", 46 | "_from": "content-type@>=1.0.1 <1.1.0", 47 | "_npmVersion": "1.4.28", 48 | "_npmUser": { 49 | "name": "dougwilson", 50 | "email": "doug@somethingdoug.com" 51 | }, 52 | "maintainers": [ 53 | { 54 | "name": "dougwilson", 55 | "email": "doug@somethingdoug.com" 56 | } 57 | ], 58 | "dist": { 59 | "shasum": "a19d2247327dc038050ce622b7a154ec59c5e600", 60 | "tarball": "http://registry.npmjs.org/content-type/-/content-type-1.0.1.tgz" 61 | }, 62 | "directories": {}, 63 | "_resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.1.tgz", 64 | "readme": "ERROR: No README data found!" 65 | } 66 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/cookie-signature/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | -------------------------------------------------------------------------------- /node_modules/express/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/express/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/express/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/express/node_modules/cookie-signature/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cookie-signature", 3 | "version": "1.0.6", 4 | "description": "Sign and unsign cookies", 5 | "keywords": [ 6 | "cookie", 7 | "sign", 8 | "unsign" 9 | ], 10 | "author": { 11 | "name": "TJ Holowaychuk", 12 | "email": "tj@learnboost.com" 13 | }, 14 | "license": "MIT", 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/visionmedia/node-cookie-signature.git" 18 | }, 19 | "dependencies": {}, 20 | "devDependencies": { 21 | "mocha": "*", 22 | "should": "*" 23 | }, 24 | "scripts": { 25 | "test": "mocha --require should --reporter spec" 26 | }, 27 | "main": "index", 28 | "gitHead": "391b56cf44d88c493491b7e3fc53208cfb976d2a", 29 | "bugs": { 30 | "url": "https://github.com/visionmedia/node-cookie-signature/issues" 31 | }, 32 | "homepage": "https://github.com/visionmedia/node-cookie-signature", 33 | "_id": "cookie-signature@1.0.6", 34 | "_shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c", 35 | "_from": "cookie-signature@1.0.6", 36 | "_npmVersion": "2.3.0", 37 | "_nodeVersion": "0.10.36", 38 | "_npmUser": { 39 | "name": "natevw", 40 | "email": "natevw@yahoo.com" 41 | }, 42 | "maintainers": [ 43 | { 44 | "name": "tjholowaychuk", 45 | "email": "tj@vision-media.ca" 46 | }, 47 | { 48 | "name": "natevw", 49 | "email": "natevw@yahoo.com" 50 | } 51 | ], 52 | "dist": { 53 | "shasum": "e303a882b342cc3ee8ca513a79999734dab3ae2c", 54 | "tarball": "http://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" 55 | }, 56 | "directories": {}, 57 | "_resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 58 | "readme": "ERROR: No README data found!" 59 | } 60 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/cookie/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.1.5 / 2015-09-17 2 | ================== 3 | 4 | * Fix regression when setting empty cookie value 5 | - Ease the new restriction, which is just basic header-level validation 6 | * Fix typo in invalid value errors 7 | 8 | 0.1.4 / 2015-09-17 9 | ================== 10 | 11 | * Throw better error for invalid argument to parse 12 | * Throw on invalid values provided to `serialize` 13 | - Ensures the resulting string is a valid HTTP header value 14 | 15 | 0.1.3 / 2015-05-19 16 | ================== 17 | 18 | * Reduce the scope of try-catch deopt 19 | * Remove argument reassignments 20 | 21 | 0.1.2 / 2014-04-16 22 | ================== 23 | 24 | * Remove unnecessary files from npm package 25 | 26 | 0.1.1 / 2014-02-23 27 | ================== 28 | 29 | * Fix bad parse when cookie value contained a comma 30 | * Fix support for `maxAge` of `0` 31 | 32 | 0.1.0 / 2013-05-01 33 | ================== 34 | 35 | * Add `decode` option 36 | * Add `encode` option 37 | 38 | 0.0.6 / 2013-04-08 39 | ================== 40 | 41 | * Ignore cookie parts missing `=` 42 | 43 | 0.0.5 / 2012-10-29 44 | ================== 45 | 46 | * Return raw cookie value if value unescape errors 47 | 48 | 0.0.4 / 2012-06-21 49 | ================== 50 | 51 | * Use encode/decodeURIComponent for cookie encoding/decoding 52 | - Improve server/client interoperability 53 | 54 | 0.0.3 / 2012-06-06 55 | ================== 56 | 57 | * Only escape special characters per the cookie RFC 58 | 59 | 0.0.2 / 2012-06-01 60 | ================== 61 | 62 | * Fix `maxAge` option to not throw error 63 | 64 | 0.0.1 / 2012-05-28 65 | ================== 66 | 67 | * Add more tests 68 | 69 | 0.0.0 / 2012-05-28 70 | ================== 71 | 72 | * Initial release 73 | -------------------------------------------------------------------------------- /node_modules/express/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/express/node_modules/cookie/README.md: -------------------------------------------------------------------------------- 1 | # cookie 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 | cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers. 10 | 11 | See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies. 12 | 13 | ## how? 14 | 15 | ``` 16 | npm install cookie 17 | ``` 18 | 19 | ```javascript 20 | var cookie = require('cookie'); 21 | 22 | var hdr = cookie.serialize('foo', 'bar'); 23 | // hdr = 'foo=bar'; 24 | 25 | var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff'); 26 | // cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' }; 27 | ``` 28 | 29 | ## more 30 | 31 | The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values. 32 | 33 | ### path 34 | > cookie path 35 | 36 | ### expires 37 | > absolute expiration date for the cookie (Date object) 38 | 39 | ### maxAge 40 | > relative max age of the cookie from when the client receives it (seconds) 41 | 42 | ### domain 43 | > domain for the cookie 44 | 45 | ### secure 46 | > true or false 47 | 48 | ### httpOnly 49 | > true or false 50 | 51 | ## License 52 | 53 | [MIT](LICENSE) 54 | 55 | [npm-image]: https://img.shields.io/npm/v/cookie.svg 56 | [npm-url]: https://npmjs.org/package/cookie 57 | [node-version-image]: https://img.shields.io/node/v/cookie.svg 58 | [node-version-url]: http://nodejs.org/download/ 59 | [travis-image]: https://img.shields.io/travis/jshttp/cookie/master.svg 60 | [travis-url]: https://travis-ci.org/jshttp/cookie 61 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/cookie/master.svg 62 | [coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master 63 | [downloads-image]: https://img.shields.io/npm/dm/cookie.svg 64 | [downloads-url]: https://npmjs.org/package/cookie 65 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/cookie/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cookie", 3 | "description": "cookie parsing and serialization", 4 | "version": "0.1.5", 5 | "author": { 6 | "name": "Roman Shtylman", 7 | "email": "shtylman@gmail.com" 8 | }, 9 | "contributors": [ 10 | { 11 | "name": "Douglas Christopher Wilson", 12 | "email": "doug@somethingdoug.com" 13 | } 14 | ], 15 | "license": "MIT", 16 | "keywords": [ 17 | "cookie", 18 | "cookies" 19 | ], 20 | "repository": { 21 | "type": "git", 22 | "url": "https://github.com/jshttp/cookie" 23 | }, 24 | "devDependencies": { 25 | "istanbul": "0.3.20", 26 | "mocha": "1.21.5" 27 | }, 28 | "files": [ 29 | "HISTORY.md", 30 | "LICENSE", 31 | "README.md", 32 | "index.js" 33 | ], 34 | "engines": { 35 | "node": ">= 0.6" 36 | }, 37 | "scripts": { 38 | "test": "mocha --reporter spec --bail --check-leaks test/", 39 | "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", 40 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" 41 | }, 42 | "gitHead": "0dfc4876575cef2609cdc1082fccf832743822c2", 43 | "bugs": { 44 | "url": "https://github.com/jshttp/cookie/issues" 45 | }, 46 | "homepage": "https://github.com/jshttp/cookie", 47 | "_id": "cookie@0.1.5", 48 | "_shasum": "6ab9948a4b1ae21952cd2588530a4722d4044d7c", 49 | "_from": "cookie@0.1.5", 50 | "_npmVersion": "1.4.28", 51 | "_npmUser": { 52 | "name": "dougwilson", 53 | "email": "doug@somethingdoug.com" 54 | }, 55 | "maintainers": [ 56 | { 57 | "name": "defunctzombie", 58 | "email": "shtylman@gmail.com" 59 | }, 60 | { 61 | "name": "dougwilson", 62 | "email": "doug@somethingdoug.com" 63 | }, 64 | { 65 | "name": "jongleberry", 66 | "email": "jonathanrichardong@gmail.com" 67 | } 68 | ], 69 | "dist": { 70 | "shasum": "6ab9948a4b1ae21952cd2588530a4722d4044d7c", 71 | "tarball": "https://registry.npmjs.org/cookie/-/cookie-0.1.5.tgz" 72 | }, 73 | "directories": {}, 74 | "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.5.tgz" 75 | } 76 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "laxbreak": true 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/Makefile: -------------------------------------------------------------------------------- 1 | 2 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773 3 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) 4 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) 5 | 6 | # BIN directory 7 | BIN := $(THIS_DIR)/node_modules/.bin 8 | 9 | # applications 10 | NODE ?= $(shell which node) 11 | NPM ?= $(NODE) $(shell which npm) 12 | BROWSERIFY ?= $(NODE) $(BIN)/browserify 13 | 14 | all: dist/debug.js 15 | 16 | install: node_modules 17 | 18 | clean: 19 | @rm -rf dist 20 | 21 | dist: 22 | @mkdir -p $@ 23 | 24 | dist/debug.js: node_modules browser.js debug.js dist 25 | @$(BROWSERIFY) \ 26 | --standalone debug \ 27 | . > $@ 28 | 29 | distclean: clean 30 | @rm -rf node_modules 31 | 32 | node_modules: package.json 33 | @NODE_ENV= $(NPM) install 34 | @touch node_modules 35 | 36 | .PHONY: all install clean distclean 37 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "visionmedia-debug", 3 | "main": "dist/debug.js", 4 | "version": "2.2.0", 5 | "homepage": "https://github.com/visionmedia/debug", 6 | "authors": [ 7 | "TJ Holowaychuk " 8 | ], 9 | "description": "visionmedia-debug", 10 | "moduleType": [ 11 | "amd", 12 | "es6", 13 | "globals", 14 | "node" 15 | ], 16 | "keywords": [ 17 | "visionmedia", 18 | "debug" 19 | ], 20 | "license": "MIT", 21 | "ignore": [ 22 | "**/.*", 23 | "node_modules", 24 | "bower_components", 25 | "test", 26 | "tests" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "repo": "visionmedia/debug", 4 | "description": "small debugging utility", 5 | "version": "2.2.0", 6 | "keywords": [ 7 | "debug", 8 | "log", 9 | "debugger" 10 | ], 11 | "main": "browser.js", 12 | "scripts": [ 13 | "browser.js", 14 | "debug.js" 15 | ], 16 | "dependencies": { 17 | "rauchg/ms.js": "0.7.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/node_modules/ms/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | test 3 | History.md 4 | Makefile 5 | component.json 6 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/node_modules/ms/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.7.1 / 2015-04-20 3 | ================== 4 | 5 | * prevent extraordinary long inputs (@evilpacket) 6 | * Fixed broken readme link 7 | 8 | 0.7.0 / 2014-11-24 9 | ================== 10 | 11 | * add time abbreviations, updated tests and readme for the new units 12 | * fix example in the readme. 13 | * add LICENSE file 14 | 15 | 0.6.2 / 2013-12-05 16 | ================== 17 | 18 | * Adding repository section to package.json to suppress warning from NPM. 19 | 20 | 0.6.1 / 2013-05-10 21 | ================== 22 | 23 | * fix singularization [visionmedia] 24 | 25 | 0.6.0 / 2013-03-15 26 | ================== 27 | 28 | * fix minutes 29 | 30 | 0.5.1 / 2013-02-24 31 | ================== 32 | 33 | * add component namespace 34 | 35 | 0.5.0 / 2012-11-09 36 | ================== 37 | 38 | * add short formatting as default and .long option 39 | * add .license property to component.json 40 | * add version to component.json 41 | 42 | 0.4.0 / 2012-10-22 43 | ================== 44 | 45 | * add rounding to fix crazy decimals 46 | 47 | 0.3.0 / 2012-09-07 48 | ================== 49 | 50 | * fix `ms()` [visionmedia] 51 | 52 | 0.2.0 / 2012-09-03 53 | ================== 54 | 55 | * add component.json [visionmedia] 56 | * add days support [visionmedia] 57 | * add hours support [visionmedia] 58 | * add minutes support [visionmedia] 59 | * add seconds support [visionmedia] 60 | * add ms string support [visionmedia] 61 | * refactor tests to facilitate ms(number) [visionmedia] 62 | 63 | 0.1.0 / 2012-03-07 64 | ================== 65 | 66 | * Initial release 67 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/node_modules/ms/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Guillermo Rauch 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/express/node_modules/debug/node_modules/ms/README.md: -------------------------------------------------------------------------------- 1 | # ms.js: miliseconds conversion utility 2 | 3 | ```js 4 | ms('2 days') // 172800000 5 | ms('1d') // 86400000 6 | ms('10h') // 36000000 7 | ms('2.5 hrs') // 9000000 8 | ms('2h') // 7200000 9 | ms('1m') // 60000 10 | ms('5s') // 5000 11 | ms('100') // 100 12 | ``` 13 | 14 | ```js 15 | ms(60000) // "1m" 16 | ms(2 * 60000) // "2m" 17 | ms(ms('10 hours')) // "10h" 18 | ``` 19 | 20 | ```js 21 | ms(60000, { long: true }) // "1 minute" 22 | ms(2 * 60000, { long: true }) // "2 minutes" 23 | ms(ms('10 hours'), { long: true }) // "10 hours" 24 | ``` 25 | 26 | - Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download). 27 | - If a number is supplied to `ms`, a string with a unit is returned. 28 | - If a string that contains the number is supplied, it returns it as 29 | a number (e.g: it returns `100` for `'100'`). 30 | - If you pass a string with a number and a valid unit, the number of 31 | equivalent ms is returned. 32 | 33 | ## License 34 | 35 | MIT 36 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/node_modules/ms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms", 3 | "version": "0.7.1", 4 | "description": "Tiny ms conversion utility", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/guille/ms.js.git" 8 | }, 9 | "main": "./index", 10 | "devDependencies": { 11 | "mocha": "*", 12 | "expect.js": "*", 13 | "serve": "*" 14 | }, 15 | "component": { 16 | "scripts": { 17 | "ms/index.js": "index.js" 18 | } 19 | }, 20 | "gitHead": "713dcf26d9e6fd9dbc95affe7eff9783b7f1b909", 21 | "bugs": { 22 | "url": "https://github.com/guille/ms.js/issues" 23 | }, 24 | "homepage": "https://github.com/guille/ms.js", 25 | "_id": "ms@0.7.1", 26 | "scripts": {}, 27 | "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098", 28 | "_from": "ms@0.7.1", 29 | "_npmVersion": "2.7.5", 30 | "_nodeVersion": "0.12.2", 31 | "_npmUser": { 32 | "name": "rauchg", 33 | "email": "rauchg@gmail.com" 34 | }, 35 | "maintainers": [ 36 | { 37 | "name": "rauchg", 38 | "email": "rauchg@gmail.com" 39 | } 40 | ], 41 | "dist": { 42 | "shasum": "9cd13c03adbff25b65effde7ce864ee952017098", 43 | "tarball": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" 44 | }, 45 | "directories": {}, 46 | "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" 47 | } 48 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/debug/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "version": "2.2.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "git://github.com/visionmedia/debug.git" 7 | }, 8 | "description": "small debugging utility", 9 | "keywords": [ 10 | "debug", 11 | "log", 12 | "debugger" 13 | ], 14 | "author": { 15 | "name": "TJ Holowaychuk", 16 | "email": "tj@vision-media.ca" 17 | }, 18 | "contributors": [ 19 | { 20 | "name": "Nathan Rajlich", 21 | "email": "nathan@tootallnate.net", 22 | "url": "http://n8.io" 23 | } 24 | ], 25 | "license": "MIT", 26 | "dependencies": { 27 | "ms": "0.7.1" 28 | }, 29 | "devDependencies": { 30 | "browserify": "9.0.3", 31 | "mocha": "*" 32 | }, 33 | "main": "./node.js", 34 | "browser": "./browser.js", 35 | "component": { 36 | "scripts": { 37 | "debug/index.js": "browser.js", 38 | "debug/debug.js": "debug.js" 39 | } 40 | }, 41 | "gitHead": "b38458422b5aa8aa6d286b10dfe427e8a67e2b35", 42 | "bugs": { 43 | "url": "https://github.com/visionmedia/debug/issues" 44 | }, 45 | "homepage": "https://github.com/visionmedia/debug", 46 | "_id": "debug@2.2.0", 47 | "scripts": {}, 48 | "_shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da", 49 | "_from": "debug@>=2.2.0 <2.3.0", 50 | "_npmVersion": "2.7.4", 51 | "_nodeVersion": "0.12.2", 52 | "_npmUser": { 53 | "name": "tootallnate", 54 | "email": "nathan@tootallnate.net" 55 | }, 56 | "maintainers": [ 57 | { 58 | "name": "tjholowaychuk", 59 | "email": "tj@vision-media.ca" 60 | }, 61 | { 62 | "name": "tootallnate", 63 | "email": "nathan@tootallnate.net" 64 | } 65 | ], 66 | "dist": { 67 | "shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da", 68 | "tarball": "http://registry.npmjs.org/debug/-/debug-2.2.0.tgz" 69 | }, 70 | "directories": {}, 71 | "_resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", 72 | "readme": "ERROR: No README data found!" 73 | } 74 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/depd/History.md: -------------------------------------------------------------------------------- 1 | 1.1.0 / 2015-09-14 2 | ================== 3 | 4 | * Enable strict mode in more places 5 | * Support io.js 3.x 6 | * Support io.js 2.x 7 | * Support web browser loading 8 | - Requires bundler like Browserify or webpack 9 | 10 | 1.0.1 / 2015-04-07 11 | ================== 12 | 13 | * Fix `TypeError`s when under `'use strict'` code 14 | * Fix useless type name on auto-generated messages 15 | * Support io.js 1.x 16 | * Support Node.js 0.12 17 | 18 | 1.0.0 / 2014-09-17 19 | ================== 20 | 21 | * No changes 22 | 23 | 0.4.5 / 2014-09-09 24 | ================== 25 | 26 | * Improve call speed to functions using the function wrapper 27 | * Support Node.js 0.6 28 | 29 | 0.4.4 / 2014-07-27 30 | ================== 31 | 32 | * Work-around v8 generating empty stack traces 33 | 34 | 0.4.3 / 2014-07-26 35 | ================== 36 | 37 | * Fix exception when global `Error.stackTraceLimit` is too low 38 | 39 | 0.4.2 / 2014-07-19 40 | ================== 41 | 42 | * Correct call site for wrapped functions and properties 43 | 44 | 0.4.1 / 2014-07-19 45 | ================== 46 | 47 | * Improve automatic message generation for function properties 48 | 49 | 0.4.0 / 2014-07-19 50 | ================== 51 | 52 | * Add `TRACE_DEPRECATION` environment variable 53 | * Remove non-standard grey color from color output 54 | * Support `--no-deprecation` argument 55 | * Support `--trace-deprecation` argument 56 | * Support `deprecate.property(fn, prop, message)` 57 | 58 | 0.3.0 / 2014-06-16 59 | ================== 60 | 61 | * Add `NO_DEPRECATION` environment variable 62 | 63 | 0.2.0 / 2014-06-15 64 | ================== 65 | 66 | * Add `deprecate.property(obj, prop, message)` 67 | * Remove `supports-color` dependency for node.js 0.8 68 | 69 | 0.1.0 / 2014-06-15 70 | ================== 71 | 72 | * Add `deprecate.function(fn, message)` 73 | * Add `process.on('deprecation', fn)` emitter 74 | * Automatically generate message when omitted from `deprecate()` 75 | 76 | 0.0.1 / 2014-06-15 77 | ================== 78 | 79 | * Fix warning for dynamic calls at singe call site 80 | 81 | 0.0.0 / 2014-06-15 82 | ================== 83 | 84 | * Initial implementation 85 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/depd/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-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/express/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 | return 79 | } 80 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/depd/lib/compat/buffer-concat.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * depd 3 | * Copyright(c) 2014 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict' 8 | 9 | /** 10 | * Module exports. 11 | */ 12 | 13 | module.exports = bufferConcat 14 | 15 | /** 16 | * Concatenate an array of Buffers. 17 | */ 18 | 19 | function bufferConcat(bufs) { 20 | var length = 0 21 | 22 | for (var i = 0, len = bufs.length; i < len; i++) { 23 | length += bufs[i].length 24 | } 25 | 26 | var buf = new Buffer(length) 27 | var pos = 0 28 | 29 | for (var i = 0, len = bufs.length; i < len; i++) { 30 | bufs[i].copy(buf, pos) 31 | pos += bufs[i].length 32 | } 33 | 34 | return buf 35 | } 36 | -------------------------------------------------------------------------------- /node_modules/express/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/express/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 Buffer = require('buffer') 15 | var EventEmitter = require('events').EventEmitter 16 | 17 | /** 18 | * Module exports. 19 | * @public 20 | */ 21 | 22 | lazyProperty(module.exports, 'bufferConcat', function bufferConcat() { 23 | return Buffer.concat || require('./buffer-concat') 24 | }) 25 | 26 | lazyProperty(module.exports, 'callSiteToString', function callSiteToString() { 27 | var limit = Error.stackTraceLimit 28 | var obj = {} 29 | var prep = Error.prepareStackTrace 30 | 31 | function prepareObjectStackTrace(obj, stack) { 32 | return stack 33 | } 34 | 35 | Error.prepareStackTrace = prepareObjectStackTrace 36 | Error.stackTraceLimit = 2 37 | 38 | // capture the stack 39 | Error.captureStackTrace(obj) 40 | 41 | // slice the stack 42 | var stack = obj.stack.slice() 43 | 44 | Error.prepareStackTrace = prep 45 | Error.stackTraceLimit = limit 46 | 47 | return stack[0].toString ? toString : require('./callsite-tostring') 48 | }) 49 | 50 | lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount() { 51 | return EventEmitter.listenerCount || require('./event-listener-count') 52 | }) 53 | 54 | /** 55 | * Define a lazy property. 56 | */ 57 | 58 | function lazyProperty(obj, prop, getter) { 59 | function get() { 60 | var val = getter() 61 | 62 | Object.defineProperty(obj, prop, { 63 | configurable: true, 64 | enumerable: true, 65 | value: val 66 | }) 67 | 68 | return val 69 | } 70 | 71 | Object.defineProperty(obj, prop, { 72 | configurable: true, 73 | enumerable: true, 74 | get: get 75 | }) 76 | } 77 | 78 | /** 79 | * Call toString() on the obj 80 | */ 81 | 82 | function toString(obj) { 83 | return obj.toString() 84 | } 85 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/depd/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "depd", 3 | "description": "Deprecate all the things", 4 | "version": "1.1.0", 5 | "author": { 6 | "name": "Douglas Christopher Wilson", 7 | "email": "doug@somethingdoug.com" 8 | }, 9 | "license": "MIT", 10 | "keywords": [ 11 | "deprecate", 12 | "deprecated" 13 | ], 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/dougwilson/nodejs-depd.git" 17 | }, 18 | "browser": "lib/browser/index.js", 19 | "devDependencies": { 20 | "benchmark": "1.0.0", 21 | "beautify-benchmark": "0.2.4", 22 | "istanbul": "0.3.5", 23 | "mocha": "~1.21.5" 24 | }, 25 | "files": [ 26 | "lib/", 27 | "History.md", 28 | "LICENSE", 29 | "index.js", 30 | "Readme.md" 31 | ], 32 | "engines": { 33 | "node": ">= 0.6" 34 | }, 35 | "scripts": { 36 | "bench": "node benchmark/index.js", 37 | "test": "mocha --reporter spec --bail test/", 38 | "test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --no-exit test/", 39 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/" 40 | }, 41 | "gitHead": "78c659de20283e3a6bee92bda455e6daff01686a", 42 | "bugs": { 43 | "url": "https://github.com/dougwilson/nodejs-depd/issues" 44 | }, 45 | "homepage": "https://github.com/dougwilson/nodejs-depd", 46 | "_id": "depd@1.1.0", 47 | "_shasum": "e1bd82c6aab6ced965b97b88b17ed3e528ca18c3", 48 | "_from": "depd@>=1.1.0 <1.2.0", 49 | "_npmVersion": "1.4.28", 50 | "_npmUser": { 51 | "name": "dougwilson", 52 | "email": "doug@somethingdoug.com" 53 | }, 54 | "maintainers": [ 55 | { 56 | "name": "dougwilson", 57 | "email": "doug@somethingdoug.com" 58 | } 59 | ], 60 | "dist": { 61 | "shasum": "e1bd82c6aab6ced965b97b88b17ed3e528ca18c3", 62 | "tarball": "http://registry.npmjs.org/depd/-/depd-1.1.0.tgz" 63 | }, 64 | "directories": {}, 65 | "_resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", 66 | "readme": "ERROR: No README data found!" 67 | } 68 | -------------------------------------------------------------------------------- /node_modules/express/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/express/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/express/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/express/node_modules/escape-html/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "escape-html", 3 | "description": "Escape string for use in HTML", 4 | "version": "1.0.3", 5 | "license": "MIT", 6 | "keywords": [ 7 | "escape", 8 | "html", 9 | "utility" 10 | ], 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/component/escape-html.git" 14 | }, 15 | "devDependencies": { 16 | "benchmark": "1.0.0", 17 | "beautify-benchmark": "0.2.4" 18 | }, 19 | "files": [ 20 | "LICENSE", 21 | "Readme.md", 22 | "index.js" 23 | ], 24 | "scripts": { 25 | "bench": "node benchmark/index.js" 26 | }, 27 | "gitHead": "7ac2ea3977fcac3d4c5be8d2a037812820c65f28", 28 | "bugs": { 29 | "url": "https://github.com/component/escape-html/issues" 30 | }, 31 | "homepage": "https://github.com/component/escape-html", 32 | "_id": "escape-html@1.0.3", 33 | "_shasum": "0258eae4d3d0c0974de1c169188ef0051d1d1988", 34 | "_from": "escape-html@>=1.0.3 <1.1.0", 35 | "_npmVersion": "1.4.28", 36 | "_npmUser": { 37 | "name": "dougwilson", 38 | "email": "doug@somethingdoug.com" 39 | }, 40 | "maintainers": [ 41 | { 42 | "name": "tjholowaychuk", 43 | "email": "tj@vision-media.ca" 44 | }, 45 | { 46 | "name": "dougwilson", 47 | "email": "doug@somethingdoug.com" 48 | } 49 | ], 50 | "dist": { 51 | "shasum": "0258eae4d3d0c0974de1c169188ef0051d1d1988", 52 | "tarball": "http://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" 53 | }, 54 | "directories": {}, 55 | "_resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 56 | "readme": "ERROR: No README data found!" 57 | } 58 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/etag/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.7.0 / 2015-06-08 2 | ================== 3 | 4 | * Always include entity length in ETags for hash length extensions 5 | * Generate non-Stats ETags using MD5 only (no longer CRC32) 6 | * Improve stat performance by removing hashing 7 | * Remove base64 padding in ETags to shorten 8 | * Use MD5 instead of MD4 in weak ETags over 1KB 9 | 10 | 1.6.0 / 2015-05-10 11 | ================== 12 | 13 | * Improve support for JXcore 14 | * Remove requirement of `atime` in the stats object 15 | * Support "fake" stats objects in environments without `fs` 16 | 17 | 1.5.1 / 2014-11-19 18 | ================== 19 | 20 | * deps: crc@3.2.1 21 | - Minor fixes 22 | 23 | 1.5.0 / 2014-10-14 24 | ================== 25 | 26 | * Improve string performance 27 | * Slightly improve speed for weak ETags over 1KB 28 | 29 | 1.4.0 / 2014-09-21 30 | ================== 31 | 32 | * Support "fake" stats objects 33 | * Support Node.js 0.6 34 | 35 | 1.3.1 / 2014-09-14 36 | ================== 37 | 38 | * Use the (new and improved) `crc` for crc32 39 | 40 | 1.3.0 / 2014-08-29 41 | ================== 42 | 43 | * Default strings to strong ETags 44 | * Improve speed for weak ETags over 1KB 45 | 46 | 1.2.1 / 2014-08-29 47 | ================== 48 | 49 | * Use the (much faster) `buffer-crc32` for crc32 50 | 51 | 1.2.0 / 2014-08-24 52 | ================== 53 | 54 | * Add support for file stat objects 55 | 56 | 1.1.0 / 2014-08-24 57 | ================== 58 | 59 | * Add fast-path for empty entity 60 | * Add weak ETag generation 61 | * Shrink size of generated ETags 62 | 63 | 1.0.1 / 2014-08-24 64 | ================== 65 | 66 | * Fix behavior of string containing Unicode 67 | 68 | 1.0.0 / 2014-05-18 69 | ================== 70 | 71 | * Initial release 72 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/etag/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-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/express/node_modules/etag/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "etag", 3 | "description": "Create simple ETags", 4 | "version": "1.7.0", 5 | "contributors": [ 6 | { 7 | "name": "Douglas Christopher Wilson", 8 | "email": "doug@somethingdoug.com" 9 | }, 10 | { 11 | "name": "David Björklund", 12 | "email": "david.bjorklund@gmail.com" 13 | } 14 | ], 15 | "license": "MIT", 16 | "keywords": [ 17 | "etag", 18 | "http", 19 | "res" 20 | ], 21 | "repository": { 22 | "type": "git", 23 | "url": "git+https://github.com/jshttp/etag.git" 24 | }, 25 | "devDependencies": { 26 | "benchmark": "1.0.0", 27 | "beautify-benchmark": "0.2.4", 28 | "istanbul": "0.3.14", 29 | "mocha": "~1.21.4", 30 | "seedrandom": "2.3.11" 31 | }, 32 | "files": [ 33 | "LICENSE", 34 | "HISTORY.md", 35 | "README.md", 36 | "index.js" 37 | ], 38 | "engines": { 39 | "node": ">= 0.6" 40 | }, 41 | "scripts": { 42 | "bench": "node benchmark/index.js", 43 | "test": "mocha --reporter spec --bail --check-leaks test/", 44 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", 45 | "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" 46 | }, 47 | "gitHead": "a511f5c8c930fd9546dbd88acb080f96bc788cfc", 48 | "bugs": { 49 | "url": "https://github.com/jshttp/etag/issues" 50 | }, 51 | "homepage": "https://github.com/jshttp/etag", 52 | "_id": "etag@1.7.0", 53 | "_shasum": "03d30b5f67dd6e632d2945d30d6652731a34d5d8", 54 | "_from": "etag@>=1.7.0 <1.8.0", 55 | "_npmVersion": "1.4.28", 56 | "_npmUser": { 57 | "name": "dougwilson", 58 | "email": "doug@somethingdoug.com" 59 | }, 60 | "maintainers": [ 61 | { 62 | "name": "dougwilson", 63 | "email": "doug@somethingdoug.com" 64 | } 65 | ], 66 | "dist": { 67 | "shasum": "03d30b5f67dd6e632d2945d30d6652731a34d5d8", 68 | "tarball": "http://registry.npmjs.org/etag/-/etag-1.7.0.tgz" 69 | }, 70 | "directories": {}, 71 | "_resolved": "https://registry.npmjs.org/etag/-/etag-1.7.0.tgz", 72 | "readme": "ERROR: No README data found!" 73 | } 74 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/finalhandler/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-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/express/node_modules/finalhandler/node_modules/unpipe/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.0 / 2015-06-14 2 | ================== 3 | 4 | * Initial release 5 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/finalhandler/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/express/node_modules/finalhandler/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/express/node_modules/finalhandler/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/express/node_modules/finalhandler/node_modules/unpipe/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "unpipe", 3 | "description": "Unpipe a stream from all destinations", 4 | "version": "1.0.0", 5 | "author": { 6 | "name": "Douglas Christopher Wilson", 7 | "email": "doug@somethingdoug.com" 8 | }, 9 | "license": "MIT", 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/stream-utils/unpipe.git" 13 | }, 14 | "devDependencies": { 15 | "istanbul": "0.3.15", 16 | "mocha": "2.2.5", 17 | "readable-stream": "1.1.13" 18 | }, 19 | "files": [ 20 | "HISTORY.md", 21 | "LICENSE", 22 | "README.md", 23 | "index.js" 24 | ], 25 | "engines": { 26 | "node": ">= 0.8" 27 | }, 28 | "scripts": { 29 | "test": "mocha --reporter spec --bail --check-leaks test/", 30 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", 31 | "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" 32 | }, 33 | "gitHead": "d2df901c06487430e78dca62b6edb8bb2fc5e99d", 34 | "bugs": { 35 | "url": "https://github.com/stream-utils/unpipe/issues" 36 | }, 37 | "homepage": "https://github.com/stream-utils/unpipe", 38 | "_id": "unpipe@1.0.0", 39 | "_shasum": "b2bf4ee8514aae6165b4817829d21b2ef49904ec", 40 | "_from": "unpipe@>=1.0.0 <1.1.0", 41 | "_npmVersion": "1.4.28", 42 | "_npmUser": { 43 | "name": "dougwilson", 44 | "email": "doug@somethingdoug.com" 45 | }, 46 | "maintainers": [ 47 | { 48 | "name": "dougwilson", 49 | "email": "doug@somethingdoug.com" 50 | } 51 | ], 52 | "dist": { 53 | "shasum": "b2bf4ee8514aae6165b4817829d21b2ef49904ec", 54 | "tarball": "http://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" 55 | }, 56 | "directories": {}, 57 | "_resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 58 | "readme": "ERROR: No README data found!" 59 | } 60 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/fresh/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.3.0 / 2015-05-12 2 | ================== 3 | 4 | * Add weak `ETag` matching support 5 | 6 | 0.2.4 / 2014-09-07 7 | ================== 8 | 9 | * Support Node.js 0.6 10 | 11 | 0.2.3 / 2014-09-07 12 | ================== 13 | 14 | * Move repository to jshttp 15 | 16 | 0.2.2 / 2014-02-19 17 | ================== 18 | 19 | * Revert "Fix for blank page on Safari reload" 20 | 21 | 0.2.1 / 2014-01-29 22 | ================== 23 | 24 | * Fix for blank page on Safari reload 25 | 26 | 0.2.0 / 2013-08-11 27 | ================== 28 | 29 | * Return stale for `Cache-Control: no-cache` 30 | 31 | 0.1.0 / 2012-06-15 32 | ================== 33 | * Add `If-None-Match: *` support 34 | 35 | 0.0.1 / 2012-06-10 36 | ================== 37 | 38 | * Initial release 39 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/fresh/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 TJ Holowaychuk 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/node_modules/fresh/README.md: -------------------------------------------------------------------------------- 1 | # fresh 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 response freshness testing 10 | 11 | ## Installation 12 | 13 | ``` 14 | $ npm install fresh 15 | ``` 16 | 17 | ## API 18 | 19 | ```js 20 | var fresh = require('fresh') 21 | ``` 22 | 23 | ### fresh(req, res) 24 | 25 | Check freshness of `req` and `res` headers. 26 | 27 | When the cache is "fresh" __true__ is returned, 28 | otherwise __false__ is returned to indicate that 29 | the cache is now stale. 30 | 31 | ## Example 32 | 33 | ```js 34 | var req = { 'if-none-match': 'tobi' }; 35 | var res = { 'etag': 'luna' }; 36 | fresh(req, res); 37 | // => false 38 | 39 | var req = { 'if-none-match': 'tobi' }; 40 | var res = { 'etag': 'tobi' }; 41 | fresh(req, res); 42 | // => true 43 | ``` 44 | 45 | ## License 46 | 47 | [MIT](LICENSE) 48 | 49 | [npm-image]: https://img.shields.io/npm/v/fresh.svg 50 | [npm-url]: https://npmjs.org/package/fresh 51 | [node-version-image]: https://img.shields.io/node/v/fresh.svg 52 | [node-version-url]: http://nodejs.org/download/ 53 | [travis-image]: https://img.shields.io/travis/jshttp/fresh/master.svg 54 | [travis-url]: https://travis-ci.org/jshttp/fresh 55 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh/master.svg 56 | [coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master 57 | [downloads-image]: https://img.shields.io/npm/dm/fresh.svg 58 | [downloads-url]: https://npmjs.org/package/fresh 59 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/fresh/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Expose `fresh()`. 4 | */ 5 | 6 | module.exports = fresh; 7 | 8 | /** 9 | * Check freshness of `req` and `res` headers. 10 | * 11 | * When the cache is "fresh" __true__ is returned, 12 | * otherwise __false__ is returned to indicate that 13 | * the cache is now stale. 14 | * 15 | * @param {Object} req 16 | * @param {Object} res 17 | * @return {Boolean} 18 | * @api public 19 | */ 20 | 21 | function fresh(req, res) { 22 | // defaults 23 | var etagMatches = true; 24 | var notModified = true; 25 | 26 | // fields 27 | var modifiedSince = req['if-modified-since']; 28 | var noneMatch = req['if-none-match']; 29 | var lastModified = res['last-modified']; 30 | var etag = res['etag']; 31 | var cc = req['cache-control']; 32 | 33 | // unconditional request 34 | if (!modifiedSince && !noneMatch) return false; 35 | 36 | // check for no-cache cache request directive 37 | if (cc && cc.indexOf('no-cache') !== -1) return false; 38 | 39 | // parse if-none-match 40 | if (noneMatch) noneMatch = noneMatch.split(/ *, */); 41 | 42 | // if-none-match 43 | if (noneMatch) { 44 | etagMatches = noneMatch.some(function (match) { 45 | return match === '*' || match === etag || match === 'W/' + etag; 46 | }); 47 | } 48 | 49 | // if-modified-since 50 | if (modifiedSince) { 51 | modifiedSince = new Date(modifiedSince); 52 | lastModified = new Date(lastModified); 53 | notModified = lastModified <= modifiedSince; 54 | } 55 | 56 | return !! (etagMatches && notModified); 57 | } 58 | -------------------------------------------------------------------------------- /node_modules/express/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/express/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/express/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/express/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/express/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/express/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/express/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/express/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/express/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/express/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/express/node_modules/on-finished/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/express/node_modules/on-finished/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/express/node_modules/on-finished/node_modules/ee-first/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ee-first", 3 | "description": "return the first event in a set of ee/event pairs", 4 | "version": "1.1.1", 5 | "author": { 6 | "name": "Jonathan Ong", 7 | "email": "me@jongleberry.com", 8 | "url": "http://jongleberry.com" 9 | }, 10 | "contributors": [ 11 | { 12 | "name": "Douglas Christopher Wilson", 13 | "email": "doug@somethingdoug.com" 14 | } 15 | ], 16 | "license": "MIT", 17 | "repository": { 18 | "type": "git", 19 | "url": "git+https://github.com/jonathanong/ee-first.git" 20 | }, 21 | "devDependencies": { 22 | "istanbul": "0.3.9", 23 | "mocha": "2.2.5" 24 | }, 25 | "files": [ 26 | "index.js", 27 | "LICENSE" 28 | ], 29 | "scripts": { 30 | "test": "mocha --reporter spec --bail --check-leaks test/", 31 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", 32 | "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" 33 | }, 34 | "gitHead": "512e0ce4cc3643f603708f965a97b61b1a9c0441", 35 | "bugs": { 36 | "url": "https://github.com/jonathanong/ee-first/issues" 37 | }, 38 | "homepage": "https://github.com/jonathanong/ee-first", 39 | "_id": "ee-first@1.1.1", 40 | "_shasum": "590c61156b0ae2f4f0255732a158b266bc56b21d", 41 | "_from": "ee-first@1.1.1", 42 | "_npmVersion": "1.4.28", 43 | "_npmUser": { 44 | "name": "dougwilson", 45 | "email": "doug@somethingdoug.com" 46 | }, 47 | "maintainers": [ 48 | { 49 | "name": "jongleberry", 50 | "email": "jonathanrichardong@gmail.com" 51 | }, 52 | { 53 | "name": "dougwilson", 54 | "email": "doug@somethingdoug.com" 55 | } 56 | ], 57 | "dist": { 58 | "shasum": "590c61156b0ae2f4f0255732a158b266bc56b21d", 59 | "tarball": "http://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" 60 | }, 61 | "directories": {}, 62 | "_resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 63 | "readme": "ERROR: No README data found!" 64 | } 65 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/parseurl/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.3.1 / 2016-01-17 2 | ================== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.3.0 / 2014-08-09 7 | ================== 8 | 9 | * Add `parseurl.original` for parsing `req.originalUrl` with fallback 10 | * Return `undefined` if `req.url` is `undefined` 11 | 12 | 1.2.0 / 2014-07-21 13 | ================== 14 | 15 | * Cache URLs based on original value 16 | * Remove no-longer-needed URL mis-parse work-around 17 | * Simplify the "fast-path" `RegExp` 18 | 19 | 1.1.3 / 2014-07-08 20 | ================== 21 | 22 | * Fix typo 23 | 24 | 1.1.2 / 2014-07-08 25 | ================== 26 | 27 | * Seriously fix Node.js 0.8 compatibility 28 | 29 | 1.1.1 / 2014-07-08 30 | ================== 31 | 32 | * Fix Node.js 0.8 compatibility 33 | 34 | 1.1.0 / 2014-07-08 35 | ================== 36 | 37 | * Incorporate URL href-only parse fast-path 38 | 39 | 1.0.1 / 2014-03-08 40 | ================== 41 | 42 | * Add missing `require` 43 | 44 | 1.0.0 / 2014-03-08 45 | ================== 46 | 47 | * Genesis from `connect` 48 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/parseurl/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | (The MIT License) 3 | 4 | Copyright (c) 2014 Jonathan Ong 5 | Copyright (c) 2014 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/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/express/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/express/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/express/node_modules/proxy-addr/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.10 / 2015-12-09 2 | =================== 3 | 4 | * deps: ipaddr.js@1.0.5 5 | - Fix regression in `isValid` with non-string arguments 6 | 7 | 1.0.9 / 2015-12-01 8 | ================== 9 | 10 | * deps: ipaddr.js@1.0.4 11 | - Fix accepting some invalid IPv6 addresses 12 | - Reject CIDRs with negative or overlong masks 13 | * perf: enable strict mode 14 | 15 | 1.0.8 / 2015-05-10 16 | ================== 17 | 18 | * deps: ipaddr.js@1.0.1 19 | 20 | 1.0.7 / 2015-03-16 21 | ================== 22 | 23 | * deps: ipaddr.js@0.1.9 24 | - Fix OOM on certain inputs to `isValid` 25 | 26 | 1.0.6 / 2015-02-01 27 | ================== 28 | 29 | * deps: ipaddr.js@0.1.8 30 | 31 | 1.0.5 / 2015-01-08 32 | ================== 33 | 34 | * deps: ipaddr.js@0.1.6 35 | 36 | 1.0.4 / 2014-11-23 37 | ================== 38 | 39 | * deps: ipaddr.js@0.1.5 40 | - Fix edge cases with `isValid` 41 | 42 | 1.0.3 / 2014-09-21 43 | ================== 44 | 45 | * Use `forwarded` npm module 46 | 47 | 1.0.2 / 2014-09-18 48 | ================== 49 | 50 | * Fix a global leak when multiple subnets are trusted 51 | * Support Node.js 0.6 52 | * deps: ipaddr.js@0.1.3 53 | 54 | 1.0.1 / 2014-06-03 55 | ================== 56 | 57 | * Fix links in npm package 58 | 59 | 1.0.0 / 2014-05-08 60 | ================== 61 | 62 | * Add `trust` argument to determine proxy trust on 63 | * Accepts custom function 64 | * Accepts IPv4/IPv6 address(es) 65 | * Accepts subnets 66 | * Accepts pre-defined names 67 | * Add optional `trust` argument to `proxyaddr.all` to 68 | stop at first untrusted 69 | * Add `proxyaddr.compile` to pre-compile `trust` function 70 | to make subsequent calls faster 71 | 72 | 0.0.1 / 2014-05-04 73 | ================== 74 | 75 | * Fix bad npm publish 76 | 77 | 0.0.0 / 2014-05-04 78 | ================== 79 | 80 | * Initial release 81 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/proxy-addr/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/express/node_modules/proxy-addr/node_modules/forwarded/HISTORY.md: -------------------------------------------------------------------------------- 1 | 0.1.0 / 2014-09-21 2 | ================== 3 | 4 | * Initial release 5 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/proxy-addr/node_modules/forwarded/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/express/node_modules/proxy-addr/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 | ```sh 14 | $ npm install forwarded 15 | ``` 16 | 17 | ## API 18 | 19 | ```js 20 | var forwarded = require('forwarded') 21 | ``` 22 | 23 | ### forwarded(req) 24 | 25 | ```js 26 | var addresses = forwarded(req) 27 | ``` 28 | 29 | Parse the `X-Forwarded-For` header from the request. Returns an array 30 | of the addresses, including the socket address for the `req`. In reverse 31 | order (i.e. index `0` is the socket address and the last index is the 32 | furthest address, typically the end-user). 33 | 34 | ## Testing 35 | 36 | ```sh 37 | $ npm test 38 | ``` 39 | 40 | ## License 41 | 42 | [MIT](LICENSE) 43 | 44 | [npm-image]: https://img.shields.io/npm/v/forwarded.svg?style=flat 45 | [npm-url]: https://npmjs.org/package/forwarded 46 | [node-version-image]: https://img.shields.io/node/v/forwarded.svg?style=flat 47 | [node-version-url]: http://nodejs.org/download/ 48 | [travis-image]: https://img.shields.io/travis/jshttp/forwarded.svg?style=flat 49 | [travis-url]: https://travis-ci.org/jshttp/forwarded 50 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/forwarded.svg?style=flat 51 | [coveralls-url]: https://coveralls.io/r/jshttp/forwarded?branch=master 52 | [downloads-image]: https://img.shields.io/npm/dm/forwarded.svg?style=flat 53 | [downloads-url]: https://npmjs.org/package/forwarded 54 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/proxy-addr/node_modules/forwarded/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * forwarded 3 | * Copyright(c) 2014 Douglas Christopher Wilson 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | */ 10 | 11 | module.exports = forwarded 12 | 13 | /** 14 | * Get all addresses in the request, using the `X-Forwarded-For` header. 15 | * 16 | * @param {Object} req 17 | * @api public 18 | */ 19 | 20 | function forwarded(req) { 21 | if (!req) { 22 | throw new TypeError('argument req is required') 23 | } 24 | 25 | // simple header parsing 26 | var proxyAddrs = (req.headers['x-forwarded-for'] || '') 27 | .split(/ *, */) 28 | .filter(Boolean) 29 | .reverse() 30 | var socketAddr = req.connection.remoteAddress 31 | var addrs = [socketAddr].concat(proxyAddrs) 32 | 33 | // return all addresses 34 | return addrs 35 | } 36 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/proxy-addr/node_modules/forwarded/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "forwarded", 3 | "description": "Parse HTTP X-Forwarded-For header", 4 | "version": "0.1.0", 5 | "contributors": [ 6 | { 7 | "name": "Douglas Christopher Wilson", 8 | "email": "doug@somethingdoug.com" 9 | } 10 | ], 11 | "license": "MIT", 12 | "keywords": [ 13 | "x-forwarded-for", 14 | "http", 15 | "req" 16 | ], 17 | "repository": { 18 | "type": "git", 19 | "url": "git+https://github.com/jshttp/forwarded.git" 20 | }, 21 | "devDependencies": { 22 | "istanbul": "0.3.2", 23 | "mocha": "~1.21.4" 24 | }, 25 | "files": [ 26 | "LICENSE", 27 | "HISTORY.md", 28 | "README.md", 29 | "index.js" 30 | ], 31 | "engines": { 32 | "node": ">= 0.6" 33 | }, 34 | "scripts": { 35 | "test": "mocha --reporter spec --bail --check-leaks test/", 36 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", 37 | "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" 38 | }, 39 | "gitHead": "e9a9faeb3cfaadf40eb57d144fff26bca9b818e8", 40 | "bugs": { 41 | "url": "https://github.com/jshttp/forwarded/issues" 42 | }, 43 | "homepage": "https://github.com/jshttp/forwarded", 44 | "_id": "forwarded@0.1.0", 45 | "_shasum": "19ef9874c4ae1c297bcf078fde63a09b66a84363", 46 | "_from": "forwarded@>=0.1.0 <0.2.0", 47 | "_npmVersion": "1.4.21", 48 | "_npmUser": { 49 | "name": "dougwilson", 50 | "email": "doug@somethingdoug.com" 51 | }, 52 | "maintainers": [ 53 | { 54 | "name": "dougwilson", 55 | "email": "doug@somethingdoug.com" 56 | } 57 | ], 58 | "dist": { 59 | "shasum": "19ef9874c4ae1c297bcf078fde63a09b66a84363", 60 | "tarball": "http://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz" 61 | }, 62 | "directories": {}, 63 | "_resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", 64 | "readme": "ERROR: No README data found!" 65 | } 66 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/proxy-addr/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/express/node_modules/proxy-addr/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 the JavaScript files from CoffeeScript source', build = (cb) -> 7 | source = fs.readFileSync 'src/ipaddr.coffee' 8 | fs.writeFileSync 'lib/ipaddr.js', CoffeeScript.compile source.toString() 9 | 10 | invoke 'test' 11 | invoke 'compress' 12 | 13 | task 'test', 'run the bundled tests', (cb) -> 14 | nodeunit.reporters.default.run ['test'] 15 | 16 | task 'compress', 'uglify the resulting javascript', (cb) -> 17 | result = UglifyJS.minify('lib/ipaddr.js') 18 | fs.writeFileSync('ipaddr.min.js', result.code) 19 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 Peter Zotov 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. -------------------------------------------------------------------------------- /node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ipaddr.js", 3 | "version": "1.0.5", 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/express/node_modules/proxy-addr/node_modules/ipaddr.js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ipaddr.js", 3 | "description": "A library for manipulating IPv4 and IPv6 addresses in JavaScript.", 4 | "version": "1.0.5", 5 | "author": { 6 | "name": "whitequark", 7 | "email": "whitequark@whitequark.org" 8 | }, 9 | "directories": { 10 | "lib": "./lib" 11 | }, 12 | "dependencies": {}, 13 | "devDependencies": { 14 | "coffee-script": "~1.6", 15 | "nodeunit": ">=0.8.2 <0.8.7", 16 | "uglify-js": "latest" 17 | }, 18 | "scripts": { 19 | "test": "cake build test" 20 | }, 21 | "keywords": [ 22 | "ip", 23 | "ipv4", 24 | "ipv6" 25 | ], 26 | "repository": { 27 | "type": "git", 28 | "url": "git://github.com/whitequark/ipaddr.js.git" 29 | }, 30 | "main": "./lib/ipaddr", 31 | "engines": { 32 | "node": ">= 0.10" 33 | }, 34 | "license": "MIT", 35 | "gitHead": "46438c8bfa187505b7007a277f09a4a9e73d5686", 36 | "bugs": { 37 | "url": "https://github.com/whitequark/ipaddr.js/issues" 38 | }, 39 | "_id": "ipaddr.js@1.0.5", 40 | "_shasum": "5fa78cf301b825c78abc3042d812723049ea23c7", 41 | "_from": "ipaddr.js@1.0.5", 42 | "_npmVersion": "1.4.21", 43 | "_npmUser": { 44 | "name": "whitequark", 45 | "email": "whitequark@whitequark.org" 46 | }, 47 | "maintainers": [ 48 | { 49 | "name": "whitequark", 50 | "email": "whitequark@whitequark.org" 51 | } 52 | ], 53 | "dist": { 54 | "shasum": "5fa78cf301b825c78abc3042d812723049ea23c7", 55 | "tarball": "http://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.0.5.tgz" 56 | }, 57 | "_resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.0.5.tgz", 58 | "readme": "ERROR: No README data found!", 59 | "homepage": "https://github.com/whitequark/ipaddr.js#readme" 60 | } 61 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.iml 3 | npm-debug.log 4 | dump.rdb 5 | node_modules 6 | results.tap 7 | results.xml 8 | npm-shrinkwrap.json 9 | config.json 10 | .DS_Store 11 | */.DS_Store 12 | */*/.DS_Store 13 | ._* 14 | */._* 15 | */*/._* 16 | coverage.* 17 | lib-cov 18 | complexity.md 19 | dist 20 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - 0.10 5 | - 0.12 6 | - iojs 7 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md). 2 | -------------------------------------------------------------------------------- /node_modules/express/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/express/node_modules/qs/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "qs", 3 | "main": "dist/qs.js", 4 | "version": "3.0.0", 5 | "homepage": "https://github.com/hapijs/qs", 6 | "authors": [ 7 | "Nathan LaFreniere " 8 | ], 9 | "description": "A querystring parser that supports nesting and arrays, with a depth limit", 10 | "keywords": [ 11 | "querystring", 12 | "qs" 13 | ], 14 | "license": "BSD-3-Clause", 15 | "ignore": [ 16 | "**/.*", 17 | "node_modules", 18 | "bower_components", 19 | "test", 20 | "tests" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/lib/index.js: -------------------------------------------------------------------------------- 1 | // Load modules 2 | 3 | var Stringify = require('./stringify'); 4 | var Parse = require('./parse'); 5 | 6 | 7 | // Declare internals 8 | 9 | var internals = {}; 10 | 11 | 12 | module.exports = { 13 | stringify: Stringify, 14 | parse: Parse 15 | }; 16 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "qs", 3 | "version": "4.0.0", 4 | "description": "A querystring parser that supports nesting and arrays, with a depth limit", 5 | "homepage": "https://github.com/hapijs/qs", 6 | "main": "lib/index.js", 7 | "dependencies": {}, 8 | "devDependencies": { 9 | "browserify": "^10.2.1", 10 | "code": "1.x.x", 11 | "lab": "5.x.x" 12 | }, 13 | "scripts": { 14 | "test": "lab -a code -t 100 -L", 15 | "test-cov-html": "lab -a code -r html -o coverage.html", 16 | "dist": "browserify --standalone Qs lib/index.js > dist/qs.js" 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "git+https://github.com/hapijs/qs.git" 21 | }, 22 | "keywords": [ 23 | "querystring", 24 | "qs" 25 | ], 26 | "license": "BSD-3-Clause", 27 | "gitHead": "e573dd08eae6cce30d2202704691a102dfa3782a", 28 | "bugs": { 29 | "url": "https://github.com/hapijs/qs/issues" 30 | }, 31 | "_id": "qs@4.0.0", 32 | "_shasum": "c31d9b74ec27df75e543a86c78728ed8d4623607", 33 | "_from": "qs@4.0.0", 34 | "_npmVersion": "2.12.0", 35 | "_nodeVersion": "0.12.4", 36 | "_npmUser": { 37 | "name": "nlf", 38 | "email": "quitlahok@gmail.com" 39 | }, 40 | "dist": { 41 | "shasum": "c31d9b74ec27df75e543a86c78728ed8d4623607", 42 | "tarball": "http://registry.npmjs.org/qs/-/qs-4.0.0.tgz" 43 | }, 44 | "maintainers": [ 45 | { 46 | "name": "nlf", 47 | "email": "quitlahok@gmail.com" 48 | }, 49 | { 50 | "name": "hueniverse", 51 | "email": "eran@hueniverse.com" 52 | } 53 | ], 54 | "directories": {}, 55 | "_resolved": "https://registry.npmjs.org/qs/-/qs-4.0.0.tgz", 56 | "readme": "ERROR: No README data found!" 57 | } 58 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/qs/test/utils.js: -------------------------------------------------------------------------------- 1 | // Load modules 2 | 3 | var Code = require('code'); 4 | var Lab = require('lab'); 5 | var Utils = require('../lib/utils'); 6 | 7 | 8 | // Declare internals 9 | 10 | var internals = {}; 11 | 12 | 13 | // Test shortcuts 14 | 15 | var lab = exports.lab = Lab.script(); 16 | var expect = Code.expect; 17 | var describe = lab.experiment; 18 | var it = lab.test; 19 | 20 | 21 | describe('merge()', function () { 22 | 23 | it('can merge two objects with the same key', function (done) { 24 | 25 | expect(Utils.merge({ a: 'b' }, { a: 'c' })).to.deep.equal({ a: ['b', 'c'] }); 26 | done(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/range-parser/HISTORY.md: -------------------------------------------------------------------------------- 1 | unreleased 2 | ========== 3 | 4 | * perf: enable strict mode 5 | 6 | 1.0.2 / 2014-09-08 7 | ================== 8 | 9 | * Support Node.js 0.6 10 | 11 | 1.0.1 / 2014-09-07 12 | ================== 13 | 14 | * Move repository to jshttp 15 | 16 | 1.0.0 / 2013-12-11 17 | ================== 18 | 19 | * Add repository to package.json 20 | * Add MIT license 21 | 22 | 0.0.4 / 2012-06-17 23 | ================== 24 | 25 | * Change ret -1 for unsatisfiable and -2 when invalid 26 | 27 | 0.0.3 / 2012-06-17 28 | ================== 29 | 30 | * Fix last-byte-pos default to len - 1 31 | 32 | 0.0.2 / 2012-06-14 33 | ================== 34 | 35 | * Add `.type` 36 | 37 | 0.0.1 / 2012-06-11 38 | ================== 39 | 40 | * Initial release 41 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/range-parser/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012-2014 TJ Holowaychuk 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/node_modules/range-parser/README.md: -------------------------------------------------------------------------------- 1 | # range-parser 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 | Range header field parser. 10 | 11 | ## Installation 12 | 13 | ``` 14 | $ npm install range-parser 15 | ``` 16 | 17 | ## API 18 | 19 | ```js 20 | var parseRange = require('range-parser') 21 | ``` 22 | 23 | ### parseRange(size, header) 24 | 25 | Parse the given `header` string where `size` is the maximum size of the resource. 26 | An array of ranges will be returned or negative numbers indicating an error parsing. 27 | 28 | * `-2` signals a malformed header string 29 | * `-1` signals an invalid range 30 | 31 | ```js 32 | // parse header from request 33 | var range = parseRange(req.headers.range) 34 | 35 | // the type of the range 36 | if (range.type === 'bytes') { 37 | // the ranges 38 | range.forEach(function (r) { 39 | // do something with r.start and r.end 40 | }) 41 | } 42 | ``` 43 | 44 | ## License 45 | 46 | [MIT](LICENSE) 47 | 48 | [npm-image]: https://img.shields.io/npm/v/range-parser.svg 49 | [npm-url]: https://npmjs.org/package/range-parser 50 | [node-version-image]: https://img.shields.io/node/v/range-parser.svg 51 | [node-version-url]: http://nodejs.org/download/ 52 | [travis-image]: https://img.shields.io/travis/jshttp/range-parser.svg 53 | [travis-url]: https://travis-ci.org/jshttp/range-parser 54 | [coveralls-image]: https://img.shields.io/coveralls/jshttp/range-parser.svg 55 | [coveralls-url]: https://coveralls.io/r/jshttp/range-parser 56 | [downloads-image]: https://img.shields.io/npm/dm/range-parser.svg 57 | [downloads-url]: https://npmjs.org/package/range-parser 58 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/range-parser/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * range-parser 3 | * Copyright(c) 2012-2014 TJ Holowaychuk 4 | * MIT Licensed 5 | */ 6 | 7 | 'use strict'; 8 | 9 | /** 10 | * Module exports. 11 | * @public 12 | */ 13 | 14 | module.exports = rangeParser; 15 | 16 | /** 17 | * Parse "Range" header `str` relative to the given file `size`. 18 | * 19 | * @param {Number} size 20 | * @param {String} str 21 | * @return {Array} 22 | * @public 23 | */ 24 | 25 | function rangeParser(size, str) { 26 | var valid = true; 27 | var i = str.indexOf('='); 28 | 29 | if (-1 == i) return -2; 30 | 31 | var arr = str.slice(i + 1).split(',').map(function(range){ 32 | var range = range.split('-') 33 | , start = parseInt(range[0], 10) 34 | , end = parseInt(range[1], 10); 35 | 36 | // -nnn 37 | if (isNaN(start)) { 38 | start = size - end; 39 | end = size - 1; 40 | // nnn- 41 | } else if (isNaN(end)) { 42 | end = size - 1; 43 | } 44 | 45 | // limit last-byte-pos to current length 46 | if (end > size - 1) end = size - 1; 47 | 48 | // invalid 49 | if (isNaN(start) 50 | || isNaN(end) 51 | || start > end 52 | || start < 0) valid = false; 53 | 54 | return { 55 | start: start, 56 | end: end 57 | }; 58 | }); 59 | 60 | arr.type = str.slice(0, i); 61 | 62 | return valid ? arr : -1; 63 | } 64 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 TJ Holowaychuk 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/express/node_modules/send/node_modules/.bin/mime: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 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/express/node_modules/send/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/express/node_modules/send/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/express/node_modules/send/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/express/node_modules/send/node_modules/destroy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "destroy", 3 | "description": "destroy a stream if possible", 4 | "version": "1.0.4", 5 | "author": { 6 | "name": "Jonathan Ong", 7 | "email": "me@jongleberry.com", 8 | "url": "http://jongleberry.com" 9 | }, 10 | "contributors": [ 11 | { 12 | "name": "Douglas Christopher Wilson", 13 | "email": "doug@somethingdoug.com" 14 | } 15 | ], 16 | "license": "MIT", 17 | "repository": { 18 | "type": "git", 19 | "url": "git+https://github.com/stream-utils/destroy.git" 20 | }, 21 | "devDependencies": { 22 | "istanbul": "0.4.2", 23 | "mocha": "2.3.4" 24 | }, 25 | "scripts": { 26 | "test": "mocha --reporter spec", 27 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot", 28 | "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot" 29 | }, 30 | "files": [ 31 | "index.js", 32 | "LICENSE" 33 | ], 34 | "keywords": [ 35 | "stream", 36 | "streams", 37 | "destroy", 38 | "cleanup", 39 | "leak", 40 | "fd" 41 | ], 42 | "gitHead": "86edea01456f5fa1027f6a47250c34c713cbcc3b", 43 | "bugs": { 44 | "url": "https://github.com/stream-utils/destroy/issues" 45 | }, 46 | "homepage": "https://github.com/stream-utils/destroy", 47 | "_id": "destroy@1.0.4", 48 | "_shasum": "978857442c44749e4206613e37946205826abd80", 49 | "_from": "destroy@>=1.0.4 <1.1.0", 50 | "_npmVersion": "1.4.28", 51 | "_npmUser": { 52 | "name": "dougwilson", 53 | "email": "doug@somethingdoug.com" 54 | }, 55 | "maintainers": [ 56 | { 57 | "name": "jongleberry", 58 | "email": "jonathanrichardong@gmail.com" 59 | }, 60 | { 61 | "name": "dougwilson", 62 | "email": "doug@somethingdoug.com" 63 | } 64 | ], 65 | "dist": { 66 | "shasum": "978857442c44749e4206613e37946205826abd80", 67 | "tarball": "http://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz" 68 | }, 69 | "directories": {}, 70 | "_resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 71 | "readme": "ERROR: No README data found!" 72 | } 73 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/http-errors/HISTORY.md: -------------------------------------------------------------------------------- 1 | 2015-02-02 / 1.3.1 2 | ================== 3 | 4 | * Fix regression where status can be overwritten in `createError` `props` 5 | 6 | 2015-02-01 / 1.3.0 7 | ================== 8 | 9 | * Construct errors using defined constructors from `createError` 10 | * Fix error names that are not identifiers 11 | - `createError["I'mateapot"]` is now `createError.ImATeapot` 12 | * Set a meaningful `name` property on constructed errors 13 | 14 | 2014-12-09 / 1.2.8 15 | ================== 16 | 17 | * Fix stack trace from exported function 18 | * Remove `arguments.callee` usage 19 | 20 | 2014-10-14 / 1.2.7 21 | ================== 22 | 23 | * Remove duplicate line 24 | 25 | 2014-10-02 / 1.2.6 26 | ================== 27 | 28 | * Fix `expose` to be `true` for `ClientError` constructor 29 | 30 | 2014-09-28 / 1.2.5 31 | ================== 32 | 33 | * deps: statuses@1 34 | 35 | 2014-09-21 / 1.2.4 36 | ================== 37 | 38 | * Fix dependency version to work with old `npm`s 39 | 40 | 2014-09-21 / 1.2.3 41 | ================== 42 | 43 | * deps: statuses@~1.1.0 44 | 45 | 2014-09-21 / 1.2.2 46 | ================== 47 | 48 | * Fix publish error 49 | 50 | 2014-09-21 / 1.2.1 51 | ================== 52 | 53 | * Support Node.js 0.6 54 | * Use `inherits` instead of `util` 55 | 56 | 2014-09-09 / 1.2.0 57 | ================== 58 | 59 | * Fix the way inheriting functions 60 | * Support `expose` being provided in properties argument 61 | 62 | 2014-09-08 / 1.1.0 63 | ================== 64 | 65 | * Default status to 500 66 | * Support provided `error` to extend 67 | 68 | 2014-09-08 / 1.0.1 69 | ================== 70 | 71 | * Fix accepting string message 72 | 73 | 2014-09-08 / 1.0.0 74 | ================== 75 | 76 | * Initial release 77 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/http-errors/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/express/node_modules/send/node_modules/http-errors/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/express/node_modules/send/node_modules/http-errors/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/express/node_modules/send/node_modules/http-errors/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | module.exports = require('util').inherits 2 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/http-errors/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/express/node_modules/send/node_modules/http-errors/node_modules/inherits/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inherits", 3 | "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 4 | "version": "2.0.1", 5 | "keywords": [ 6 | "inheritance", 7 | "class", 8 | "klass", 9 | "oop", 10 | "object-oriented", 11 | "inherits", 12 | "browser", 13 | "browserify" 14 | ], 15 | "main": "./inherits.js", 16 | "browser": "./inherits_browser.js", 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/isaacs/inherits.git" 20 | }, 21 | "license": "ISC", 22 | "scripts": { 23 | "test": "node test" 24 | }, 25 | "bugs": { 26 | "url": "https://github.com/isaacs/inherits/issues" 27 | }, 28 | "_id": "inherits@2.0.1", 29 | "dist": { 30 | "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", 31 | "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" 32 | }, 33 | "_from": "inherits@>=2.0.1 <2.1.0", 34 | "_npmVersion": "1.3.8", 35 | "_npmUser": { 36 | "name": "isaacs", 37 | "email": "i@izs.me" 38 | }, 39 | "maintainers": [ 40 | { 41 | "name": "isaacs", 42 | "email": "i@izs.me" 43 | } 44 | ], 45 | "directories": {}, 46 | "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", 47 | "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", 48 | "readme": "ERROR: No README data found!", 49 | "homepage": "https://github.com/isaacs/inherits#readme" 50 | } 51 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/http-errors/node_modules/inherits/test.js: -------------------------------------------------------------------------------- 1 | var inherits = require('./inherits.js') 2 | var assert = require('assert') 3 | 4 | function test(c) { 5 | assert(c.constructor === Child) 6 | assert(c.constructor.super_ === Parent) 7 | assert(Object.getPrototypeOf(c) === Child.prototype) 8 | assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) 9 | assert(c instanceof Child) 10 | assert(c instanceof Parent) 11 | } 12 | 13 | function Child() { 14 | Parent.call(this) 15 | test(this) 16 | } 17 | 18 | function Parent() {} 19 | 20 | inherits(Child, Parent) 21 | 22 | var c = new Child 23 | test(c) 24 | 25 | console.log('ok') 26 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/mime/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/Word-Add-in-JS-Redact/0bd26ec735a47cccb613c5b56e2927597ac5665d/node_modules/express/node_modules/send/node_modules/mime/.npmignore -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/mime/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Benjamin Thomas, Robert Kieffer 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/express/node_modules/send/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/express/node_modules/send/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/express/node_modules/send/node_modules/mime/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Robert Kieffer", 4 | "email": "robert@broofa.com", 5 | "url": "http://github.com/broofa" 6 | }, 7 | "scripts": { 8 | "prepublish": "node build/build.js > types.json", 9 | "test": "node build/test.js" 10 | }, 11 | "bin": { 12 | "mime": "cli.js" 13 | }, 14 | "contributors": [ 15 | { 16 | "name": "Benjamin Thomas", 17 | "email": "benjamin@benjaminthomas.org", 18 | "url": "http://github.com/bentomas" 19 | } 20 | ], 21 | "description": "A comprehensive library for mime-type mapping", 22 | "licenses": [ 23 | { 24 | "type": "MIT", 25 | "url": "https://raw.github.com/broofa/node-mime/master/LICENSE" 26 | } 27 | ], 28 | "dependencies": {}, 29 | "devDependencies": { 30 | "mime-db": "^1.2.0" 31 | }, 32 | "keywords": [ 33 | "util", 34 | "mime" 35 | ], 36 | "main": "mime.js", 37 | "name": "mime", 38 | "repository": { 39 | "url": "https://github.com/broofa/node-mime", 40 | "type": "git" 41 | }, 42 | "version": "1.3.4", 43 | "gitHead": "1628f6e0187095009dcef4805c3a49706f137974", 44 | "bugs": { 45 | "url": "https://github.com/broofa/node-mime/issues" 46 | }, 47 | "homepage": "https://github.com/broofa/node-mime", 48 | "_id": "mime@1.3.4", 49 | "_shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53", 50 | "_from": "mime@1.3.4", 51 | "_npmVersion": "1.4.28", 52 | "_npmUser": { 53 | "name": "broofa", 54 | "email": "robert@broofa.com" 55 | }, 56 | "maintainers": [ 57 | { 58 | "name": "broofa", 59 | "email": "robert@broofa.com" 60 | }, 61 | { 62 | "name": "bentomas", 63 | "email": "benjamin@benjaminthomas.org" 64 | } 65 | ], 66 | "dist": { 67 | "shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53", 68 | "tarball": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz" 69 | }, 70 | "directories": {}, 71 | "_resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz" 72 | } 73 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/ms/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | test 3 | History.md 4 | Makefile 5 | component.json 6 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/ms/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.7.1 / 2015-04-20 3 | ================== 4 | 5 | * prevent extraordinary long inputs (@evilpacket) 6 | * Fixed broken readme link 7 | 8 | 0.7.0 / 2014-11-24 9 | ================== 10 | 11 | * add time abbreviations, updated tests and readme for the new units 12 | * fix example in the readme. 13 | * add LICENSE file 14 | 15 | 0.6.2 / 2013-12-05 16 | ================== 17 | 18 | * Adding repository section to package.json to suppress warning from NPM. 19 | 20 | 0.6.1 / 2013-05-10 21 | ================== 22 | 23 | * fix singularization [visionmedia] 24 | 25 | 0.6.0 / 2013-03-15 26 | ================== 27 | 28 | * fix minutes 29 | 30 | 0.5.1 / 2013-02-24 31 | ================== 32 | 33 | * add component namespace 34 | 35 | 0.5.0 / 2012-11-09 36 | ================== 37 | 38 | * add short formatting as default and .long option 39 | * add .license property to component.json 40 | * add version to component.json 41 | 42 | 0.4.0 / 2012-10-22 43 | ================== 44 | 45 | * add rounding to fix crazy decimals 46 | 47 | 0.3.0 / 2012-09-07 48 | ================== 49 | 50 | * fix `ms()` [visionmedia] 51 | 52 | 0.2.0 / 2012-09-03 53 | ================== 54 | 55 | * add component.json [visionmedia] 56 | * add days support [visionmedia] 57 | * add hours support [visionmedia] 58 | * add minutes support [visionmedia] 59 | * add seconds support [visionmedia] 60 | * add ms string support [visionmedia] 61 | * refactor tests to facilitate ms(number) [visionmedia] 62 | 63 | 0.1.0 / 2012-03-07 64 | ================== 65 | 66 | * Initial release 67 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/ms/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Guillermo Rauch 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/express/node_modules/send/node_modules/ms/README.md: -------------------------------------------------------------------------------- 1 | # ms.js: miliseconds conversion utility 2 | 3 | ```js 4 | ms('2 days') // 172800000 5 | ms('1d') // 86400000 6 | ms('10h') // 36000000 7 | ms('2.5 hrs') // 9000000 8 | ms('2h') // 7200000 9 | ms('1m') // 60000 10 | ms('5s') // 5000 11 | ms('100') // 100 12 | ``` 13 | 14 | ```js 15 | ms(60000) // "1m" 16 | ms(2 * 60000) // "2m" 17 | ms(ms('10 hours')) // "10h" 18 | ``` 19 | 20 | ```js 21 | ms(60000, { long: true }) // "1 minute" 22 | ms(2 * 60000, { long: true }) // "2 minutes" 23 | ms(ms('10 hours'), { long: true }) // "10 hours" 24 | ``` 25 | 26 | - Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download). 27 | - If a number is supplied to `ms`, a string with a unit is returned. 28 | - If a string that contains the number is supplied, it returns it as 29 | a number (e.g: it returns `100` for `'100'`). 30 | - If you pass a string with a number and a valid unit, the number of 31 | equivalent ms is returned. 32 | 33 | ## License 34 | 35 | MIT 36 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/ms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms", 3 | "version": "0.7.1", 4 | "description": "Tiny ms conversion utility", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/guille/ms.js.git" 8 | }, 9 | "main": "./index", 10 | "devDependencies": { 11 | "mocha": "*", 12 | "expect.js": "*", 13 | "serve": "*" 14 | }, 15 | "component": { 16 | "scripts": { 17 | "ms/index.js": "index.js" 18 | } 19 | }, 20 | "gitHead": "713dcf26d9e6fd9dbc95affe7eff9783b7f1b909", 21 | "bugs": { 22 | "url": "https://github.com/guille/ms.js/issues" 23 | }, 24 | "homepage": "https://github.com/guille/ms.js", 25 | "_id": "ms@0.7.1", 26 | "scripts": {}, 27 | "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098", 28 | "_from": "ms@0.7.1", 29 | "_npmVersion": "2.7.5", 30 | "_nodeVersion": "0.12.2", 31 | "_npmUser": { 32 | "name": "rauchg", 33 | "email": "rauchg@gmail.com" 34 | }, 35 | "maintainers": [ 36 | { 37 | "name": "rauchg", 38 | "email": "rauchg@gmail.com" 39 | } 40 | ], 41 | "dist": { 42 | "shasum": "9cd13c03adbff25b65effde7ce864ee952017098", 43 | "tarball": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" 44 | }, 45 | "directories": {}, 46 | "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" 47 | } 48 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/statuses/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/express/node_modules/send/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 | "422": "Unprocessable Entity", 44 | "423": "Locked", 45 | "424": "Failed Dependency", 46 | "425": "Unordered Collection", 47 | "426": "Upgrade Required", 48 | "428": "Precondition Required", 49 | "429": "Too Many Requests", 50 | "431": "Request Header Fields Too Large", 51 | "451": "Unavailable For Legal Reasons", 52 | "500": "Internal Server Error", 53 | "501": "Not Implemented", 54 | "502": "Bad Gateway", 55 | "503": "Service Unavailable", 56 | "504": "Gateway Timeout", 57 | "505": "HTTP Version Not Supported", 58 | "506": "Variant Also Negotiates", 59 | "507": "Insufficient Storage", 60 | "508": "Loop Detected", 61 | "509": "Bandwidth Limit Exceeded", 62 | "510": "Not Extended", 63 | "511": "Network Authentication Required" 64 | } -------------------------------------------------------------------------------- /node_modules/express/node_modules/send/node_modules/statuses/index.js: -------------------------------------------------------------------------------- 1 | 2 | var codes = require('./codes.json'); 3 | 4 | module.exports = status; 5 | 6 | // [Integer...] 7 | status.codes = Object.keys(codes).map(function (code) { 8 | code = ~~code; 9 | var msg = codes[code]; 10 | status[code] = msg; 11 | status[msg] = status[msg.toLowerCase()] = code; 12 | return code; 13 | }); 14 | 15 | // status codes for redirects 16 | status.redirect = { 17 | 300: true, 18 | 301: true, 19 | 302: true, 20 | 303: true, 21 | 305: true, 22 | 307: true, 23 | 308: true, 24 | }; 25 | 26 | // status codes for empty bodies 27 | status.empty = { 28 | 204: true, 29 | 205: true, 30 | 304: true, 31 | }; 32 | 33 | // status codes for when you should retry the request 34 | status.retry = { 35 | 502: true, 36 | 503: true, 37 | 504: true, 38 | }; 39 | 40 | function status(code) { 41 | if (typeof code === 'number') { 42 | if (!status[code]) throw new Error('invalid status code: ' + code); 43 | return code; 44 | } 45 | 46 | if (typeof code !== 'string') { 47 | throw new TypeError('code must be a number or string'); 48 | } 49 | 50 | // '403' 51 | var n = parseInt(code, 10) 52 | if (!isNaN(n)) { 53 | if (!status[n]) throw new Error('invalid status code: ' + n); 54 | return n; 55 | } 56 | 57 | n = status[code.toLowerCase()]; 58 | if (!n) throw new Error('invalid status message: "' + code + '"'); 59 | return n; 60 | } 61 | -------------------------------------------------------------------------------- /node_modules/express/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-2015 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/express/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/express/node_modules/type-is/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/express/node_modules/type-is/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/express/node_modules/type-is/node_modules/media-typer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "media-typer", 3 | "description": "Simple RFC 6838 media type parser and formatter", 4 | "version": "0.3.0", 5 | "author": { 6 | "name": "Douglas Christopher Wilson", 7 | "email": "doug@somethingdoug.com" 8 | }, 9 | "license": "MIT", 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/jshttp/media-typer.git" 13 | }, 14 | "devDependencies": { 15 | "istanbul": "0.3.2", 16 | "mocha": "~1.21.4", 17 | "should": "~4.0.4" 18 | }, 19 | "files": [ 20 | "LICENSE", 21 | "HISTORY.md", 22 | "index.js" 23 | ], 24 | "engines": { 25 | "node": ">= 0.6" 26 | }, 27 | "scripts": { 28 | "test": "mocha --reporter spec --check-leaks --bail test/", 29 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", 30 | "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" 31 | }, 32 | "gitHead": "d49d41ffd0bb5a0655fa44a59df2ec0bfc835b16", 33 | "bugs": { 34 | "url": "https://github.com/jshttp/media-typer/issues" 35 | }, 36 | "homepage": "https://github.com/jshttp/media-typer", 37 | "_id": "media-typer@0.3.0", 38 | "_shasum": "8710d7af0aa626f8fffa1ce00168545263255748", 39 | "_from": "media-typer@0.3.0", 40 | "_npmVersion": "1.4.21", 41 | "_npmUser": { 42 | "name": "dougwilson", 43 | "email": "doug@somethingdoug.com" 44 | }, 45 | "maintainers": [ 46 | { 47 | "name": "dougwilson", 48 | "email": "doug@somethingdoug.com" 49 | } 50 | ], 51 | "dist": { 52 | "shasum": "8710d7af0aa626f8fffa1ce00168545263255748", 53 | "tarball": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" 54 | }, 55 | "directories": {}, 56 | "_resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 57 | "readme": "ERROR: No README data found!" 58 | } 59 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/type-is/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/express/node_modules/type-is/node_modules/mime-types/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/express/node_modules/type-is/node_modules/mime-types/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/express/node_modules/utils-merge/.travis.yml: -------------------------------------------------------------------------------- 1 | language: "node_js" 2 | node_js: 3 | - "0.4" 4 | - "0.6" 5 | - "0.8" 6 | - "0.10" 7 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/utils-merge/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013 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/express/node_modules/utils-merge/README.md: -------------------------------------------------------------------------------- 1 | # utils-merge 2 | 3 | Merges the properties from a source object into a destination object. 4 | 5 | ## Install 6 | 7 | $ npm install utils-merge 8 | 9 | ## Usage 10 | 11 | ```javascript 12 | var a = { foo: 'bar' } 13 | , b = { bar: 'baz' }; 14 | 15 | merge(a, b); 16 | // => { foo: 'bar', bar: 'baz' } 17 | ``` 18 | 19 | ## Tests 20 | 21 | $ npm install 22 | $ npm test 23 | 24 | [![Build Status](https://secure.travis-ci.org/jaredhanson/utils-merge.png)](http://travis-ci.org/jaredhanson/utils-merge) 25 | 26 | ## Credits 27 | 28 | - [Jared Hanson](http://github.com/jaredhanson) 29 | 30 | ## License 31 | 32 | [The MIT License](http://opensource.org/licenses/MIT) 33 | 34 | Copyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)> 35 | -------------------------------------------------------------------------------- /node_modules/express/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/express/node_modules/utils-merge/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "utils-merge", 3 | "version": "1.0.0", 4 | "description": "merge() utility function", 5 | "keywords": [ 6 | "util" 7 | ], 8 | "repository": { 9 | "type": "git", 10 | "url": "git://github.com/jaredhanson/utils-merge.git" 11 | }, 12 | "bugs": { 13 | "url": "http://github.com/jaredhanson/utils-merge/issues" 14 | }, 15 | "author": { 16 | "name": "Jared Hanson", 17 | "email": "jaredhanson@gmail.com", 18 | "url": "http://www.jaredhanson.net/" 19 | }, 20 | "licenses": [ 21 | { 22 | "type": "MIT", 23 | "url": "http://www.opensource.org/licenses/MIT" 24 | } 25 | ], 26 | "main": "./index", 27 | "dependencies": {}, 28 | "devDependencies": { 29 | "mocha": "1.x.x", 30 | "chai": "1.x.x" 31 | }, 32 | "scripts": { 33 | "test": "mocha --reporter spec --require test/bootstrap/node test/*.test.js" 34 | }, 35 | "engines": { 36 | "node": ">= 0.4.0" 37 | }, 38 | "_id": "utils-merge@1.0.0", 39 | "dist": { 40 | "shasum": "0294fb922bb9375153541c4f7096231f287c8af8", 41 | "tarball": "http://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz" 42 | }, 43 | "_from": "utils-merge@1.0.0", 44 | "_npmVersion": "1.2.25", 45 | "_npmUser": { 46 | "name": "jaredhanson", 47 | "email": "jaredhanson@gmail.com" 48 | }, 49 | "maintainers": [ 50 | { 51 | "name": "jaredhanson", 52 | "email": "jaredhanson@gmail.com" 53 | } 54 | ], 55 | "directories": {}, 56 | "_shasum": "0294fb922bb9375153541c4f7096231f287c8af8", 57 | "_resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", 58 | "readme": "ERROR: No README data found!", 59 | "homepage": "https://github.com/jaredhanson/utils-merge#readme" 60 | } 61 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/vary/HISTORY.md: -------------------------------------------------------------------------------- 1 | 1.0.1 / 2015-07-08 2 | ================== 3 | 4 | * Fix setting empty header from empty `field` 5 | * perf: enable strict mode 6 | * perf: remove argument reassignments 7 | 8 | 1.0.0 / 2014-08-10 9 | ================== 10 | 11 | * Accept valid `Vary` header string as `field` 12 | * Add `vary.append` for low-level string manipulation 13 | * Move to `jshttp` orgainzation 14 | 15 | 0.1.0 / 2014-06-05 16 | ================== 17 | 18 | * Support array of fields to set 19 | 20 | 0.0.0 / 2014-06-04 21 | ================== 22 | 23 | * Initial release 24 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/vary/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014-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/express/node_modules/vary/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vary", 3 | "description": "Manipulate the HTTP Vary header", 4 | "version": "1.0.1", 5 | "author": { 6 | "name": "Douglas Christopher Wilson", 7 | "email": "doug@somethingdoug.com" 8 | }, 9 | "license": "MIT", 10 | "keywords": [ 11 | "http", 12 | "res", 13 | "vary" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/jshttp/vary.git" 18 | }, 19 | "devDependencies": { 20 | "istanbul": "0.3.17", 21 | "mocha": "2.2.5", 22 | "supertest": "1.0.1" 23 | }, 24 | "files": [ 25 | "HISTORY.md", 26 | "LICENSE", 27 | "README.md", 28 | "index.js" 29 | ], 30 | "engines": { 31 | "node": ">= 0.8" 32 | }, 33 | "scripts": { 34 | "test": "mocha --reporter spec --bail --check-leaks test/", 35 | "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", 36 | "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" 37 | }, 38 | "gitHead": "650282ff8e614731837040a23e10f51c20728392", 39 | "bugs": { 40 | "url": "https://github.com/jshttp/vary/issues" 41 | }, 42 | "homepage": "https://github.com/jshttp/vary", 43 | "_id": "vary@1.0.1", 44 | "_shasum": "99e4981566a286118dfb2b817357df7993376d10", 45 | "_from": "vary@>=1.0.1 <1.1.0", 46 | "_npmVersion": "1.4.28", 47 | "_npmUser": { 48 | "name": "dougwilson", 49 | "email": "doug@somethingdoug.com" 50 | }, 51 | "maintainers": [ 52 | { 53 | "name": "dougwilson", 54 | "email": "doug@somethingdoug.com" 55 | }, 56 | { 57 | "name": "jongleberry", 58 | "email": "jonathanrichardong@gmail.com" 59 | }, 60 | { 61 | "name": "fishrock123", 62 | "email": "fishrock123@rocketmail.com" 63 | } 64 | ], 65 | "dist": { 66 | "shasum": "99e4981566a286118dfb2b817357df7993376d10", 67 | "tarball": "http://registry.npmjs.org/vary/-/vary-1.0.1.tgz" 68 | }, 69 | "directories": {}, 70 | "_resolved": "https://registry.npmjs.org/vary/-/vary-1.0.1.tgz", 71 | "readme": "ERROR: No README data found!" 72 | } 73 | -------------------------------------------------------------------------------- /node_modules/path/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | Permission is hereby granted, free of charge, to any person obtaining a copy 3 | of this software and associated documentation files (the "Software"), to 4 | deal in the Software without restriction, including without limitation the 5 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 6 | sell copies of the Software, and to permit persons to whom the Software is 7 | furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in 10 | all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/path/README.md: -------------------------------------------------------------------------------- 1 | # path 2 | 3 | This is an exact copy of the NodeJS ’path’ module published to the NPM registry. 4 | 5 | [Documentation](http://nodejs.org/docs/latest/api/path.html) 6 | 7 | ## Install 8 | 9 | ```sh 10 | $ npm install --save path 11 | ``` 12 | 13 | ## License 14 | 15 | MIT 16 | -------------------------------------------------------------------------------- /node_modules/path/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Joyent", 4 | "url": "http://www.joyent.com" 5 | }, 6 | "name": "path", 7 | "description": "Node.JS path module", 8 | "keywords": [ 9 | "ender", 10 | "path" 11 | ], 12 | "license": "MIT", 13 | "version": "0.11.14", 14 | "homepage": "http://nodejs.org/docs/latest/api/path.html", 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/jinder/path.git" 18 | }, 19 | "main": "./path.js", 20 | "gitHead": "a723663db8388017634a2d854aca09532b12befa", 21 | "bugs": { 22 | "url": "https://github.com/jinder/path/issues" 23 | }, 24 | "_id": "path@0.11.14", 25 | "scripts": {}, 26 | "_shasum": "cbc7569355cb3c83afeb4ace43ecff95231e5a7d", 27 | "_from": "path@>=0.11.14 <0.12.0", 28 | "_npmVersion": "1.4.28", 29 | "_npmUser": { 30 | "name": "jinder", 31 | "email": "jindersidhu@gmail.com" 32 | }, 33 | "maintainers": [ 34 | { 35 | "name": "coolaj86", 36 | "email": "coolaj86@gmail.com" 37 | }, 38 | { 39 | "name": "shtylman", 40 | "email": "shtylman@gmail.com" 41 | }, 42 | { 43 | "name": "jinder", 44 | "email": "jindersidhu@gmail.com" 45 | } 46 | ], 47 | "dist": { 48 | "shasum": "cbc7569355cb3c83afeb4ace43ecff95231e5a7d", 49 | "tarball": "http://registry.npmjs.org/path/-/path-0.11.14.tgz" 50 | }, 51 | "directories": {}, 52 | "_resolved": "https://registry.npmjs.org/path/-/path-0.11.14.tgz", 53 | "readme": "ERROR: No README data found!" 54 | } 55 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "word-add-in-js-redact", 3 | "version": "0.1.0", 4 | "author": "Siew Moi Khor", 5 | "license": "MIT", 6 | "main": "server.js", 7 | "description": "Learn how to use create document, styles, and the range functionality.", 8 | "scripts": { 9 | "start": "node server.js" 10 | }, 11 | "dependencies": { 12 | "express": "^4.12.3", 13 | "path": "^0.11.14" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/OfficeDev/Word-Add-in-JS-Redact" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /scripts/redact.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the project root for license information. 4 | */ 5 | 6 | 7 | var RedactAddin; 8 | (function (RedactAddin) { 9 | 10 | /** 11 | * Search and redact text. 12 | */ 13 | function redactUserInput() { 14 | // Get user text input from textfield in the taskpane. 15 | var redactInput = document.getElementById('inputRedact').value; 16 | RedactAddin.redactWordsCommon(redactInput); 17 | } 18 | RedactAddin.redactUserInput = redactUserInput; 19 | 20 | /** 21 | * Redact current selected text. 22 | */ 23 | function redactSelectedTexts() { 24 | Word.run(function (context) { 25 | // Get selected text. 26 | var selection = context.document.getSelection(); 27 | selection.load("text"); 28 | return context.sync().then(function() { 29 | RedactAddin.redactWordsCommon(selection.text); 30 | }); 31 | }).catch(RedactAddin.handleErrors); 32 | } 33 | RedactAddin.redactSelectedTexts = redactSelectedTexts; 34 | 35 | })(RedactAddin || (RedactAddin = {})); 36 | 37 | -------------------------------------------------------------------------------- /scripts/search.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the project root for license information. 4 | */ 5 | 6 | /** 7 | * Search and highlight texts. 8 | */ 9 | 10 | var RedactAddin; 11 | (function (RedactAddin) { 12 | 13 | function searchWords() { 14 | // Run a batch operation against the Word object model. 15 | Word.run(function (context) { 16 | var searchInput = document.getElementById('inputSearch').value; 17 | 18 | // Search the document. 19 | var searchResults = context.document.body.search(searchInput, {matchWildCards: true}); 20 | 21 | // Load the search results and get the font property values. 22 | context.load(searchResults, ""); 23 | 24 | // Synchronize the document state by executing the queued-up commands, 25 | // and return a promise to indicate task completion. 26 | return context.sync() 27 | .then(function () { 28 | var count = searchResults.items.length; 29 | // // Queue a set of commands to change the font for each found item. 30 | for (var i = 0; i < count; i++) { 31 | searchResults.items[i].font.highlightColor = '#FFFF00'; //Yellow 32 | } 33 | return count; 34 | }) 35 | .then(context.sync) 36 | .then(reportWordsFound); 37 | 38 | }).catch(RedactAddin.handleErrors); 39 | } 40 | RedactAddin.searchWords = searchWords; 41 | 42 | /** 43 | * Open the dialog to provide notification of found words. 44 | */ 45 | function reportWordsFound(count) { 46 | var url = RedactAddin.createUrlForDialog('dialogCount.html', {count: count}); 47 | Office.context.ui.displayDialogAsync(url, 48 | { height: 11, width: 12, requireHTTPS: true }); 49 | } 50 | 51 | })(RedactAddin || (RedactAddin = {})); 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /scripts/textfield.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | /** 4 | * Text Field Plug-in 5 | * 6 | * Adds basic demonstration functionality to .ms-TextField components. 7 | * 8 | * @param {jQuery Object} One or more .ms-TextField components 9 | * @return {jQuery Object} The same components (allows for chaining) 10 | */ 11 | (function ($) { 12 | $.fn.TextField = function () { 13 | 14 | /** Iterate through each text field provided. */ 15 | return this.each(function () { 16 | 17 | /** Does it have a placeholder? */ 18 | if ($(this).hasClass("ms-TextField--placeholder")) { 19 | 20 | /** Hide the label on click. */ 21 | $(this).on('click', function () { 22 | $(this).find('.ms-Label').hide(); 23 | }); 24 | 25 | /** Show the label again when leaving the field. */ 26 | $(this).find('.ms-TextField-field').on('blur', function () { 27 | 28 | /** Only do this if no text was entered. */ 29 | if ($(this).val().length === 0) { 30 | $(this).siblings('.ms-Label').show(); 31 | } 32 | }); 33 | }; 34 | 35 | /** Underlined - adding/removing a focus class */ 36 | if ($(this).hasClass('ms-TextField--underlined')) { 37 | 38 | /** Add is-active class - changes border color to theme primary */ 39 | $(this).find('.ms-TextField-field').on('focus', function() { 40 | $(this).parent('.ms-TextField--underlined').addClass('is-active'); 41 | }); 42 | 43 | /** Remove is-active on blur of textfield */ 44 | $(this).find('.ms-TextField-field').on('blur', function() { 45 | $(this).parent('.ms-TextField--underlined').removeClass('is-active'); 46 | }); 47 | }; 48 | 49 | }); 50 | }; 51 | })(jQuery); 52 | -------------------------------------------------------------------------------- /server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIEeTCCA2ECAQEwDQYJKoZIhvcNAQELBQAwgYMxCzAJBgNVBAYTAlVTMQswCQYD 3 | VQQIDAJXQTEQMA4GA1UEBwwHUmVkbW9uZDEVMBMGA1UECgwMTWF4RGV2QWRkaW5z 4 | MScwJQYDVQQLDB53b3JkLWFkZC1pbi1qYXZhc2NyaXB0LXNwZWNraXQxFTATBgNV 5 | BAMMDGxvY2FsaG9zdC1jYTAeFw0xNjA0MDYyMjEzMDBaFw0xODA0MDYyMjEzMDBa 6 | MIGAMQswCQYDVQQGEwJVUzELMAkGA1UECAwCV0ExEDAOBgNVBAcMB1JlZG1vbmQx 7 | FTATBgNVBAoMDE1heERldkFkZGluczEnMCUGA1UECwwed29yZC1hZGQtaW4tamF2 8 | YXNjcmlwdC1zcGVja2l0MRIwEAYDVQQDDAlsb2NhbGhvc3QwggIiMA0GCSqGSIb3 9 | DQEBAQUAA4ICDwAwggIKAoICAQCyEmaYz+qTWTmSgwwu75j2OX5T1wDro4TO0dCi 10 | 9iO69o+uts+EnBnuU3RgimGF5CjNFa5tYco4N8yhbGCtIJDqHvkEed8eUeoNNHfU 11 | Bc4TWDVaLCAeUSljpUONUnYIo7YksdPc8FTKx8u6RqMseVKm/rYkqU4sqKIE1k6+ 12 | KBcXvqHgLuEolauqktt0gk2aHN+HHFYhrs43qUmB22kLMk9NSrBgzGL4EkVYjWJS 13 | R7fUhnGFYR7KFxGQMYX12Crw1TgxMoMXuqfdFWXv+209192EhU9v4eGTCXMqj8fd 14 | k1VWjjD2cnAW9LaF+GqyVq0aTygcDWWdTqdictErX7GeRnxjoGgbk3boB145eRb0 15 | EGLCSCfPMhNkaLpnYhFFYrfe0J4uusE40iGA8VMOR9HUf4ap24jhfIpp6qnO/XXp 16 | vc+BumOL2E9JYXIxCdN9NzWALmVESzT7bibMHM0F40PBuhgvdFqPzzQNQ7HCOSkt 17 | HWpH9CpVGMwN1Elpp4W3SNd/Jg0a7gFigxvYEl04lMc/CK29/Rm/YTqQtWG7tKzw 18 | R9kMjXqj/kfTAGWCb8DGaiu+HmNdP80rSPr8GvpLNQy/ZkIZXFPcUrcJb5VkrcCU 19 | nzUVRFyY0NlbQsZzm4sZEl7jkUY3Cgta2CUY1NXtjGmrwkCN5Hi9bs+3MIJwqzti 20 | t6fWFwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQC7y+su3xwa2bkOCeTNVOe91uuM 21 | zxIKBmnj61SQrJx9jmKPjlhxqRknCciNvKFZ4zR5rBSKzn/YAXj6aI/eL+ezwY6L 22 | 9iH2lge2fTi350kOP8aSB2HlUsEUkN16+xKo3LB0NOH3RwXM68XLVeNdkpJbz3PF 23 | FFCHwMGWRe9PwA1/9xVCuTMPVQoDJfqjzf4jBWrY/a8U9KSsF9vFdXl6bO+/1v3h 24 | SZv2FlHlI6oFqGBUsjee3WOdAMrAzPKWN5IUgAaytIqpiy+KobX0ccgohwKPTB5p 25 | gXRMIyhvqVlAU352vvMDolxfv5FnHKznogKufFYgcVadXcp8bnc3jNZLMp4p 26 | -----END CERTIFICATE----- 27 | -------------------------------------------------------------------------------- /server.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIExjCCAq4CAQAwgYAxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJXQTEQMA4GA1UE 3 | BwwHUmVkbW9uZDEVMBMGA1UECgwMTWF4RGV2QWRkaW5zMScwJQYDVQQLDB53b3Jk 4 | LWFkZC1pbi1qYXZhc2NyaXB0LXNwZWNraXQxEjAQBgNVBAMMCWxvY2FsaG9zdDCC 5 | AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALISZpjP6pNZOZKDDC7vmPY5 6 | flPXAOujhM7R0KL2I7r2j662z4ScGe5TdGCKYYXkKM0Vrm1hyjg3zKFsYK0gkOoe 7 | +QR53x5R6g00d9QFzhNYNVosIB5RKWOlQ41SdgijtiSx09zwVMrHy7pGoyx5Uqb+ 8 | tiSpTiyoogTWTr4oFxe+oeAu4SiVq6qS23SCTZoc34ccViGuzjepSYHbaQsyT01K 9 | sGDMYvgSRViNYlJHt9SGcYVhHsoXEZAxhfXYKvDVODEygxe6p90VZe/7bT3X3YSF 10 | T2/h4ZMJcyqPx92TVVaOMPZycBb0toX4arJWrRpPKBwNZZ1Op2Jy0StfsZ5GfGOg 11 | aBuTdugHXjl5FvQQYsJIJ88yE2RoumdiEUVit97Qni66wTjSIYDxUw5H0dR/hqnb 12 | iOF8imnqqc79dem9z4G6Y4vYT0lhcjEJ0303NYAuZURLNPtuJswczQXjQ8G6GC90 13 | Wo/PNA1DscI5KS0dakf0KlUYzA3USWmnhbdI138mDRruAWKDG9gSXTiUxz8Irb39 14 | Gb9hOpC1Ybu0rPBH2QyNeqP+R9MAZYJvwMZqK74eY10/zStI+vwa+ks1DL9mQhlc 15 | U9xStwlvlWStwJSfNRVEXJjQ2VtCxnObixkSXuORRjcKC1rYJRjU1e2MaavCQI3k 16 | eL1uz7cwgnCrO2K3p9YXAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAgEAk+GPH2aL 17 | PuVOk8nvfxJHjLQodwh0PwVXsEkrlmxhrW7Eci+YQ6Bv0AJzL/bAhK/AsaA0KYSq 18 | U3+IUKn3DxQtT8Chz0ZliNJ53G+9ZJlY7d7O3rqUch3cWYa+XftlQaO13K4mnoxM 19 | 72a9AtVSg2jcHGixGvFFP+d2jy+z3uSnRUH6FILukW7IaQmw9IJktxfS3K1PdLbv 20 | 1irWs1siFypueNizeJwSuPUIJxhhdF5CdMoFAU664Aia3dg6bWct85m2gIo3m4bO 21 | u5NgwPc3opm1Z3/RBVGdkLDkHxoIvhyTDuX3nz+9JLU/KwssqrAS5lJ3O707Xphg 22 | wBLE2omzjVDTIo7Buj6yIWSGBDFalEBVL6WCeYof6uN8/H2NvWX44wsZdEMH4vKY 23 | n90t62uRMjSWwV2hPSLDQ48Y5O3Kxge6MjVMB+aHDcASGpyupwWyqhG1fssRcYQ2 24 | h5r2hJvHAORaoKTtpkd/IATV+MUb/3klxhsgv9xuxxm+pJ5msqQ96Wfeir3wrMf2 25 | 1sGzhLfvt2c/OK9Nqn2Q9ViZYtxF0Rrkr5ofct6jQ9zD5vcBS0LF9BxdZC48hIqL 26 | vgQ83cpgt9tDRoEcy6GmIRyux/y2NmRLQr3BnzD6O+7LBD3aiJFfEY7iYYagS2OK 27 | 58OGQDpTaYa8+q6AfIgrHOV2Va3IsdPhqA4= 28 | -----END CERTIFICATE REQUEST----- 29 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the project root for license information. 4 | */ 5 | 6 | var path = require('path'); 7 | var fs = require('fs'); 8 | var https = require('https'); 9 | var express = require('express'); 10 | var app = express(); 11 | 12 | // Set the address and the certificate. 13 | var options = { 14 | hostname: 'localhost', 15 | key: fs.readFileSync('server.key'), 16 | cert: fs.readFileSync('server.crt'), 17 | ca: fs.readFileSync('ca.crt') 18 | }; 19 | 20 | // Define the port. The service uses 'localhost' as the host address. 21 | // Set the host member in the options object to set a custom host domain name or IP address. 22 | var port = 8088; 23 | 24 | // Set the front-end folder to serve public assets. 25 | app.use(express.static(__dirname + '/scripts')); 26 | 27 | // Set the front-end folder to serve public assets. 28 | app.use(express.static(__dirname + '/media')); 29 | 30 | // Set the front-end folder to serve public assets. 31 | app.use(express.static(__dirname + '/css')); 32 | 33 | // Set the front-end folder to serve public assets. 34 | app.use(express.static(__dirname)); 35 | 36 | 37 | // Set the route to the index.html file. 38 | app.get('/', function(req, res) { 39 | var homepage = path.join(__dirname, 'index.html'); 40 | res.sendFile(homepage); 41 | }); 42 | 43 | // Set the route for the HTML served to the dialog API call. 44 | app.get('/dialogCount', function(req, res) { 45 | var homepage = path.join(__dirname, 'dialogCount.html'); 46 | res.sendFile(homepage); 47 | }); 48 | 49 | // Set the route for the HTML served to the dialog API call. 50 | app.get('/dialogAlert', function(req, res) { 51 | var homepage = path.join(__dirname, 'dialogAlert.html'); 52 | res.sendFile(homepage); 53 | }); 54 | 55 | // Start the server. 56 | https.createServer(options, app).listen(port, function() { 57 | console.log('Listening on https://localhost:' + port + '...'); 58 | }); 59 | --------------------------------------------------------------------------------