박주현

1206

Showing 1000 changed files with 4778 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

1 +var express = require('express');
2 +var app = express();
3 +var router = require('./router/index')(app);
4 +var bodyParser = require('body-parser');
5 +
6 +app.set('views', __dirname + '/views');
7 +app.set('view engine', 'ejs');
8 +app.engine('html', require('ejs').renderFile);
9 +
10 +var server = app.listen(3000, function(){
11 + console.log('helloworld');
12 +});
13 +
14 +app.use(express.static('public'));
15 +
16 +app.get('/', function(req, res) {
17 + res.render('index', { title: '또 게임해?' });
18 +});
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 +/*!
2 + * FullCalendar v2.4.0 Print Stylesheet
3 + * Docs & License: http://fullcalendar.io/
4 + * (c) 2015 Adam Shaw
5 + */
6 +
7 +/*
8 + * Include this stylesheet on your page to get a more printer-friendly calendar.
9 + * When including this stylesheet, use the media='print' attribute of the <link> tag.
10 + * Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
11 + */
12 +
13 +.fc {
14 + max-width: 100% !important;
15 +}
16 +
17 +
18 +/* Global Event Restyling
19 +--------------------------------------------------------------------------------------------------*/
20 +
21 +.fc-event {
22 + background: #fff !important;
23 + color: #000 !important;
24 + page-break-inside: avoid;
25 +}
26 +
27 +.fc-event .fc-resizer {
28 + display: none;
29 +}
30 +
31 +
32 +/* Table & Day-Row Restyling
33 +--------------------------------------------------------------------------------------------------*/
34 +
35 +th,
36 +td,
37 +hr,
38 +thead,
39 +tbody,
40 +.fc-row {
41 + border-color: #ccc !important;
42 + background: #fff !important;
43 +}
44 +
45 +/* kill the overlaid, absolutely-positioned common components */
46 +.fc-bg,
47 +.fc-bgevent-skeleton,
48 +.fc-highlight-skeleton,
49 +.fc-helper-skeleton {
50 + display: none;
51 +}
52 +
53 +/* don't force a min-height on rows (for DayGrid) */
54 +.fc tbody .fc-row {
55 + height: auto !important; /* undo height that JS set in distributeHeight */
56 + min-height: 0 !important; /* undo the min-height from each view's specific stylesheet */
57 +}
58 +
59 +.fc tbody .fc-row .fc-content-skeleton {
60 + position: static; /* undo .fc-rigid */
61 + padding-bottom: 0 !important; /* use a more border-friendly method for this... */
62 +}
63 +
64 +.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td { /* only works in newer browsers */
65 + padding-bottom: 1em; /* ...gives space within the skeleton. also ensures min height in a way */
66 +}
67 +
68 +.fc tbody .fc-row .fc-content-skeleton table {
69 + /* provides a min-height for the row, but only effective for IE, which exaggerates this value,
70 + making it look more like 3em. for other browers, it will already be this tall */
71 + height: 1em;
72 +}
73 +
74 +
75 +/* Undo month-view event limiting. Display all events and hide the "more" links
76 +--------------------------------------------------------------------------------------------------*/
77 +
78 +.fc-more-cell,
79 +.fc-more {
80 + display: none !important;
81 +}
82 +
83 +.fc tr.fc-limited {
84 + display: table-row !important;
85 +}
86 +
87 +.fc td.fc-limited {
88 + display: table-cell !important;
89 +}
90 +
91 +.fc-popover {
92 + display: none; /* never display the "more.." popover in print mode */
93 +}
94 +
95 +
96 +/* TimeGrid Restyling
97 +--------------------------------------------------------------------------------------------------*/
98 +
99 +/* undo the min-height 100% trick used to fill the container's height */
100 +.fc-time-grid {
101 + min-height: 0 !important;
102 +}
103 +
104 +/* don't display the side axis at all ("all-day" and time cells) */
105 +.fc-agenda-view .fc-axis {
106 + display: none;
107 +}
108 +
109 +/* don't display the horizontal lines */
110 +.fc-slats,
111 +.fc-time-grid hr { /* this hr is used when height is underused and needs to be filled */
112 + display: none !important; /* important overrides inline declaration */
113 +}
114 +
115 +/* let the container that holds the events be naturally positioned and create real height */
116 +.fc-time-grid .fc-content-skeleton {
117 + position: static;
118 +}
119 +
120 +/* in case there are no events, we still want some height */
121 +.fc-time-grid .fc-content-skeleton table {
122 + height: 4em;
123 +}
124 +
125 +/* kill the horizontal spacing made by the event container. event margins will be done below */
126 +.fc-time-grid .fc-event-container {
127 + margin: 0 !important;
128 +}
129 +
130 +
131 +/* TimeGrid *Event* Restyling
132 +--------------------------------------------------------------------------------------------------*/
133 +
134 +/* naturally position events, vertically stacking them */
135 +.fc-time-grid .fc-event {
136 + position: static !important;
137 + margin: 3px 2px !important;
138 +}
139 +
140 +/* for events that continue to a future day, give the bottom border back */
141 +.fc-time-grid .fc-event.fc-not-end {
142 + border-bottom-width: 1px !important;
143 +}
144 +
145 +/* indicate the event continues via "..." text */
146 +.fc-time-grid .fc-event.fc-not-end:after {
147 + content: "...";
148 +}
149 +
150 +/* for events that are continuations from previous days, give the top border back */
151 +.fc-time-grid .fc-event.fc-not-start {
152 + border-top-width: 1px !important;
153 +}
154 +
155 +/* indicate the event is a continuation via "..." text */
156 +.fc-time-grid .fc-event.fc-not-start:before {
157 + content: "...";
158 +}
159 +
160 +/* time */
161 +
162 +/* undo a previous declaration and let the time text span to a second line */
163 +.fc-time-grid .fc-event .fc-time {
164 + white-space: normal !important;
165 +}
166 +
167 +/* hide the the time that is normally displayed... */
168 +.fc-time-grid .fc-event .fc-time span {
169 + display: none;
170 +}
171 +
172 +/* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */
173 +.fc-time-grid .fc-event .fc-time:after {
174 + content: attr(data-full);
175 +}
176 +
177 +
178 +/* Vertical Scroller & Containers
179 +--------------------------------------------------------------------------------------------------*/
180 +
181 +/* kill the scrollbars and allow natural height */
182 +.fc-scroller,
183 +.fc-day-grid-container, /* these divs might be assigned height, which we need to cleared */
184 +.fc-time-grid-container { /* */
185 + overflow: visible !important;
186 + height: auto !important;
187 +}
188 +
189 +/* kill the horizontal border/padding used to compensate for scrollbars */
190 +.fc-row {
191 + border: 0 !important;
192 + margin: 0 !important;
193 +}
194 +
195 +
196 +/* Button Controls
197 +--------------------------------------------------------------------------------------------------*/
198 +
199 +.fc-button-group,
200 +.fc button {
201 + display: none; /* don't display any button-related controls */
202 +}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../mime/cli.js" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../mime/cli.js" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
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 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../sshpk/bin/sshpk-conv" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../sshpk/bin/sshpk-conv" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-conv" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\sshpk\bin\sshpk-conv" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../sshpk/bin/sshpk-sign" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../sshpk/bin/sshpk-sign" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-sign" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\sshpk\bin\sshpk-sign" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../sshpk/bin/sshpk-verify" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../sshpk/bin/sshpk-verify" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-verify" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\sshpk\bin\sshpk-verify" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 +#!/bin/sh
2 +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 +
4 +case `uname` in
5 + *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6 +esac
7 +
8 +if [ -x "$basedir/node" ]; then
9 + "$basedir/node" "$basedir/../uuid/bin/uuid" "$@"
10 + ret=$?
11 +else
12 + node "$basedir/../uuid/bin/uuid" "$@"
13 + ret=$?
14 +fi
15 +exit $ret
1 +@IF EXIST "%~dp0\node.exe" (
2 + "%~dp0\node.exe" "%~dp0\..\uuid\bin\uuid" %*
3 +) ELSE (
4 + @SETLOCAL
5 + @SET PATHEXT=%PATHEXT:;.JS;=;%
6 + node "%~dp0\..\uuid\bin\uuid" %*
7 +)
...\ No newline at end of file ...\ No newline at end of file
1 + MIT License
2 +
3 + Copyright (c) Microsoft Corporation. All rights reserved.
4 +
5 + Permission is hereby granted, free of charge, to any person obtaining a copy
6 + of this software and associated documentation files (the "Software"), to deal
7 + in the Software without restriction, including without limitation the rights
8 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 + copies of the Software, and to permit persons to whom the Software is
10 + furnished to do so, subject to the following conditions:
11 +
12 + The above copyright notice and this permission notice shall be included in all
13 + copies or substantial portions of the Software.
14 +
15 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 + SOFTWARE
1 +# Installation
2 +> `npm install --save @types/events`
3 +
4 +# Summary
5 +This package contains type definitions for events (https://github.com/Gozala/events).
6 +
7 +# Details
8 +Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/events
9 +
10 +Additional Details
11 + * Last updated: Sun, 03 Dec 2017 16:26:41 GMT
12 + * Dependencies: none
13 + * Global values: none
14 +
15 +# Credits
16 +These definitions were written by Yasunori Ohoka <https://github.com/yasupeke>.
1 +// Type definitions for events 1.1
2 +// Project: https://github.com/Gozala/events
3 +// Definitions by: Yasunori Ohoka <https://github.com/yasupeke>
4 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5 +
6 +export type Listener = (...args: any[]) => void;
7 +
8 +export class EventEmitter {
9 + static listenerCount(emitter: EventEmitter, type: string | number): number;
10 + static defaultMaxListeners: number;
11 +
12 + setMaxListeners(n: number): this;
13 + emit(type: string | number, ...args: any[]): boolean;
14 + addListener(type: string | number, listener: Listener): this;
15 + on(type: string | number, listener: Listener): this;
16 + once(type: string | number, listener: Listener): this;
17 + removeListener(type: string | number, listener: Listener): this;
18 + removeAllListeners(type: string | number): this;
19 + listeners(type: string | number): Listener[];
20 + listenerCount(type: string | number): number;
21 +}
1 +{
2 + "_from": "@types/events@*",
3 + "_id": "@types/events@1.1.0",
4 + "_inBundle": false,
5 + "_integrity": "sha512-y3bR98mzYOo0pAZuiLari+cQyiKk3UXRuT45h1RjhfeCzqkjaVsfZJNaxdgtk7/3tzOm1ozLTqEqMP3VbI48jw==",
6 + "_location": "/@types/events",
7 + "_phantomChildren": {},
8 + "_requested": {
9 + "type": "range",
10 + "registry": true,
11 + "raw": "@types/events@*",
12 + "name": "@types/events",
13 + "escapedName": "@types%2fevents",
14 + "scope": "@types",
15 + "rawSpec": "*",
16 + "saveSpec": null,
17 + "fetchSpec": "*"
18 + },
19 + "_requiredBy": [
20 + "/@types/node"
21 + ],
22 + "_resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz",
23 + "_shasum": "93b1be91f63c184450385272c47b6496fd028e02",
24 + "_spec": "@types/events@*",
25 + "_where": "C:\\Users\\PARK\\Desktop\\새 폴더\\RUTROLL\\node_modules\\@types\\node",
26 + "bundleDependencies": false,
27 + "contributors": [
28 + {
29 + "name": "Yasunori Ohoka",
30 + "url": "https://github.com/yasupeke"
31 + }
32 + ],
33 + "dependencies": {},
34 + "deprecated": false,
35 + "description": "TypeScript definitions for events",
36 + "license": "MIT",
37 + "main": "",
38 + "name": "@types/events",
39 + "repository": {
40 + "type": "git",
41 + "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
42 + },
43 + "scripts": {},
44 + "typeScriptVersion": "2.0",
45 + "typesPublisherContentHash": "16119704233cb146d273b3f0f2195ec03afa6fd2101840c82ac0381aa7001295",
46 + "version": "1.1.0"
47 +}
1 + MIT License
2 +
3 + Copyright (c) Microsoft Corporation. All rights reserved.
4 +
5 + Permission is hereby granted, free of charge, to any person obtaining a copy
6 + of this software and associated documentation files (the "Software"), to deal
7 + in the Software without restriction, including without limitation the rights
8 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 + copies of the Software, and to permit persons to whom the Software is
10 + furnished to do so, subject to the following conditions:
11 +
12 + The above copyright notice and this permission notice shall be included in all
13 + copies or substantial portions of the Software.
14 +
15 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 + SOFTWARE
1 +# Installation
2 +> `npm install --save @types/node`
3 +
4 +# Summary
5 +This package contains type definitions for Node.js (http://nodejs.org/).
6 +
7 +# Details
8 +Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
9 +
10 +Additional Details
11 + * Last updated: Sun, 03 Dec 2017 16:31:01 GMT
12 + * Dependencies: events, net, stream, url, child_process, tls, http, readline, dns, crypto, fs
13 + * Global values: Buffer, NodeJS, SlowBuffer, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout
14 +
15 +# Credits
16 +These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Parambir Singh <https://github.com/parambirs>, Christian Vaagland Tellnes <https://github.com/tellnes>, Wilco Bakker <https://github.com/WilcoBakker>, Nicolas Voigt <https://github.com/octo-sniffle>, Chigozirim C. <https://github.com/smac89>, Flarna <https://github.com/Flarna>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, wwwy3y3 <https://github.com/wwwy3y3>, Deividas Bakanas <https://github.com/DeividasBakanas>, Kelvin Jin <https://github.com/kjin>, Alvis HT Tang <https://github.com/alvis>, Oliver Joseph Ash <https://github.com/OliverJAsh>, Sebastian Silbermann <https://github.com/eps1lon>.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
1 +{
2 + "_from": "@types/node@*",
3 + "_id": "@types/node@8.0.54",
4 + "_inBundle": false,
5 + "_integrity": "sha512-qetMdTv3Ytz9u9ESLdcYs45LPI0mczYZIbC184n7kY0jczOqPNQsabBfVCh+na3B2shAfvC459JqHV771A8Rxg==",
6 + "_location": "/@types/node",
7 + "_phantomChildren": {},
8 + "_requested": {
9 + "type": "range",
10 + "registry": true,
11 + "raw": "@types/node@*",
12 + "name": "@types/node",
13 + "escapedName": "@types%2fnode",
14 + "scope": "@types",
15 + "rawSpec": "*",
16 + "saveSpec": null,
17 + "fetchSpec": "*"
18 + },
19 + "_requiredBy": [
20 + "/parse5"
21 + ],
22 + "_resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.54.tgz",
23 + "_shasum": "3fd9357db4af388b79e03845340259440edffde6",
24 + "_spec": "@types/node@*",
25 + "_where": "C:\\Users\\PARK\\Desktop\\새 폴더\\RUTROLL\\node_modules\\parse5",
26 + "bundleDependencies": false,
27 + "contributors": [
28 + {
29 + "name": "Microsoft TypeScript",
30 + "url": "http://typescriptlang.org"
31 + },
32 + {
33 + "name": "DefinitelyTyped",
34 + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped"
35 + },
36 + {
37 + "name": "Parambir Singh",
38 + "url": "https://github.com/parambirs"
39 + },
40 + {
41 + "name": "Christian Vaagland Tellnes",
42 + "url": "https://github.com/tellnes"
43 + },
44 + {
45 + "name": "Wilco Bakker",
46 + "url": "https://github.com/WilcoBakker"
47 + },
48 + {
49 + "name": "Nicolas Voigt",
50 + "url": "https://github.com/octo-sniffle"
51 + },
52 + {
53 + "name": "Chigozirim C.",
54 + "url": "https://github.com/smac89"
55 + },
56 + {
57 + "name": "Flarna",
58 + "url": "https://github.com/Flarna"
59 + },
60 + {
61 + "name": "Mariusz Wiktorczyk",
62 + "url": "https://github.com/mwiktorczyk"
63 + },
64 + {
65 + "name": "wwwy3y3",
66 + "url": "https://github.com/wwwy3y3"
67 + },
68 + {
69 + "name": "Deividas Bakanas",
70 + "url": "https://github.com/DeividasBakanas"
71 + },
72 + {
73 + "name": "Kelvin Jin",
74 + "url": "https://github.com/kjin"
75 + },
76 + {
77 + "name": "Alvis HT Tang",
78 + "url": "https://github.com/alvis"
79 + },
80 + {
81 + "name": "Oliver Joseph Ash",
82 + "url": "https://github.com/OliverJAsh"
83 + },
84 + {
85 + "name": "Sebastian Silbermann",
86 + "url": "https://github.com/eps1lon"
87 + }
88 + ],
89 + "dependencies": {
90 + "@types/events": "*"
91 + },
92 + "deprecated": false,
93 + "description": "TypeScript definitions for Node.js",
94 + "license": "MIT",
95 + "main": "",
96 + "name": "@types/node",
97 + "repository": {
98 + "type": "git",
99 + "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
100 + },
101 + "scripts": {},
102 + "typeScriptVersion": "2.0",
103 + "typesPublisherContentHash": "9487ee423b035cdecbed865ece88011037869bea165d8f7cafee73916fb0e109",
104 + "version": "8.0.54"
105 +}
1 +1.3.4 / 2017-08-22
2 +==================
3 +
4 + * deps: mime-types@~2.1.16
5 + - deps: mime-db@~1.29.0
6 +
7 +1.3.3 / 2016-05-02
8 +==================
9 +
10 + * deps: mime-types@~2.1.11
11 + - deps: mime-db@~1.23.0
12 + * deps: negotiator@0.6.1
13 + - perf: improve `Accept` parsing speed
14 + - perf: improve `Accept-Charset` parsing speed
15 + - perf: improve `Accept-Encoding` parsing speed
16 + - perf: improve `Accept-Language` parsing speed
17 +
18 +1.3.2 / 2016-03-08
19 +==================
20 +
21 + * deps: mime-types@~2.1.10
22 + - Fix extension of `application/dash+xml`
23 + - Update primary extension for `audio/mp4`
24 + - deps: mime-db@~1.22.0
25 +
26 +1.3.1 / 2016-01-19
27 +==================
28 +
29 + * deps: mime-types@~2.1.9
30 + - deps: mime-db@~1.21.0
31 +
32 +1.3.0 / 2015-09-29
33 +==================
34 +
35 + * deps: mime-types@~2.1.7
36 + - deps: mime-db@~1.19.0
37 + * deps: negotiator@0.6.0
38 + - Fix including type extensions in parameters in `Accept` parsing
39 + - Fix parsing `Accept` parameters with quoted equals
40 + - Fix parsing `Accept` parameters with quoted semicolons
41 + - Lazy-load modules from main entry point
42 + - perf: delay type concatenation until needed
43 + - perf: enable strict mode
44 + - perf: hoist regular expressions
45 + - perf: remove closures getting spec properties
46 + - perf: remove a closure from media type parsing
47 + - perf: remove property delete from media type parsing
48 +
49 +1.2.13 / 2015-09-06
50 +===================
51 +
52 + * deps: mime-types@~2.1.6
53 + - deps: mime-db@~1.18.0
54 +
55 +1.2.12 / 2015-07-30
56 +===================
57 +
58 + * deps: mime-types@~2.1.4
59 + - deps: mime-db@~1.16.0
60 +
61 +1.2.11 / 2015-07-16
62 +===================
63 +
64 + * deps: mime-types@~2.1.3
65 + - deps: mime-db@~1.15.0
66 +
67 +1.2.10 / 2015-07-01
68 +===================
69 +
70 + * deps: mime-types@~2.1.2
71 + - deps: mime-db@~1.14.0
72 +
73 +1.2.9 / 2015-06-08
74 +==================
75 +
76 + * deps: mime-types@~2.1.1
77 + - perf: fix deopt during mapping
78 +
79 +1.2.8 / 2015-06-07
80 +==================
81 +
82 + * deps: mime-types@~2.1.0
83 + - deps: mime-db@~1.13.0
84 + * perf: avoid argument reassignment & argument slice
85 + * perf: avoid negotiator recursive construction
86 + * perf: enable strict mode
87 + * perf: remove unnecessary bitwise operator
88 +
89 +1.2.7 / 2015-05-10
90 +==================
91 +
92 + * deps: negotiator@0.5.3
93 + - Fix media type parameter matching to be case-insensitive
94 +
95 +1.2.6 / 2015-05-07
96 +==================
97 +
98 + * deps: mime-types@~2.0.11
99 + - deps: mime-db@~1.9.1
100 + * deps: negotiator@0.5.2
101 + - Fix comparing media types with quoted values
102 + - Fix splitting media types with quoted commas
103 +
104 +1.2.5 / 2015-03-13
105 +==================
106 +
107 + * deps: mime-types@~2.0.10
108 + - deps: mime-db@~1.8.0
109 +
110 +1.2.4 / 2015-02-14
111 +==================
112 +
113 + * Support Node.js 0.6
114 + * deps: mime-types@~2.0.9
115 + - deps: mime-db@~1.7.0
116 + * deps: negotiator@0.5.1
117 + - Fix preference sorting to be stable for long acceptable lists
118 +
119 +1.2.3 / 2015-01-31
120 +==================
121 +
122 + * deps: mime-types@~2.0.8
123 + - deps: mime-db@~1.6.0
124 +
125 +1.2.2 / 2014-12-30
126 +==================
127 +
128 + * deps: mime-types@~2.0.7
129 + - deps: mime-db@~1.5.0
130 +
131 +1.2.1 / 2014-12-30
132 +==================
133 +
134 + * deps: mime-types@~2.0.5
135 + - deps: mime-db@~1.3.1
136 +
137 +1.2.0 / 2014-12-19
138 +==================
139 +
140 + * deps: negotiator@0.5.0
141 + - Fix list return order when large accepted list
142 + - Fix missing identity encoding when q=0 exists
143 + - Remove dynamic building of Negotiator class
144 +
145 +1.1.4 / 2014-12-10
146 +==================
147 +
148 + * deps: mime-types@~2.0.4
149 + - deps: mime-db@~1.3.0
150 +
151 +1.1.3 / 2014-11-09
152 +==================
153 +
154 + * deps: mime-types@~2.0.3
155 + - deps: mime-db@~1.2.0
156 +
157 +1.1.2 / 2014-10-14
158 +==================
159 +
160 + * deps: negotiator@0.4.9
161 + - Fix error when media type has invalid parameter
162 +
163 +1.1.1 / 2014-09-28
164 +==================
165 +
166 + * deps: mime-types@~2.0.2
167 + - deps: mime-db@~1.1.0
168 + * deps: negotiator@0.4.8
169 + - Fix all negotiations to be case-insensitive
170 + - Stable sort preferences of same quality according to client order
171 +
172 +1.1.0 / 2014-09-02
173 +==================
174 +
175 + * update `mime-types`
176 +
177 +1.0.7 / 2014-07-04
178 +==================
179 +
180 + * Fix wrong type returned from `type` when match after unknown extension
181 +
182 +1.0.6 / 2014-06-24
183 +==================
184 +
185 + * deps: negotiator@0.4.7
186 +
187 +1.0.5 / 2014-06-20
188 +==================
189 +
190 + * fix crash when unknown extension given
191 +
192 +1.0.4 / 2014-06-19
193 +==================
194 +
195 + * use `mime-types`
196 +
197 +1.0.3 / 2014-06-11
198 +==================
199 +
200 + * deps: negotiator@0.4.6
201 + - Order by specificity when quality is the same
202 +
203 +1.0.2 / 2014-05-29
204 +==================
205 +
206 + * Fix interpretation when header not in request
207 + * deps: pin negotiator@0.4.5
208 +
209 +1.0.1 / 2014-01-18
210 +==================
211 +
212 + * Identity encoding isn't always acceptable
213 + * deps: negotiator@~0.4.0
214 +
215 +1.0.0 / 2013-12-27
216 +==================
217 +
218 + * Genesis
1 +(The MIT License)
2 +
3 +Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
4 +Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
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.
1 +# accepts
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 +Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
10 +Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
11 +
12 +In addition to negotiator, it allows:
13 +
14 +- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
15 + as well as `('text/html', 'application/json')`.
16 +- Allows type shorthands such as `json`.
17 +- Returns `false` when no types match
18 +- Treats non-existent headers as `*`
19 +
20 +## Installation
21 +
22 +This is a [Node.js](https://nodejs.org/en/) module available through the
23 +[npm registry](https://www.npmjs.com/). Installation is done using the
24 +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
25 +
26 +```sh
27 +$ npm install accepts
28 +```
29 +
30 +## API
31 +
32 +<!-- eslint-disable no-unused-vars -->
33 +
34 +```js
35 +var accepts = require('accepts')
36 +```
37 +
38 +### accepts(req)
39 +
40 +Create a new `Accepts` object for the given `req`.
41 +
42 +#### .charset(charsets)
43 +
44 +Return the first accepted charset. If nothing in `charsets` is accepted,
45 +then `false` is returned.
46 +
47 +#### .charsets()
48 +
49 +Return the charsets that the request accepts, in the order of the client's
50 +preference (most preferred first).
51 +
52 +#### .encoding(encodings)
53 +
54 +Return the first accepted encoding. If nothing in `encodings` is accepted,
55 +then `false` is returned.
56 +
57 +#### .encodings()
58 +
59 +Return the encodings that the request accepts, in the order of the client's
60 +preference (most preferred first).
61 +
62 +#### .language(languages)
63 +
64 +Return the first accepted language. If nothing in `languages` is accepted,
65 +then `false` is returned.
66 +
67 +#### .languages()
68 +
69 +Return the languages that the request accepts, in the order of the client's
70 +preference (most preferred first).
71 +
72 +#### .type(types)
73 +
74 +Return the first accepted type (and it is returned as the same text as what
75 +appears in the `types` array). If nothing in `types` is accepted, then `false`
76 +is returned.
77 +
78 +The `types` array can contain full MIME types or file extensions. Any value
79 +that is not a full MIME types is passed to `require('mime-types').lookup`.
80 +
81 +#### .types()
82 +
83 +Return the types that the request accepts, in the order of the client's
84 +preference (most preferred first).
85 +
86 +## Examples
87 +
88 +### Simple type negotiation
89 +
90 +This simple example shows how to use `accepts` to return a different typed
91 +respond body based on what the client wants to accept. The server lists it's
92 +preferences in order and will get back the best match between the client and
93 +server.
94 +
95 +```js
96 +var accepts = require('accepts')
97 +var http = require('http')
98 +
99 +function app (req, res) {
100 + var accept = accepts(req)
101 +
102 + // the order of this list is significant; should be server preferred order
103 + switch (accept.type(['json', 'html'])) {
104 + case 'json':
105 + res.setHeader('Content-Type', 'application/json')
106 + res.write('{"hello":"world!"}')
107 + break
108 + case 'html':
109 + res.setHeader('Content-Type', 'text/html')
110 + res.write('<b>hello, world!</b>')
111 + break
112 + default:
113 + // the fallback is text/plain, so no need to specify it above
114 + res.setHeader('Content-Type', 'text/plain')
115 + res.write('hello, world!')
116 + break
117 + }
118 +
119 + res.end()
120 +}
121 +
122 +http.createServer(app).listen(3000)
123 +```
124 +
125 +You can test this out with the cURL program:
126 +```sh
127 +curl -I -H'Accept: text/html' http://localhost:3000/
128 +```
129 +
130 +## License
131 +
132 +[MIT](LICENSE)
133 +
134 +[npm-image]: https://img.shields.io/npm/v/accepts.svg
135 +[npm-url]: https://npmjs.org/package/accepts
136 +[node-version-image]: https://img.shields.io/node/v/accepts.svg
137 +[node-version-url]: https://nodejs.org/en/download/
138 +[travis-image]: https://img.shields.io/travis/jshttp/accepts/master.svg
139 +[travis-url]: https://travis-ci.org/jshttp/accepts
140 +[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts/master.svg
141 +[coveralls-url]: https://coveralls.io/r/jshttp/accepts
142 +[downloads-image]: https://img.shields.io/npm/dm/accepts.svg
143 +[downloads-url]: https://npmjs.org/package/accepts
1 +/*!
2 + * accepts
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 dependencies.
12 + * @private
13 + */
14 +
15 +var Negotiator = require('negotiator')
16 +var mime = require('mime-types')
17 +
18 +/**
19 + * Module exports.
20 + * @public
21 + */
22 +
23 +module.exports = Accepts
24 +
25 +/**
26 + * Create a new Accepts object for the given req.
27 + *
28 + * @param {object} req
29 + * @public
30 + */
31 +
32 +function Accepts (req) {
33 + if (!(this instanceof Accepts)) {
34 + return new Accepts(req)
35 + }
36 +
37 + this.headers = req.headers
38 + this.negotiator = new Negotiator(req)
39 +}
40 +
41 +/**
42 + * Check if the given `type(s)` is acceptable, returning
43 + * the best match when true, otherwise `undefined`, in which
44 + * case you should respond with 406 "Not Acceptable".
45 + *
46 + * The `type` value may be a single mime type string
47 + * such as "application/json", the extension name
48 + * such as "json" or an array `["json", "html", "text/plain"]`. When a list
49 + * or array is given the _best_ match, if any is returned.
50 + *
51 + * Examples:
52 + *
53 + * // Accept: text/html
54 + * this.types('html');
55 + * // => "html"
56 + *
57 + * // Accept: text/*, application/json
58 + * this.types('html');
59 + * // => "html"
60 + * this.types('text/html');
61 + * // => "text/html"
62 + * this.types('json', 'text');
63 + * // => "json"
64 + * this.types('application/json');
65 + * // => "application/json"
66 + *
67 + * // Accept: text/*, application/json
68 + * this.types('image/png');
69 + * this.types('png');
70 + * // => undefined
71 + *
72 + * // Accept: text/*;q=.5, application/json
73 + * this.types(['html', 'json']);
74 + * this.types('html', 'json');
75 + * // => "json"
76 + *
77 + * @param {String|Array} types...
78 + * @return {String|Array|Boolean}
79 + * @public
80 + */
81 +
82 +Accepts.prototype.type =
83 +Accepts.prototype.types = function (types_) {
84 + var types = types_
85 +
86 + // support flattened arguments
87 + if (types && !Array.isArray(types)) {
88 + types = new Array(arguments.length)
89 + for (var i = 0; i < types.length; i++) {
90 + types[i] = arguments[i]
91 + }
92 + }
93 +
94 + // no types, return all requested types
95 + if (!types || types.length === 0) {
96 + return this.negotiator.mediaTypes()
97 + }
98 +
99 + // no accept header, return first given type
100 + if (!this.headers.accept) {
101 + return types[0]
102 + }
103 +
104 + var mimes = types.map(extToMime)
105 + var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
106 + var first = accepts[0]
107 +
108 + return first
109 + ? types[mimes.indexOf(first)]
110 + : false
111 +}
112 +
113 +/**
114 + * Return accepted encodings or best fit based on `encodings`.
115 + *
116 + * Given `Accept-Encoding: gzip, deflate`
117 + * an array sorted by quality is returned:
118 + *
119 + * ['gzip', 'deflate']
120 + *
121 + * @param {String|Array} encodings...
122 + * @return {String|Array}
123 + * @public
124 + */
125 +
126 +Accepts.prototype.encoding =
127 +Accepts.prototype.encodings = function (encodings_) {
128 + var encodings = encodings_
129 +
130 + // support flattened arguments
131 + if (encodings && !Array.isArray(encodings)) {
132 + encodings = new Array(arguments.length)
133 + for (var i = 0; i < encodings.length; i++) {
134 + encodings[i] = arguments[i]
135 + }
136 + }
137 +
138 + // no encodings, return all requested encodings
139 + if (!encodings || encodings.length === 0) {
140 + return this.negotiator.encodings()
141 + }
142 +
143 + return this.negotiator.encodings(encodings)[0] || false
144 +}
145 +
146 +/**
147 + * Return accepted charsets or best fit based on `charsets`.
148 + *
149 + * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
150 + * an array sorted by quality is returned:
151 + *
152 + * ['utf-8', 'utf-7', 'iso-8859-1']
153 + *
154 + * @param {String|Array} charsets...
155 + * @return {String|Array}
156 + * @public
157 + */
158 +
159 +Accepts.prototype.charset =
160 +Accepts.prototype.charsets = function (charsets_) {
161 + var charsets = charsets_
162 +
163 + // support flattened arguments
164 + if (charsets && !Array.isArray(charsets)) {
165 + charsets = new Array(arguments.length)
166 + for (var i = 0; i < charsets.length; i++) {
167 + charsets[i] = arguments[i]
168 + }
169 + }
170 +
171 + // no charsets, return all requested charsets
172 + if (!charsets || charsets.length === 0) {
173 + return this.negotiator.charsets()
174 + }
175 +
176 + return this.negotiator.charsets(charsets)[0] || false
177 +}
178 +
179 +/**
180 + * Return accepted languages or best fit based on `langs`.
181 + *
182 + * Given `Accept-Language: en;q=0.8, es, pt`
183 + * an array sorted by quality is returned:
184 + *
185 + * ['es', 'pt', 'en']
186 + *
187 + * @param {String|Array} langs...
188 + * @return {Array|String}
189 + * @public
190 + */
191 +
192 +Accepts.prototype.lang =
193 +Accepts.prototype.langs =
194 +Accepts.prototype.language =
195 +Accepts.prototype.languages = function (languages_) {
196 + var languages = languages_
197 +
198 + // support flattened arguments
199 + if (languages && !Array.isArray(languages)) {
200 + languages = new Array(arguments.length)
201 + for (var i = 0; i < languages.length; i++) {
202 + languages[i] = arguments[i]
203 + }
204 + }
205 +
206 + // no languages, return all requested languages
207 + if (!languages || languages.length === 0) {
208 + return this.negotiator.languages()
209 + }
210 +
211 + return this.negotiator.languages(languages)[0] || false
212 +}
213 +
214 +/**
215 + * Convert extnames to mime.
216 + *
217 + * @param {String} type
218 + * @return {String}
219 + * @private
220 + */
221 +
222 +function extToMime (type) {
223 + return type.indexOf('/') === -1
224 + ? mime.lookup(type)
225 + : type
226 +}
227 +
228 +/**
229 + * Check if mime is valid.
230 + *
231 + * @param {String} type
232 + * @return {String}
233 + * @private
234 + */
235 +
236 +function validMime (type) {
237 + return typeof type === 'string'
238 +}
1 +1.30.0 / 2017-08-27
2 +===================
3 +
4 + * Add `application/vnd.ms-outlook`
5 + * Add `application/x-arj`
6 + * Add extension `.mjs` to `application/javascript`
7 + * Add glTF types and extensions
8 + * Add new upstream MIME types
9 + * Add `text/x-org`
10 + * Add VirtualBox MIME types
11 + * Fix `source` records for `video/*` types that are IANA
12 + * Update `font/opentype` to registered `font/otf`
13 +
14 +1.29.0 / 2017-07-10
15 +===================
16 +
17 + * Add `application/fido.trusted-apps+json`
18 + * Add extension `.wadl` to `application/vnd.sun.wadl+xml`
19 + * Add new upstream MIME types
20 + * Add `UTF-8` as default charset for `text/css`
21 +
22 +1.28.0 / 2017-05-14
23 +===================
24 +
25 + * Add new upstream MIME types
26 + * Add extension `.gz` to `application/gzip`
27 + * Update extensions `.md` and `.markdown` to be `text/markdown`
28 +
29 +1.27.0 / 2017-03-16
30 +===================
31 +
32 + * Add new upstream MIME types
33 + * Add `image/apng` with extension `.apng`
34 +
35 +1.26.0 / 2017-01-14
36 +===================
37 +
38 + * Add new upstream MIME types
39 + * Add extension `.geojson` to `application/geo+json`
40 +
41 +1.25.0 / 2016-11-11
42 +===================
43 +
44 + * Add new upstream MIME types
45 +
46 +1.24.0 / 2016-09-18
47 +===================
48 +
49 + * Add `audio/mp3`
50 + * Add new upstream MIME types
51 +
52 +1.23.0 / 2016-05-01
53 +===================
54 +
55 + * Add new upstream MIME types
56 + * Add extension `.3gpp` to `audio/3gpp`
57 +
58 +1.22.0 / 2016-02-15
59 +===================
60 +
61 + * Add `text/slim`
62 + * Add extension `.rng` to `application/xml`
63 + * Add new upstream MIME types
64 + * Fix extension of `application/dash+xml` to be `.mpd`
65 + * Update primary extension to `.m4a` for `audio/mp4`
66 +
67 +1.21.0 / 2016-01-06
68 +===================
69 +
70 + * Add Google document types
71 + * Add new upstream MIME types
72 +
73 +1.20.0 / 2015-11-10
74 +===================
75 +
76 + * Add `text/x-suse-ymp`
77 + * Add new upstream MIME types
78 +
79 +1.19.0 / 2015-09-17
80 +===================
81 +
82 + * Add `application/vnd.apple.pkpass`
83 + * Add new upstream MIME types
84 +
85 +1.18.0 / 2015-09-03
86 +===================
87 +
88 + * Add new upstream MIME types
89 +
90 +1.17.0 / 2015-08-13
91 +===================
92 +
93 + * Add `application/x-msdos-program`
94 + * Add `audio/g711-0`
95 + * Add `image/vnd.mozilla.apng`
96 + * Add extension `.exe` to `application/x-msdos-program`
97 +
98 +1.16.0 / 2015-07-29
99 +===================
100 +
101 + * Add `application/vnd.uri-map`
102 +
103 +1.15.0 / 2015-07-13
104 +===================
105 +
106 + * Add `application/x-httpd-php`
107 +
108 +1.14.0 / 2015-06-25
109 +===================
110 +
111 + * Add `application/scim+json`
112 + * Add `application/vnd.3gpp.ussd+xml`
113 + * Add `application/vnd.biopax.rdf+xml`
114 + * Add `text/x-processing`
115 +
116 +1.13.0 / 2015-06-07
117 +===================
118 +
119 + * Add nginx as a source
120 + * Add `application/x-cocoa`
121 + * Add `application/x-java-archive-diff`
122 + * Add `application/x-makeself`
123 + * Add `application/x-perl`
124 + * Add `application/x-pilot`
125 + * Add `application/x-redhat-package-manager`
126 + * Add `application/x-sea`
127 + * Add `audio/x-m4a`
128 + * Add `audio/x-realaudio`
129 + * Add `image/x-jng`
130 + * Add `text/mathml`
131 +
132 +1.12.0 / 2015-06-05
133 +===================
134 +
135 + * Add `application/bdoc`
136 + * Add `application/vnd.hyperdrive+json`
137 + * Add `application/x-bdoc`
138 + * Add extension `.rtf` to `text/rtf`
139 +
140 +1.11.0 / 2015-05-31
141 +===================
142 +
143 + * Add `audio/wav`
144 + * Add `audio/wave`
145 + * Add extension `.litcoffee` to `text/coffeescript`
146 + * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data`
147 + * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install`
148 +
149 +1.10.0 / 2015-05-19
150 +===================
151 +
152 + * Add `application/vnd.balsamiq.bmpr`
153 + * Add `application/vnd.microsoft.portable-executable`
154 + * Add `application/x-ns-proxy-autoconfig`
155 +
156 +1.9.1 / 2015-04-19
157 +==================
158 +
159 + * Remove `.json` extension from `application/manifest+json`
160 + - This is causing bugs downstream
161 +
162 +1.9.0 / 2015-04-19
163 +==================
164 +
165 + * Add `application/manifest+json`
166 + * Add `application/vnd.micro+json`
167 + * Add `image/vnd.zbrush.pcx`
168 + * Add `image/x-ms-bmp`
169 +
170 +1.8.0 / 2015-03-13
171 +==================
172 +
173 + * Add `application/vnd.citationstyles.style+xml`
174 + * Add `application/vnd.fastcopy-disk-image`
175 + * Add `application/vnd.gov.sk.xmldatacontainer+xml`
176 + * Add extension `.jsonld` to `application/ld+json`
177 +
178 +1.7.0 / 2015-02-08
179 +==================
180 +
181 + * Add `application/vnd.gerber`
182 + * Add `application/vnd.msa-disk-image`
183 +
184 +1.6.1 / 2015-02-05
185 +==================
186 +
187 + * Community extensions ownership transferred from `node-mime`
188 +
189 +1.6.0 / 2015-01-29
190 +==================
191 +
192 + * Add `application/jose`
193 + * Add `application/jose+json`
194 + * Add `application/json-seq`
195 + * Add `application/jwk+json`
196 + * Add `application/jwk-set+json`
197 + * Add `application/jwt`
198 + * Add `application/rdap+json`
199 + * Add `application/vnd.gov.sk.e-form+xml`
200 + * Add `application/vnd.ims.imsccv1p3`
201 +
202 +1.5.0 / 2014-12-30
203 +==================
204 +
205 + * Add `application/vnd.oracle.resource+json`
206 + * Fix various invalid MIME type entries
207 + - `application/mbox+xml`
208 + - `application/oscp-response`
209 + - `application/vwg-multiplexed`
210 + - `audio/g721`
211 +
212 +1.4.0 / 2014-12-21
213 +==================
214 +
215 + * Add `application/vnd.ims.imsccv1p2`
216 + * Fix various invalid MIME type entries
217 + - `application/vnd-acucobol`
218 + - `application/vnd-curl`
219 + - `application/vnd-dart`
220 + - `application/vnd-dxr`
221 + - `application/vnd-fdf`
222 + - `application/vnd-mif`
223 + - `application/vnd-sema`
224 + - `application/vnd-wap-wmlc`
225 + - `application/vnd.adobe.flash-movie`
226 + - `application/vnd.dece-zip`
227 + - `application/vnd.dvb_service`
228 + - `application/vnd.micrografx-igx`
229 + - `application/vnd.sealed-doc`
230 + - `application/vnd.sealed-eml`
231 + - `application/vnd.sealed-mht`
232 + - `application/vnd.sealed-ppt`
233 + - `application/vnd.sealed-tiff`
234 + - `application/vnd.sealed-xls`
235 + - `application/vnd.sealedmedia.softseal-html`
236 + - `application/vnd.sealedmedia.softseal-pdf`
237 + - `application/vnd.wap-slc`
238 + - `application/vnd.wap-wbxml`
239 + - `audio/vnd.sealedmedia.softseal-mpeg`
240 + - `image/vnd-djvu`
241 + - `image/vnd-svf`
242 + - `image/vnd-wap-wbmp`
243 + - `image/vnd.sealed-png`
244 + - `image/vnd.sealedmedia.softseal-gif`
245 + - `image/vnd.sealedmedia.softseal-jpg`
246 + - `model/vnd-dwf`
247 + - `model/vnd.parasolid.transmit-binary`
248 + - `model/vnd.parasolid.transmit-text`
249 + - `text/vnd-a`
250 + - `text/vnd-curl`
251 + - `text/vnd.wap-wml`
252 + * Remove example template MIME types
253 + - `application/example`
254 + - `audio/example`
255 + - `image/example`
256 + - `message/example`
257 + - `model/example`
258 + - `multipart/example`
259 + - `text/example`
260 + - `video/example`
261 +
262 +1.3.1 / 2014-12-16
263 +==================
264 +
265 + * Fix missing extensions
266 + - `application/json5`
267 + - `text/hjson`
268 +
269 +1.3.0 / 2014-12-07
270 +==================
271 +
272 + * Add `application/a2l`
273 + * Add `application/aml`
274 + * Add `application/atfx`
275 + * Add `application/atxml`
276 + * Add `application/cdfx+xml`
277 + * Add `application/dii`
278 + * Add `application/json5`
279 + * Add `application/lxf`
280 + * Add `application/mf4`
281 + * Add `application/vnd.apache.thrift.compact`
282 + * Add `application/vnd.apache.thrift.json`
283 + * Add `application/vnd.coffeescript`
284 + * Add `application/vnd.enphase.envoy`
285 + * Add `application/vnd.ims.imsccv1p1`
286 + * Add `text/csv-schema`
287 + * Add `text/hjson`
288 + * Add `text/markdown`
289 + * Add `text/yaml`
290 +
291 +1.2.0 / 2014-11-09
292 +==================
293 +
294 + * Add `application/cea`
295 + * Add `application/dit`
296 + * Add `application/vnd.gov.sk.e-form+zip`
297 + * Add `application/vnd.tmd.mediaflex.api+xml`
298 + * Type `application/epub+zip` is now IANA-registered
299 +
300 +1.1.2 / 2014-10-23
301 +==================
302 +
303 + * Rebuild database for `application/x-www-form-urlencoded` change
304 +
305 +1.1.1 / 2014-10-20
306 +==================
307 +
308 + * Mark `application/x-www-form-urlencoded` as compressible.
309 +
310 +1.1.0 / 2014-09-28
311 +==================
312 +
313 + * Add `application/font-woff2`
314 +
315 +1.0.3 / 2014-09-25
316 +==================
317 +
318 + * Fix engine requirement in package
319 +
320 +1.0.2 / 2014-09-25
321 +==================
322 +
323 + * Add `application/coap-group+json`
324 + * Add `application/dcd`
325 + * Add `application/vnd.apache.thrift.binary`
326 + * Add `image/vnd.tencent.tap`
327 + * Mark all JSON-derived types as compressible
328 + * Update `text/vtt` data
329 +
330 +1.0.1 / 2014-08-30
331 +==================
332 +
333 + * Fix extension ordering
334 +
335 +1.0.0 / 2014-08-30
336 +==================
337 +
338 + * Add `application/atf`
339 + * Add `application/merge-patch+json`
340 + * Add `multipart/x-mixed-replace`
341 + * Add `source: 'apache'` metadata
342 + * Add `source: 'iana'` metadata
343 + * Remove badly-assumed charset data
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.
1 +# mime-db
2 +
3 +[![NPM Version][npm-version-image]][npm-url]
4 +[![NPM Downloads][npm-downloads-image]][npm-url]
5 +[![Node.js Version][node-image]][node-url]
6 +[![Build Status][travis-image]][travis-url]
7 +[![Coverage Status][coveralls-image]][coveralls-url]
8 +
9 +This is a database of all mime types.
10 +It consists of a single, public JSON file and does not include any logic,
11 +allowing it to remain as un-opinionated as possible with an API.
12 +It aggregates data from the following sources:
13 +
14 +- http://www.iana.org/assignments/media-types/media-types.xhtml
15 +- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
16 +- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types
17 +
18 +## Installation
19 +
20 +```bash
21 +npm install mime-db
22 +```
23 +
24 +### Database Download
25 +
26 +If you're crazy enough to use this in the browser, you can just grab the
27 +JSON file using [RawGit](https://rawgit.com/). It is recommended to replace
28 +`master` with [a release tag](https://github.com/jshttp/mime-db/tags) as the
29 +JSON format may change in the future.
30 +
31 +```
32 +https://cdn.rawgit.com/jshttp/mime-db/master/db.json
33 +```
34 +
35 +## Usage
36 +
37 +```js
38 +var db = require('mime-db');
39 +
40 +// grab data on .js files
41 +var data = db['application/javascript'];
42 +```
43 +
44 +## Data Structure
45 +
46 +The JSON file is a map lookup for lowercased mime types.
47 +Each mime type has the following properties:
48 +
49 +- `.source` - where the mime type is defined.
50 + If not set, it's probably a custom media type.
51 + - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
52 + - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
53 + - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types)
54 +- `.extensions[]` - known extensions associated with this mime type.
55 +- `.compressible` - whether a file of this type can be gzipped.
56 +- `.charset` - the default charset associated with this type, if any.
57 +
58 +If unknown, every property could be `undefined`.
59 +
60 +## Contributing
61 +
62 +To edit the database, only make PRs against `src/custom.json` or
63 +`src/custom-suffix.json`.
64 +
65 +The `src/custom.json` file is a JSON object with the MIME type as the keys
66 +and the values being an object with the following keys:
67 +
68 +- `compressible` - leave out if you don't know, otherwise `true`/`false` for
69 + if the data represented by the time is typically compressible.
70 +- `extensions` - include an array of file extensions that are associated with
71 + the type.
72 +- `notes` - human-readable notes about the type, typically what the type is.
73 +- `sources` - include an array of URLs of where the MIME type and the associated
74 + extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source);
75 + links to type aggregating sites and Wikipedia are _not acceptible_.
76 +
77 +To update the build, run `npm run build`.
78 +
79 +## Adding Custom Media Types
80 +
81 +The best way to get new media types included in this library is to register
82 +them with the IANA. The community registration procedure is outlined in
83 +[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
84 +registered with the IANA are automatically pulled into this library.
85 +
86 +[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg
87 +[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg
88 +[npm-url]: https://npmjs.org/package/mime-db
89 +[travis-image]: https://img.shields.io/travis/jshttp/mime-db/master.svg
90 +[travis-url]: https://travis-ci.org/jshttp/mime-db
91 +[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db/master.svg
92 +[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
93 +[node-image]: https://img.shields.io/node/v/mime-db.svg
94 +[node-url]: http://nodejs.org/download/
This diff could not be displayed because it is too large.
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')
1 +{
2 + "_from": "mime-db@~1.30.0",
3 + "_id": "mime-db@1.30.0",
4 + "_inBundle": false,
5 + "_integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=",
6 + "_location": "/accepts/mime-db",
7 + "_phantomChildren": {},
8 + "_requested": {
9 + "type": "range",
10 + "registry": true,
11 + "raw": "mime-db@~1.30.0",
12 + "name": "mime-db",
13 + "escapedName": "mime-db",
14 + "rawSpec": "~1.30.0",
15 + "saveSpec": null,
16 + "fetchSpec": "~1.30.0"
17 + },
18 + "_requiredBy": [
19 + "/accepts/mime-types"
20 + ],
21 + "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
22 + "_shasum": "74c643da2dd9d6a45399963465b26d5ca7d71f01",
23 + "_spec": "mime-db@~1.30.0",
24 + "_where": "C:\\Users\\PARK\\Desktop\\새 폴더\\RUTROLL\\node_modules\\accepts\\node_modules\\mime-types",
25 + "bugs": {
26 + "url": "https://github.com/jshttp/mime-db/issues"
27 + },
28 + "bundleDependencies": false,
29 + "contributors": [
30 + {
31 + "name": "Douglas Christopher Wilson",
32 + "email": "doug@somethingdoug.com"
33 + },
34 + {
35 + "name": "Jonathan Ong",
36 + "email": "me@jongleberry.com",
37 + "url": "http://jongleberry.com"
38 + },
39 + {
40 + "name": "Robert Kieffer",
41 + "email": "robert@broofa.com",
42 + "url": "http://github.com/broofa"
43 + }
44 + ],
45 + "deprecated": false,
46 + "description": "Media Type Database",
47 + "devDependencies": {
48 + "bluebird": "3.5.0",
49 + "co": "4.6.0",
50 + "cogent": "1.0.1",
51 + "csv-parse": "1.2.1",
52 + "eslint": "3.19.0",
53 + "eslint-config-standard": "10.2.1",
54 + "eslint-plugin-import": "2.7.0",
55 + "eslint-plugin-node": "5.1.1",
56 + "eslint-plugin-promise": "3.5.0",
57 + "eslint-plugin-standard": "3.0.1",
58 + "gnode": "0.1.2",
59 + "mocha": "1.21.5",
60 + "nyc": "11.1.0",
61 + "raw-body": "2.3.0",
62 + "stream-to-array": "2.3.0"
63 + },
64 + "engines": {
65 + "node": ">= 0.6"
66 + },
67 + "files": [
68 + "HISTORY.md",
69 + "LICENSE",
70 + "README.md",
71 + "db.json",
72 + "index.js"
73 + ],
74 + "homepage": "https://github.com/jshttp/mime-db#readme",
75 + "keywords": [
76 + "mime",
77 + "db",
78 + "type",
79 + "types",
80 + "database",
81 + "charset",
82 + "charsets"
83 + ],
84 + "license": "MIT",
85 + "name": "mime-db",
86 + "repository": {
87 + "type": "git",
88 + "url": "git+https://github.com/jshttp/mime-db.git"
89 + },
90 + "scripts": {
91 + "build": "node scripts/build",
92 + "fetch": "gnode scripts/fetch-apache && gnode scripts/fetch-iana && gnode scripts/fetch-nginx",
93 + "lint": "eslint .",
94 + "test": "mocha --reporter spec --bail --check-leaks test/",
95 + "test-cov": "nyc --reporter=html --reporter=text npm test",
96 + "test-travis": "nyc --reporter=text npm test",
97 + "update": "npm run fetch && npm run build"
98 + },
99 + "version": "1.30.0"
100 +}
1 +2.1.17 / 2017-09-01
2 +===================
3 +
4 + * deps: mime-db@~1.30.0
5 + - Add `application/vnd.ms-outlook`
6 + - Add `application/x-arj`
7 + - Add extension `.mjs` to `application/javascript`
8 + - Add glTF types and extensions
9 + - Add new upstream MIME types
10 + - Add `text/x-org`
11 + - Add VirtualBox MIME types
12 + - Fix `source` records for `video/*` types that are IANA
13 + - Update `font/opentype` to registered `font/otf`
14 +
15 +2.1.16 / 2017-07-24
16 +===================
17 +
18 + * deps: mime-db@~1.29.0
19 + - Add `application/fido.trusted-apps+json`
20 + - Add extension `.wadl` to `application/vnd.sun.wadl+xml`
21 + - Add extension `.gz` to `application/gzip`
22 + - Add new upstream MIME types
23 + - Update extensions `.md` and `.markdown` to be `text/markdown`
24 +
25 +2.1.15 / 2017-03-23
26 +===================
27 +
28 + * deps: mime-db@~1.27.0
29 + - Add new mime types
30 + - Add `image/apng`
31 +
32 +2.1.14 / 2017-01-14
33 +===================
34 +
35 + * deps: mime-db@~1.26.0
36 + - Add new mime types
37 +
38 +2.1.13 / 2016-11-18
39 +===================
40 +
41 + * deps: mime-db@~1.25.0
42 + - Add new mime types
43 +
44 +2.1.12 / 2016-09-18
45 +===================
46 +
47 + * deps: mime-db@~1.24.0
48 + - Add new mime types
49 + - Add `audio/mp3`
50 +
51 +2.1.11 / 2016-05-01
52 +===================
53 +
54 + * deps: mime-db@~1.23.0
55 + - Add new mime types
56 +
57 +2.1.10 / 2016-02-15
58 +===================
59 +
60 + * deps: mime-db@~1.22.0
61 + - Add new mime types
62 + - Fix extension of `application/dash+xml`
63 + - Update primary extension for `audio/mp4`
64 +
65 +2.1.9 / 2016-01-06
66 +==================
67 +
68 + * deps: mime-db@~1.21.0
69 + - Add new mime types
70 +
71 +2.1.8 / 2015-11-30
72 +==================
73 +
74 + * deps: mime-db@~1.20.0
75 + - Add new mime types
76 +
77 +2.1.7 / 2015-09-20
78 +==================
79 +
80 + * deps: mime-db@~1.19.0
81 + - Add new mime types
82 +
83 +2.1.6 / 2015-09-03
84 +==================
85 +
86 + * deps: mime-db@~1.18.0
87 + - Add new mime types
88 +
89 +2.1.5 / 2015-08-20
90 +==================
91 +
92 + * deps: mime-db@~1.17.0
93 + - Add new mime types
94 +
95 +2.1.4 / 2015-07-30
96 +==================
97 +
98 + * deps: mime-db@~1.16.0
99 + - Add new mime types
100 +
101 +2.1.3 / 2015-07-13
102 +==================
103 +
104 + * deps: mime-db@~1.15.0
105 + - Add new mime types
106 +
107 +2.1.2 / 2015-06-25
108 +==================
109 +
110 + * deps: mime-db@~1.14.0
111 + - Add new mime types
112 +
113 +2.1.1 / 2015-06-08
114 +==================
115 +
116 + * perf: fix deopt during mapping
117 +
118 +2.1.0 / 2015-06-07
119 +==================
120 +
121 + * Fix incorrectly treating extension-less file name as extension
122 + - i.e. `'path/to/json'` will no longer return `application/json`
123 + * Fix `.charset(type)` to accept parameters
124 + * Fix `.charset(type)` to match case-insensitive
125 + * Improve generation of extension to MIME mapping
126 + * Refactor internals for readability and no argument reassignment
127 + * Prefer `application/*` MIME types from the same source
128 + * Prefer any type over `application/octet-stream`
129 + * deps: mime-db@~1.13.0
130 + - Add nginx as a source
131 + - Add new mime types
132 +
133 +2.0.14 / 2015-06-06
134 +===================
135 +
136 + * deps: mime-db@~1.12.0
137 + - Add new mime types
138 +
139 +2.0.13 / 2015-05-31
140 +===================
141 +
142 + * deps: mime-db@~1.11.0
143 + - Add new mime types
144 +
145 +2.0.12 / 2015-05-19
146 +===================
147 +
148 + * deps: mime-db@~1.10.0
149 + - Add new mime types
150 +
151 +2.0.11 / 2015-05-05
152 +===================
153 +
154 + * deps: mime-db@~1.9.1
155 + - Add new mime types
156 +
157 +2.0.10 / 2015-03-13
158 +===================
159 +
160 + * deps: mime-db@~1.8.0
161 + - Add new mime types
162 +
163 +2.0.9 / 2015-02-09
164 +==================
165 +
166 + * deps: mime-db@~1.7.0
167 + - Add new mime types
168 + - Community extensions ownership transferred from `node-mime`
169 +
170 +2.0.8 / 2015-01-29
171 +==================
172 +
173 + * deps: mime-db@~1.6.0
174 + - Add new mime types
175 +
176 +2.0.7 / 2014-12-30
177 +==================
178 +
179 + * deps: mime-db@~1.5.0
180 + - Add new mime types
181 + - Fix various invalid MIME type entries
182 +
183 +2.0.6 / 2014-12-30
184 +==================
185 +
186 + * deps: mime-db@~1.4.0
187 + - Add new mime types
188 + - Fix various invalid MIME type entries
189 + - Remove example template MIME types
190 +
191 +2.0.5 / 2014-12-29
192 +==================
193 +
194 + * deps: mime-db@~1.3.1
195 + - Fix missing extensions
196 +
197 +2.0.4 / 2014-12-10
198 +==================
199 +
200 + * deps: mime-db@~1.3.0
201 + - Add new mime types
202 +
203 +2.0.3 / 2014-11-09
204 +==================
205 +
206 + * deps: mime-db@~1.2.0
207 + - Add new mime types
208 +
209 +2.0.2 / 2014-09-28
210 +==================
211 +
212 + * deps: mime-db@~1.1.0
213 + - Add new mime types
214 + - Add additional compressible
215 + - Update charsets
216 +
217 +2.0.1 / 2014-09-07
218 +==================
219 +
220 + * Support Node.js 0.6
221 +
222 +2.0.0 / 2014-09-02
223 +==================
224 +
225 + * Use `mime-db`
226 + * Remove `.define()`
227 +
228 +1.0.2 / 2014-08-04
229 +==================
230 +
231 + * Set charset=utf-8 for `text/javascript`
232 +
233 +1.0.1 / 2014-06-24
234 +==================
235 +
236 + * Add `text/jsx` type
237 +
238 +1.0.0 / 2014-05-12
239 +==================
240 +
241 + * Return `false` for unknown types
242 + * Set charset=utf-8 for `application/json`
243 +
244 +0.1.0 / 2014-05-02
245 +==================
246 +
247 + * Initial release
1 +(The MIT License)
2 +
3 +Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
4 +Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
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.
1 +# mime-types
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 +The ultimate javascript content-type utility.
10 +
11 +Similar to [the `mime` module](https://www.npmjs.com/package/mime), except:
12 +
13 +- __No fallbacks.__ Instead of naively returning the first available type,
14 + `mime-types` simply returns `false`, so do
15 + `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
16 +- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
17 +- No `.define()` functionality
18 +- Bug fixes for `.lookup(path)`
19 +
20 +Otherwise, the API is compatible.
21 +
22 +## Install
23 +
24 +This is a [Node.js](https://nodejs.org/en/) module available through the
25 +[npm registry](https://www.npmjs.com/). Installation is done using the
26 +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
27 +
28 +```sh
29 +$ npm install mime-types
30 +```
31 +
32 +## Adding Types
33 +
34 +All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db),
35 +so open a PR there if you'd like to add mime types.
36 +
37 +## API
38 +
39 +```js
40 +var mime = require('mime-types')
41 +```
42 +
43 +All functions return `false` if input is invalid or not found.
44 +
45 +### mime.lookup(path)
46 +
47 +Lookup the content-type associated with a file.
48 +
49 +```js
50 +mime.lookup('json') // 'application/json'
51 +mime.lookup('.md') // 'text/markdown'
52 +mime.lookup('file.html') // 'text/html'
53 +mime.lookup('folder/file.js') // 'application/javascript'
54 +mime.lookup('folder/.htaccess') // false
55 +
56 +mime.lookup('cats') // false
57 +```
58 +
59 +### mime.contentType(type)
60 +
61 +Create a full content-type header given a content-type or extension.
62 +
63 +```js
64 +mime.contentType('markdown') // 'text/x-markdown; charset=utf-8'
65 +mime.contentType('file.json') // 'application/json; charset=utf-8'
66 +
67 +// from a full path
68 +mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8'
69 +```
70 +
71 +### mime.extension(type)
72 +
73 +Get the default extension for a content-type.
74 +
75 +```js
76 +mime.extension('application/octet-stream') // 'bin'
77 +```
78 +
79 +### mime.charset(type)
80 +
81 +Lookup the implied default charset of a content-type.
82 +
83 +```js
84 +mime.charset('text/markdown') // 'UTF-8'
85 +```
86 +
87 +### var type = mime.types[extension]
88 +
89 +A map of content-types by extension.
90 +
91 +### [extensions...] = mime.extensions[type]
92 +
93 +A map of extensions by content-type.
94 +
95 +## License
96 +
97 +[MIT](LICENSE)
98 +
99 +[npm-image]: https://img.shields.io/npm/v/mime-types.svg
100 +[npm-url]: https://npmjs.org/package/mime-types
101 +[node-version-image]: https://img.shields.io/node/v/mime-types.svg
102 +[node-version-url]: https://nodejs.org/en/download/
103 +[travis-image]: https://img.shields.io/travis/jshttp/mime-types/master.svg
104 +[travis-url]: https://travis-ci.org/jshttp/mime-types
105 +[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types/master.svg
106 +[coveralls-url]: https://coveralls.io/r/jshttp/mime-types
107 +[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg
108 +[downloads-url]: https://npmjs.org/package/mime-types
1 +/*!
2 + * mime-types
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 dependencies.
12 + * @private
13 + */
14 +
15 +var db = require('mime-db')
16 +var extname = require('path').extname
17 +
18 +/**
19 + * Module variables.
20 + * @private
21 + */
22 +
23 +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/
24 +var TEXT_TYPE_REGEXP = /^text\//i
25 +
26 +/**
27 + * Module exports.
28 + * @public
29 + */
30 +
31 +exports.charset = charset
32 +exports.charsets = { lookup: charset }
33 +exports.contentType = contentType
34 +exports.extension = extension
35 +exports.extensions = Object.create(null)
36 +exports.lookup = lookup
37 +exports.types = Object.create(null)
38 +
39 +// Populate the extensions/types maps
40 +populateMaps(exports.extensions, exports.types)
41 +
42 +/**
43 + * Get the default charset for a MIME type.
44 + *
45 + * @param {string} type
46 + * @return {boolean|string}
47 + */
48 +
49 +function charset (type) {
50 + if (!type || typeof type !== 'string') {
51 + return false
52 + }
53 +
54 + // TODO: use media-typer
55 + var match = EXTRACT_TYPE_REGEXP.exec(type)
56 + var mime = match && db[match[1].toLowerCase()]
57 +
58 + if (mime && mime.charset) {
59 + return mime.charset
60 + }
61 +
62 + // default text/* to utf-8
63 + if (match && TEXT_TYPE_REGEXP.test(match[1])) {
64 + return 'UTF-8'
65 + }
66 +
67 + return false
68 +}
69 +
70 +/**
71 + * Create a full Content-Type header given a MIME type or extension.
72 + *
73 + * @param {string} str
74 + * @return {boolean|string}
75 + */
76 +
77 +function contentType (str) {
78 + // TODO: should this even be in this module?
79 + if (!str || typeof str !== 'string') {
80 + return false
81 + }
82 +
83 + var mime = str.indexOf('/') === -1
84 + ? exports.lookup(str)
85 + : str
86 +
87 + if (!mime) {
88 + return false
89 + }
90 +
91 + // TODO: use content-type or other module
92 + if (mime.indexOf('charset') === -1) {
93 + var charset = exports.charset(mime)
94 + if (charset) mime += '; charset=' + charset.toLowerCase()
95 + }
96 +
97 + return mime
98 +}
99 +
100 +/**
101 + * Get the default extension for a MIME type.
102 + *
103 + * @param {string} type
104 + * @return {boolean|string}
105 + */
106 +
107 +function extension (type) {
108 + if (!type || typeof type !== 'string') {
109 + return false
110 + }
111 +
112 + // TODO: use media-typer
113 + var match = EXTRACT_TYPE_REGEXP.exec(type)
114 +
115 + // get extensions
116 + var exts = match && exports.extensions[match[1].toLowerCase()]
117 +
118 + if (!exts || !exts.length) {
119 + return false
120 + }
121 +
122 + return exts[0]
123 +}
124 +
125 +/**
126 + * Lookup the MIME type for a file path/extension.
127 + *
128 + * @param {string} path
129 + * @return {boolean|string}
130 + */
131 +
132 +function lookup (path) {
133 + if (!path || typeof path !== 'string') {
134 + return false
135 + }
136 +
137 + // get the extension ("ext" or ".ext" or full path)
138 + var extension = extname('x.' + path)
139 + .toLowerCase()
140 + .substr(1)
141 +
142 + if (!extension) {
143 + return false
144 + }
145 +
146 + return exports.types[extension] || false
147 +}
148 +
149 +/**
150 + * Populate the extensions and types maps.
151 + * @private
152 + */
153 +
154 +function populateMaps (extensions, types) {
155 + // source preference (least -> most)
156 + var preference = ['nginx', 'apache', undefined, 'iana']
157 +
158 + Object.keys(db).forEach(function forEachMimeType (type) {
159 + var mime = db[type]
160 + var exts = mime.extensions
161 +
162 + if (!exts || !exts.length) {
163 + return
164 + }
165 +
166 + // mime -> extensions
167 + extensions[type] = exts
168 +
169 + // extension -> mime
170 + for (var i = 0; i < exts.length; i++) {
171 + var extension = exts[i]
172 +
173 + if (types[extension]) {
174 + var from = preference.indexOf(db[types[extension]].source)
175 + var to = preference.indexOf(mime.source)
176 +
177 + if (types[extension] !== 'application/octet-stream' &&
178 + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {
179 + // skip the remapping
180 + continue
181 + }
182 + }
183 +
184 + // set the extension -> mime
185 + types[extension] = type
186 + }
187 + })
188 +}
1 +{
2 + "_from": "mime-types@~2.1.16",
3 + "_id": "mime-types@2.1.17",
4 + "_inBundle": false,
5 + "_integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=",
6 + "_location": "/accepts/mime-types",
7 + "_phantomChildren": {},
8 + "_requested": {
9 + "type": "range",
10 + "registry": true,
11 + "raw": "mime-types@~2.1.16",
12 + "name": "mime-types",
13 + "escapedName": "mime-types",
14 + "rawSpec": "~2.1.16",
15 + "saveSpec": null,
16 + "fetchSpec": "~2.1.16"
17 + },
18 + "_requiredBy": [
19 + "/accepts"
20 + ],
21 + "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
22 + "_shasum": "09d7a393f03e995a79f8af857b70a9e0ab16557a",
23 + "_spec": "mime-types@~2.1.16",
24 + "_where": "C:\\Users\\PARK\\Desktop\\새 폴더\\RUTROLL\\node_modules\\accepts",
25 + "bugs": {
26 + "url": "https://github.com/jshttp/mime-types/issues"
27 + },
28 + "bundleDependencies": false,
29 + "contributors": [
30 + {
31 + "name": "Douglas Christopher Wilson",
32 + "email": "doug@somethingdoug.com"
33 + },
34 + {
35 + "name": "Jeremiah Senkpiel",
36 + "email": "fishrock123@rocketmail.com",
37 + "url": "https://searchbeam.jit.su"
38 + },
39 + {
40 + "name": "Jonathan Ong",
41 + "email": "me@jongleberry.com",
42 + "url": "http://jongleberry.com"
43 + }
44 + ],
45 + "dependencies": {
46 + "mime-db": "~1.30.0"
47 + },
48 + "deprecated": false,
49 + "description": "The ultimate javascript content-type utility.",
50 + "devDependencies": {
51 + "eslint": "3.19.0",
52 + "eslint-config-standard": "10.2.1",
53 + "eslint-plugin-import": "2.7.0",
54 + "eslint-plugin-node": "5.1.1",
55 + "eslint-plugin-promise": "3.5.0",
56 + "eslint-plugin-standard": "3.0.1",
57 + "istanbul": "0.4.5",
58 + "mocha": "1.21.5"
59 + },
60 + "engines": {
61 + "node": ">= 0.6"
62 + },
63 + "files": [
64 + "HISTORY.md",
65 + "LICENSE",
66 + "index.js"
67 + ],
68 + "homepage": "https://github.com/jshttp/mime-types#readme",
69 + "keywords": [
70 + "mime",
71 + "types"
72 + ],
73 + "license": "MIT",
74 + "name": "mime-types",
75 + "repository": {
76 + "type": "git",
77 + "url": "git+https://github.com/jshttp/mime-types.git"
78 + },
79 + "scripts": {
80 + "lint": "eslint .",
81 + "test": "mocha --reporter spec test/test.js",
82 + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js",
83 + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js"
84 + },
85 + "version": "2.1.17"
86 +}
1 +{
2 + "_from": "accepts@~1.3.4",
3 + "_id": "accepts@1.3.4",
4 + "_inBundle": false,
5 + "_integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=",
6 + "_location": "/accepts",
7 + "_phantomChildren": {},
8 + "_requested": {
9 + "type": "range",
10 + "registry": true,
11 + "raw": "accepts@~1.3.4",
12 + "name": "accepts",
13 + "escapedName": "accepts",
14 + "rawSpec": "~1.3.4",
15 + "saveSpec": null,
16 + "fetchSpec": "~1.3.4"
17 + },
18 + "_requiredBy": [
19 + "/express"
20 + ],
21 + "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz",
22 + "_shasum": "86246758c7dd6d21a6474ff084a4740ec05eb21f",
23 + "_spec": "accepts@~1.3.4",
24 + "_where": "C:\\Users\\PARK\\Desktop\\새 폴더\\RUTROLL\\node_modules\\express",
25 + "bugs": {
26 + "url": "https://github.com/jshttp/accepts/issues"
27 + },
28 + "bundleDependencies": false,
29 + "contributors": [
30 + {
31 + "name": "Douglas Christopher Wilson",
32 + "email": "doug@somethingdoug.com"
33 + },
34 + {
35 + "name": "Jonathan Ong",
36 + "email": "me@jongleberry.com",
37 + "url": "http://jongleberry.com"
38 + }
39 + ],
40 + "dependencies": {
41 + "mime-types": "~2.1.16",
42 + "negotiator": "0.6.1"
43 + },
44 + "deprecated": false,
45 + "description": "Higher-level content negotiation",
46 + "devDependencies": {
47 + "eslint": "3.19.0",
48 + "eslint-config-standard": "10.2.1",
49 + "eslint-plugin-import": "2.7.0",
50 + "eslint-plugin-markdown": "1.0.0-beta.6",
51 + "eslint-plugin-node": "5.1.1",
52 + "eslint-plugin-promise": "3.5.0",
53 + "eslint-plugin-standard": "3.0.1",
54 + "istanbul": "0.4.5",
55 + "mocha": "~1.21.5"
56 + },
57 + "engines": {
58 + "node": ">= 0.6"
59 + },
60 + "files": [
61 + "LICENSE",
62 + "HISTORY.md",
63 + "index.js"
64 + ],
65 + "homepage": "https://github.com/jshttp/accepts#readme",
66 + "keywords": [
67 + "content",
68 + "negotiation",
69 + "accept",
70 + "accepts"
71 + ],
72 + "license": "MIT",
73 + "name": "accepts",
74 + "repository": {
75 + "type": "git",
76 + "url": "git+https://github.com/jshttp/accepts.git"
77 + },
78 + "scripts": {
79 + "lint": "eslint --plugin markdown --ext js,md .",
80 + "test": "mocha --reporter spec --check-leaks --bail test/",
81 + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
82 + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
83 + },
84 + "version": "1.3.4"
85 +}
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.
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
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 +}
1 +{
2 + "_from": "array-flatten@1.1.1",
3 + "_id": "array-flatten@1.1.1",
4 + "_inBundle": false,
5 + "_integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=",
6 + "_location": "/array-flatten",
7 + "_phantomChildren": {},
8 + "_requested": {
9 + "type": "version",
10 + "registry": true,
11 + "raw": "array-flatten@1.1.1",
12 + "name": "array-flatten",
13 + "escapedName": "array-flatten",
14 + "rawSpec": "1.1.1",
15 + "saveSpec": null,
16 + "fetchSpec": "1.1.1"
17 + },
18 + "_requiredBy": [
19 + "/express"
20 + ],
21 + "_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
22 + "_shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2",
23 + "_spec": "array-flatten@1.1.1",
24 + "_where": "C:\\Users\\PARK\\Desktop\\새 폴더\\RUTROLL\\node_modules\\express",
25 + "author": {
26 + "name": "Blake Embrey",
27 + "email": "hello@blakeembrey.com",
28 + "url": "http://blakeembrey.me"
29 + },
30 + "bugs": {
31 + "url": "https://github.com/blakeembrey/array-flatten/issues"
32 + },
33 + "bundleDependencies": false,
34 + "deprecated": false,
35 + "description": "Flatten an array of nested arrays into a single flat array",
36 + "devDependencies": {
37 + "istanbul": "^0.3.13",
38 + "mocha": "^2.2.4",
39 + "pre-commit": "^1.0.7",
40 + "standard": "^3.7.3"
41 + },
42 + "files": [
43 + "array-flatten.js",
44 + "LICENSE"
45 + ],
46 + "homepage": "https://github.com/blakeembrey/array-flatten",
47 + "keywords": [
48 + "array",
49 + "flatten",
50 + "arguments",
51 + "depth"
52 + ],
53 + "license": "MIT",
54 + "main": "array-flatten.js",
55 + "name": "array-flatten",
56 + "repository": {
57 + "type": "git",
58 + "url": "git://github.com/blakeembrey/array-flatten.git"
59 + },
60 + "scripts": {
61 + "test": "istanbul cover _mocha -- -R spec"
62 + },
63 + "version": "1.1.1"
64 +}
1 +Dave Eddy <dave@daveeddy.com>
2 +Fred Kuo <fred.kuo@joyent.com>
3 +Lars-Magnus Skog <ralphtheninja@riseup.net>
4 +Mark Cavage <mcavage@gmail.com>
5 +Patrick Mooney <pmooney@pfmooney.com>
6 +Rob Gulewich <robert.gulewich@joyent.com>
1 +# assert-plus Changelog
2 +
3 +## 1.0.0
4 +
5 +- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input
6 +- Add assert.finite check. Previous assert.number callers should use this if
7 + they expect Infinity inputs to throw.
8 +
9 +## 0.2.0
10 +
11 +- Fix `assert.object(null)` so it throws
12 +- Fix optional/arrayOf exports for non-type-of asserts
13 +- Add optiona/arrayOf exports for Stream/Date/Regex/uuid
14 +- Add basic unit test coverage
1 +# assert-plus
2 +
3 +This library is a super small wrapper over node's assert module that has two
4 +things: (1) the ability to disable assertions with the environment variable
5 +NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like
6 +`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
7 +like this:
8 +
9 +```javascript
10 + var assert = require('assert-plus');
11 +
12 + function fooAccount(options, callback) {
13 + assert.object(options, 'options');
14 + assert.number(options.id, 'options.id');
15 + assert.bool(options.isManager, 'options.isManager');
16 + assert.string(options.name, 'options.name');
17 + assert.arrayOfString(options.email, 'options.email');
18 + assert.func(callback, 'callback');
19 +
20 + // Do stuff
21 + callback(null, {});
22 + }
23 +```
24 +
25 +# API
26 +
27 +All methods that *aren't* part of node's core assert API are simply assumed to
28 +take an argument, and then a string 'name' that's not a message; `AssertionError`
29 +will be thrown if the assertion fails with a message like:
30 +
31 + AssertionError: foo (string) is required
32 + at test (/home/mark/work/foo/foo.js:3:9)
33 + at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)
34 + at Module._compile (module.js:446:26)
35 + at Object..js (module.js:464:10)
36 + at Module.load (module.js:353:31)
37 + at Function._load (module.js:311:12)
38 + at Array.0 (module.js:484:10)
39 + at EventEmitter._tickCallback (node.js:190:38)
40 +
41 +from:
42 +
43 +```javascript
44 + function test(foo) {
45 + assert.string(foo, 'foo');
46 + }
47 +```
48 +
49 +There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`:
50 +
51 +```javascript
52 + function test(foo) {
53 + assert.arrayOfString(foo, 'foo');
54 + }
55 +```
56 +
57 +You can assert IFF an argument is not `undefined` (i.e., an optional arg):
58 +
59 +```javascript
60 + assert.optionalString(foo, 'foo');
61 +```
62 +
63 +Lastly, you can opt-out of assertion checking altogether by setting the
64 +environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
65 +lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
66 +production. Be advised: The standard functions re-exported from `assert` are
67 +also disabled in assert-plus if NDEBUG is specified. Using them directly from
68 +the `assert` module avoids this behavior.
69 +
70 +The complete list of APIs is:
71 +
72 +* assert.array
73 +* assert.bool
74 +* assert.buffer
75 +* assert.func
76 +* assert.number
77 +* assert.finite
78 +* assert.object
79 +* assert.string
80 +* assert.stream
81 +* assert.date
82 +* assert.regexp
83 +* assert.uuid
84 +* assert.arrayOfArray
85 +* assert.arrayOfBool
86 +* assert.arrayOfBuffer
87 +* assert.arrayOfFunc
88 +* assert.arrayOfNumber
89 +* assert.arrayOfFinite
90 +* assert.arrayOfObject
91 +* assert.arrayOfString
92 +* assert.arrayOfStream
93 +* assert.arrayOfDate
94 +* assert.arrayOfRegexp
95 +* assert.arrayOfUuid
96 +* assert.optionalArray
97 +* assert.optionalBool
98 +* assert.optionalBuffer
99 +* assert.optionalFunc
100 +* assert.optionalNumber
101 +* assert.optionalFinite
102 +* assert.optionalObject
103 +* assert.optionalString
104 +* assert.optionalStream
105 +* assert.optionalDate
106 +* assert.optionalRegexp
107 +* assert.optionalUuid
108 +* assert.optionalArrayOfArray
109 +* assert.optionalArrayOfBool
110 +* assert.optionalArrayOfBuffer
111 +* assert.optionalArrayOfFunc
112 +* assert.optionalArrayOfNumber
113 +* assert.optionalArrayOfFinite
114 +* assert.optionalArrayOfObject
115 +* assert.optionalArrayOfString
116 +* assert.optionalArrayOfStream
117 +* assert.optionalArrayOfDate
118 +* assert.optionalArrayOfRegexp
119 +* assert.optionalArrayOfUuid
120 +* assert.AssertionError
121 +* assert.fail
122 +* assert.ok
123 +* assert.equal
124 +* assert.notEqual
125 +* assert.deepEqual
126 +* assert.notDeepEqual
127 +* assert.strictEqual
128 +* assert.notStrictEqual
129 +* assert.throws
130 +* assert.doesNotThrow
131 +* assert.ifError
132 +
133 +# Installation
134 +
135 + npm install assert-plus
136 +
137 +## License
138 +
139 +The MIT License (MIT)
140 +Copyright (c) 2012 Mark Cavage
141 +
142 +Permission is hereby granted, free of charge, to any person obtaining a copy of
143 +this software and associated documentation files (the "Software"), to deal in
144 +the Software without restriction, including without limitation the rights to
145 +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
146 +the Software, and to permit persons to whom the Software is furnished to do so,
147 +subject to the following conditions:
148 +
149 +The above copyright notice and this permission notice shall be included in all
150 +copies or substantial portions of the Software.
151 +
152 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
153 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
154 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
155 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
156 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
157 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
158 +SOFTWARE.
159 +
160 +## Bugs
161 +
162 +See <https://github.com/mcavage/node-assert-plus/issues>.
1 +// Copyright (c) 2012, Mark Cavage. All rights reserved.
2 +// Copyright 2015 Joyent, Inc.
3 +
4 +var assert = require('assert');
5 +var Stream = require('stream').Stream;
6 +var util = require('util');
7 +
8 +
9 +///--- Globals
10 +
11 +/* JSSTYLED */
12 +var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
13 +
14 +
15 +///--- Internal
16 +
17 +function _capitalize(str) {
18 + return (str.charAt(0).toUpperCase() + str.slice(1));
19 +}
20 +
21 +function _toss(name, expected, oper, arg, actual) {
22 + throw new assert.AssertionError({
23 + message: util.format('%s (%s) is required', name, expected),
24 + actual: (actual === undefined) ? typeof (arg) : actual(arg),
25 + expected: expected,
26 + operator: oper || '===',
27 + stackStartFunction: _toss.caller
28 + });
29 +}
30 +
31 +function _getClass(arg) {
32 + return (Object.prototype.toString.call(arg).slice(8, -1));
33 +}
34 +
35 +function noop() {
36 + // Why even bother with asserts?
37 +}
38 +
39 +
40 +///--- Exports
41 +
42 +var types = {
43 + bool: {
44 + check: function (arg) { return typeof (arg) === 'boolean'; }
45 + },
46 + func: {
47 + check: function (arg) { return typeof (arg) === 'function'; }
48 + },
49 + string: {
50 + check: function (arg) { return typeof (arg) === 'string'; }
51 + },
52 + object: {
53 + check: function (arg) {
54 + return typeof (arg) === 'object' && arg !== null;
55 + }
56 + },
57 + number: {
58 + check: function (arg) {
59 + return typeof (arg) === 'number' && !isNaN(arg);
60 + }
61 + },
62 + finite: {
63 + check: function (arg) {
64 + return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
65 + }
66 + },
67 + buffer: {
68 + check: function (arg) { return Buffer.isBuffer(arg); },
69 + operator: 'Buffer.isBuffer'
70 + },
71 + array: {
72 + check: function (arg) { return Array.isArray(arg); },
73 + operator: 'Array.isArray'
74 + },
75 + stream: {
76 + check: function (arg) { return arg instanceof Stream; },
77 + operator: 'instanceof',
78 + actual: _getClass
79 + },
80 + date: {
81 + check: function (arg) { return arg instanceof Date; },
82 + operator: 'instanceof',
83 + actual: _getClass
84 + },
85 + regexp: {
86 + check: function (arg) { return arg instanceof RegExp; },
87 + operator: 'instanceof',
88 + actual: _getClass
89 + },
90 + uuid: {
91 + check: function (arg) {
92 + return typeof (arg) === 'string' && UUID_REGEXP.test(arg);
93 + },
94 + operator: 'isUUID'
95 + }
96 +};
97 +
98 +function _setExports(ndebug) {
99 + var keys = Object.keys(types);
100 + var out;
101 +
102 + /* re-export standard assert */
103 + if (process.env.NODE_NDEBUG) {
104 + out = noop;
105 + } else {
106 + out = function (arg, msg) {
107 + if (!arg) {
108 + _toss(msg, 'true', arg);
109 + }
110 + };
111 + }
112 +
113 + /* standard checks */
114 + keys.forEach(function (k) {
115 + if (ndebug) {
116 + out[k] = noop;
117 + return;
118 + }
119 + var type = types[k];
120 + out[k] = function (arg, msg) {
121 + if (!type.check(arg)) {
122 + _toss(msg, k, type.operator, arg, type.actual);
123 + }
124 + };
125 + });
126 +
127 + /* optional checks */
128 + keys.forEach(function (k) {
129 + var name = 'optional' + _capitalize(k);
130 + if (ndebug) {
131 + out[name] = noop;
132 + return;
133 + }
134 + var type = types[k];
135 + out[name] = function (arg, msg) {
136 + if (arg === undefined || arg === null) {
137 + return;
138 + }
139 + if (!type.check(arg)) {
140 + _toss(msg, k, type.operator, arg, type.actual);
141 + }
142 + };
143 + });
144 +
145 + /* arrayOf checks */
146 + keys.forEach(function (k) {
147 + var name = 'arrayOf' + _capitalize(k);
148 + if (ndebug) {
149 + out[name] = noop;
150 + return;
151 + }
152 + var type = types[k];
153 + var expected = '[' + k + ']';
154 + out[name] = function (arg, msg) {
155 + if (!Array.isArray(arg)) {
156 + _toss(msg, expected, type.operator, arg, type.actual);
157 + }
158 + var i;
159 + for (i = 0; i < arg.length; i++) {
160 + if (!type.check(arg[i])) {
161 + _toss(msg, expected, type.operator, arg, type.actual);
162 + }
163 + }
164 + };
165 + });
166 +
167 + /* optionalArrayOf checks */
168 + keys.forEach(function (k) {
169 + var name = 'optionalArrayOf' + _capitalize(k);
170 + if (ndebug) {
171 + out[name] = noop;
172 + return;
173 + }
174 + var type = types[k];
175 + var expected = '[' + k + ']';
176 + out[name] = function (arg, msg) {
177 + if (arg === undefined || arg === null) {
178 + return;
179 + }
180 + if (!Array.isArray(arg)) {
181 + _toss(msg, expected, type.operator, arg, type.actual);
182 + }
183 + var i;
184 + for (i = 0; i < arg.length; i++) {
185 + if (!type.check(arg[i])) {
186 + _toss(msg, expected, type.operator, arg, type.actual);
187 + }
188 + }
189 + };
190 + });
191 +
192 + /* re-export built-in assertions */
193 + Object.keys(assert).forEach(function (k) {
194 + if (k === 'AssertionError') {
195 + out[k] = assert[k];
196 + return;
197 + }
198 + if (ndebug) {
199 + out[k] = noop;
200 + return;
201 + }
202 + out[k] = assert[k];
203 + });
204 +
205 + /* export ourselves (for unit tests _only_) */
206 + out._setExports = _setExports;
207 +
208 + return out;
209 +}
210 +
211 +module.exports = _setExports(process.env.NODE_NDEBUG);
1 +{
2 + "_from": "assert-plus@^1.0.0",
3 + "_id": "assert-plus@1.0.0",
4 + "_inBundle": false,
5 + "_integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
6 + "_location": "/assert-plus",
7 + "_phantomChildren": {},
8 + "_requested": {
9 + "type": "range",
10 + "registry": true,
11 + "raw": "assert-plus@^1.0.0",
12 + "name": "assert-plus",
13 + "escapedName": "assert-plus",
14 + "rawSpec": "^1.0.0",
15 + "saveSpec": null,
16 + "fetchSpec": "^1.0.0"
17 + },
18 + "_requiredBy": [
19 + "/http-signature"
20 + ],
21 + "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
22 + "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
23 + "_spec": "assert-plus@^1.0.0",
24 + "_where": "C:\\Users\\PARK\\Desktop\\새 폴더\\RUTROLL\\node_modules\\http-signature",
25 + "author": {
26 + "name": "Mark Cavage",
27 + "email": "mcavage@gmail.com"
28 + },
29 + "bugs": {
30 + "url": "https://github.com/mcavage/node-assert-plus/issues"
31 + },
32 + "bundleDependencies": false,
33 + "contributors": [
34 + {
35 + "name": "Dave Eddy",
36 + "email": "dave@daveeddy.com"
37 + },
38 + {
39 + "name": "Fred Kuo",
40 + "email": "fred.kuo@joyent.com"
41 + },
42 + {
43 + "name": "Lars-Magnus Skog",
44 + "email": "ralphtheninja@riseup.net"
45 + },
46 + {
47 + "name": "Mark Cavage",
48 + "email": "mcavage@gmail.com"
49 + },
50 + {
51 + "name": "Patrick Mooney",
52 + "email": "pmooney@pfmooney.com"
53 + },
54 + {
55 + "name": "Rob Gulewich",
56 + "email": "robert.gulewich@joyent.com"
57 + }
58 + ],
59 + "dependencies": {},
60 + "deprecated": false,
61 + "description": "Extra assertions on top of node's assert module",
62 + "devDependencies": {
63 + "faucet": "0.0.1",
64 + "tape": "4.2.2"
65 + },
66 + "engines": {
67 + "node": ">=0.8"
68 + },
69 + "homepage": "https://github.com/mcavage/node-assert-plus#readme",
70 + "license": "MIT",
71 + "main": "./assert.js",
72 + "name": "assert-plus",
73 + "optionalDependencies": {},
74 + "repository": {
75 + "type": "git",
76 + "url": "git+https://github.com/mcavage/node-assert-plus.git"
77 + },
78 + "scripts": {
79 + "test": "tape tests/*.js | ./node_modules/.bin/faucet"
80 + },
81 + "version": "1.0.0"
82 +}
1 +The MIT License (MIT)
2 +
3 +Copyright (c) 2016 Alex Indigo
4 +
5 +Permission is hereby granted, free of charge, to any person obtaining a copy
6 +of this software and associated documentation files (the "Software"), to deal
7 +in the Software without restriction, including without limitation the rights
8 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 +copies of the Software, and to permit persons to whom the Software is
10 +furnished to do so, subject to the following conditions:
11 +
12 +The above copyright notice and this permission notice shall be included in all
13 +copies or substantial portions of the Software.
14 +
15 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 +SOFTWARE.
1 +# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit)
2 +
3 +Minimal async jobs utility library, with streams support.
4 +
5 +[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit)
6 +[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit)
7 +[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit)
8 +
9 +[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master)
10 +[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit)
11 +[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit)
12 +
13 +<!-- [![Readme](https://img.shields.io/badge/readme-tested-brightgreen.svg?style=flat)](https://www.npmjs.com/package/reamde) -->
14 +
15 +AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects.
16 +Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method.
17 +
18 +It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators.
19 +
20 +| compression | size |
21 +| :----------------- | -------: |
22 +| asynckit.js | 12.34 kB |
23 +| asynckit.min.js | 4.11 kB |
24 +| asynckit.min.js.gz | 1.47 kB |
25 +
26 +
27 +## Install
28 +
29 +```sh
30 +$ npm install --save asynckit
31 +```
32 +
33 +## Examples
34 +
35 +### Parallel Jobs
36 +
37 +Runs iterator over provided array in parallel. Stores output in the `result` array,
38 +on the matching positions. In unlikely event of an error from one of the jobs,
39 +will terminate rest of the active jobs (if abort function is provided)
40 +and return error along with salvaged data to the main callback function.
41 +
42 +#### Input Array
43 +
44 +```javascript
45 +var parallel = require('asynckit').parallel
46 + , assert = require('assert')
47 + ;
48 +
49 +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
50 + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
51 + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]
52 + , target = []
53 + ;
54 +
55 +parallel(source, asyncJob, function(err, result)
56 +{
57 + assert.deepEqual(result, expectedResult);
58 + assert.deepEqual(target, expectedTarget);
59 +});
60 +
61 +// async job accepts one element from the array
62 +// and a callback function
63 +function asyncJob(item, cb)
64 +{
65 + // different delays (in ms) per item
66 + var delay = item * 25;
67 +
68 + // pretend different jobs take different time to finish
69 + // and not in consequential order
70 + var timeoutId = setTimeout(function() {
71 + target.push(item);
72 + cb(null, item * 2);
73 + }, delay);
74 +
75 + // allow to cancel "leftover" jobs upon error
76 + // return function, invoking of which will abort this job
77 + return clearTimeout.bind(null, timeoutId);
78 +}
79 +```
80 +
81 +More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js).
82 +
83 +#### Input Object
84 +
85 +Also it supports named jobs, listed via object.
86 +
87 +```javascript
88 +var parallel = require('asynckit/parallel')
89 + , assert = require('assert')
90 + ;
91 +
92 +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }
93 + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }
94 + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]
95 + , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ]
96 + , target = []
97 + , keys = []
98 + ;
99 +
100 +parallel(source, asyncJob, function(err, result)
101 +{
102 + assert.deepEqual(result, expectedResult);
103 + assert.deepEqual(target, expectedTarget);
104 + assert.deepEqual(keys, expectedKeys);
105 +});
106 +
107 +// supports full value, key, callback (shortcut) interface
108 +function asyncJob(item, key, cb)
109 +{
110 + // different delays (in ms) per item
111 + var delay = item * 25;
112 +
113 + // pretend different jobs take different time to finish
114 + // and not in consequential order
115 + var timeoutId = setTimeout(function() {
116 + keys.push(key);
117 + target.push(item);
118 + cb(null, item * 2);
119 + }, delay);
120 +
121 + // allow to cancel "leftover" jobs upon error
122 + // return function, invoking of which will abort this job
123 + return clearTimeout.bind(null, timeoutId);
124 +}
125 +```
126 +
127 +More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js).
128 +
129 +### Serial Jobs
130 +
131 +Runs iterator over provided array sequentially. Stores output in the `result` array,
132 +on the matching positions. In unlikely event of an error from one of the jobs,
133 +will not proceed to the rest of the items in the list
134 +and return error along with salvaged data to the main callback function.
135 +
136 +#### Input Array
137 +
138 +```javascript
139 +var serial = require('asynckit/serial')
140 + , assert = require('assert')
141 + ;
142 +
143 +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
144 + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
145 + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
146 + , target = []
147 + ;
148 +
149 +serial(source, asyncJob, function(err, result)
150 +{
151 + assert.deepEqual(result, expectedResult);
152 + assert.deepEqual(target, expectedTarget);
153 +});
154 +
155 +// extended interface (item, key, callback)
156 +// also supported for arrays
157 +function asyncJob(item, key, cb)
158 +{
159 + target.push(key);
160 +
161 + // it will be automatically made async
162 + // even it iterator "returns" in the same event loop
163 + cb(null, item * 2);
164 +}
165 +```
166 +
167 +More examples could be found in [test/test-serial-array.js](test/test-serial-array.js).
168 +
169 +#### Input Object
170 +
171 +Also it supports named jobs, listed via object.
172 +
173 +```javascript
174 +var serial = require('asynckit').serial
175 + , assert = require('assert')
176 + ;
177 +
178 +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
179 + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
180 + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
181 + , target = []
182 + ;
183 +
184 +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }
185 + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }
186 + , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
187 + , target = []
188 + ;
189 +
190 +
191 +serial(source, asyncJob, function(err, result)
192 +{
193 + assert.deepEqual(result, expectedResult);
194 + assert.deepEqual(target, expectedTarget);
195 +});
196 +
197 +// shortcut interface (item, callback)
198 +// works for object as well as for the arrays
199 +function asyncJob(item, cb)
200 +{
201 + target.push(item);
202 +
203 + // it will be automatically made async
204 + // even it iterator "returns" in the same event loop
205 + cb(null, item * 2);
206 +}
207 +```
208 +
209 +More examples could be found in [test/test-serial-object.js](test/test-serial-object.js).
210 +
211 +_Note: Since _object_ is an _unordered_ collection of properties,
212 +it may produce unexpected results with sequential iterations.
213 +Whenever order of the jobs' execution is important please use `serialOrdered` method._
214 +
215 +### Ordered Serial Iterations
216 +
217 +TBD
218 +
219 +For example [compare-property](compare-property) package.
220 +
221 +### Streaming interface
222 +
223 +TBD
224 +
225 +## Want to Know More?
226 +
227 +More examples can be found in [test folder](test/).
228 +
229 +Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions.
230 +
231 +## License
232 +
233 +AsyncKit is licensed under the MIT license.
1 +/* eslint no-console: "off" */
2 +
3 +var asynckit = require('./')
4 + , async = require('async')
5 + , assert = require('assert')
6 + , expected = 0
7 + ;
8 +
9 +var Benchmark = require('benchmark');
10 +var suite = new Benchmark.Suite;
11 +
12 +var source = [];
13 +for (var z = 1; z < 100; z++)
14 +{
15 + source.push(z);
16 + expected += z;
17 +}
18 +
19 +suite
20 +// add tests
21 +
22 +.add('async.map', function(deferred)
23 +{
24 + var total = 0;
25 +
26 + async.map(source,
27 + function(i, cb)
28 + {
29 + setImmediate(function()
30 + {
31 + total += i;
32 + cb(null, total);
33 + });
34 + },
35 + function(err, result)
36 + {
37 + assert.ifError(err);
38 + assert.equal(result[result.length - 1], expected);
39 + deferred.resolve();
40 + });
41 +}, {'defer': true})
42 +
43 +
44 +.add('asynckit.parallel', function(deferred)
45 +{
46 + var total = 0;
47 +
48 + asynckit.parallel(source,
49 + function(i, cb)
50 + {
51 + setImmediate(function()
52 + {
53 + total += i;
54 + cb(null, total);
55 + });
56 + },
57 + function(err, result)
58 + {
59 + assert.ifError(err);
60 + assert.equal(result[result.length - 1], expected);
61 + deferred.resolve();
62 + });
63 +}, {'defer': true})
64 +
65 +
66 +// add listeners
67 +.on('cycle', function(ev)
68 +{
69 + console.log(String(ev.target));
70 +})
71 +.on('complete', function()
72 +{
73 + console.log('Fastest is ' + this.filter('fastest').map('name'));
74 +})
75 +// run async
76 +.run({ 'async': true });
1 +module.exports =
2 +{
3 + parallel : require('./parallel.js'),
4 + serial : require('./serial.js'),
5 + serialOrdered : require('./serialOrdered.js')
6 +};
1 +// API
2 +module.exports = abort;
3 +
4 +/**
5 + * Aborts leftover active jobs
6 + *
7 + * @param {object} state - current state object
8 + */
9 +function abort(state)
10 +{
11 + Object.keys(state.jobs).forEach(clean.bind(state));
12 +
13 + // reset leftover jobs
14 + state.jobs = {};
15 +}
16 +
17 +/**
18 + * Cleans up leftover job by invoking abort function for the provided job id
19 + *
20 + * @this state
21 + * @param {string|number} key - job id to abort
22 + */
23 +function clean(key)
24 +{
25 + if (typeof this.jobs[key] == 'function')
26 + {
27 + this.jobs[key]();
28 + }
29 +}
1 +var defer = require('./defer.js');
2 +
3 +// API
4 +module.exports = async;
5 +
6 +/**
7 + * Runs provided callback asynchronously
8 + * even if callback itself is not
9 + *
10 + * @param {function} callback - callback to invoke
11 + * @returns {function} - augmented callback
12 + */
13 +function async(callback)
14 +{
15 + var isAsync = false;
16 +
17 + // check if async happened
18 + defer(function() { isAsync = true; });
19 +
20 + return function async_callback(err, result)
21 + {
22 + if (isAsync)
23 + {
24 + callback(err, result);
25 + }
26 + else
27 + {
28 + defer(function nextTick_callback()
29 + {
30 + callback(err, result);
31 + });
32 + }
33 + };
34 +}
1 +module.exports = defer;
2 +
3 +/**
4 + * Runs provided function on next iteration of the event loop
5 + *
6 + * @param {function} fn - function to run
7 + */
8 +function defer(fn)
9 +{
10 + var nextTick = typeof setImmediate == 'function'
11 + ? setImmediate
12 + : (
13 + typeof process == 'object' && typeof process.nextTick == 'function'
14 + ? process.nextTick
15 + : null
16 + );
17 +
18 + if (nextTick)
19 + {
20 + nextTick(fn);
21 + }
22 + else
23 + {
24 + setTimeout(fn, 0);
25 + }
26 +}
1 +var async = require('./async.js')
2 + , abort = require('./abort.js')
3 + ;
4 +
5 +// API
6 +module.exports = iterate;
7 +
8 +/**
9 + * Iterates over each job object
10 + *
11 + * @param {array|object} list - array or object (named list) to iterate over
12 + * @param {function} iterator - iterator to run
13 + * @param {object} state - current job status
14 + * @param {function} callback - invoked when all elements processed
15 + */
16 +function iterate(list, iterator, state, callback)
17 +{
18 + // store current index
19 + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;
20 +
21 + state.jobs[key] = runJob(iterator, key, list[key], function(error, output)
22 + {
23 + // don't repeat yourself
24 + // skip secondary callbacks
25 + if (!(key in state.jobs))
26 + {
27 + return;
28 + }
29 +
30 + // clean up jobs
31 + delete state.jobs[key];
32 +
33 + if (error)
34 + {
35 + // don't process rest of the results
36 + // stop still active jobs
37 + // and reset the list
38 + abort(state);
39 + }
40 + else
41 + {
42 + state.results[key] = output;
43 + }
44 +
45 + // return salvaged results
46 + callback(error, state.results);
47 + });
48 +}
49 +
50 +/**
51 + * Runs iterator over provided job element
52 + *
53 + * @param {function} iterator - iterator to invoke
54 + * @param {string|number} key - key/index of the element in the list of jobs
55 + * @param {mixed} item - job description
56 + * @param {function} callback - invoked after iterator is done with the job
57 + * @returns {function|mixed} - job abort function or something else
58 + */
59 +function runJob(iterator, key, item, callback)
60 +{
61 + var aborter;
62 +
63 + // allow shortcut if iterator expects only two arguments
64 + if (iterator.length == 2)
65 + {
66 + aborter = iterator(item, async(callback));
67 + }
68 + // otherwise go with full three arguments
69 + else
70 + {
71 + aborter = iterator(item, key, async(callback));
72 + }
73 +
74 + return aborter;
75 +}
1 +var streamify = require('./streamify.js')
2 + , defer = require('./defer.js')
3 + ;
4 +
5 +// API
6 +module.exports = ReadableAsyncKit;
7 +
8 +/**
9 + * Base constructor for all streams
10 + * used to hold properties/methods
11 + */
12 +function ReadableAsyncKit()
13 +{
14 + ReadableAsyncKit.super_.apply(this, arguments);
15 +
16 + // list of active jobs
17 + this.jobs = {};
18 +
19 + // add stream methods
20 + this.destroy = destroy;
21 + this._start = _start;
22 + this._read = _read;
23 +}
24 +
25 +/**
26 + * Destroys readable stream,
27 + * by aborting outstanding jobs
28 + *
29 + * @returns {void}
30 + */
31 +function destroy()
32 +{
33 + if (this.destroyed)
34 + {
35 + return;
36 + }
37 +
38 + this.destroyed = true;
39 +
40 + if (typeof this.terminator == 'function')
41 + {
42 + this.terminator();
43 + }
44 +}
45 +
46 +/**
47 + * Starts provided jobs in async manner
48 + *
49 + * @private
50 + */
51 +function _start()
52 +{
53 + // first argument – runner function
54 + var runner = arguments[0]
55 + // take away first argument
56 + , args = Array.prototype.slice.call(arguments, 1)
57 + // second argument - input data
58 + , input = args[0]
59 + // last argument - result callback
60 + , endCb = streamify.callback.call(this, args[args.length - 1])
61 + ;
62 +
63 + args[args.length - 1] = endCb;
64 + // third argument - iterator
65 + args[1] = streamify.iterator.call(this, args[1]);
66 +
67 + // allow time for proper setup
68 + defer(function()
69 + {
70 + if (!this.destroyed)
71 + {
72 + this.terminator = runner.apply(null, args);
73 + }
74 + else
75 + {
76 + endCb(null, Array.isArray(input) ? [] : {});
77 + }
78 + }.bind(this));
79 +}
80 +
81 +
82 +/**
83 + * Implement _read to comply with Readable streams
84 + * Doesn't really make sense for flowing object mode
85 + *
86 + * @private
87 + */
88 +function _read()
89 +{
90 +
91 +}
1 +var parallel = require('../parallel.js');
2 +
3 +// API
4 +module.exports = ReadableParallel;
5 +
6 +/**
7 + * Streaming wrapper to `asynckit.parallel`
8 + *
9 + * @param {array|object} list - array or object (named list) to iterate over
10 + * @param {function} iterator - iterator to run
11 + * @param {function} callback - invoked when all elements processed
12 + * @returns {stream.Readable#}
13 + */
14 +function ReadableParallel(list, iterator, callback)
15 +{
16 + if (!(this instanceof ReadableParallel))
17 + {
18 + return new ReadableParallel(list, iterator, callback);
19 + }
20 +
21 + // turn on object mode
22 + ReadableParallel.super_.call(this, {objectMode: true});
23 +
24 + this._start(parallel, list, iterator, callback);
25 +}
1 +var serial = require('../serial.js');
2 +
3 +// API
4 +module.exports = ReadableSerial;
5 +
6 +/**
7 + * Streaming wrapper to `asynckit.serial`
8 + *
9 + * @param {array|object} list - array or object (named list) to iterate over
10 + * @param {function} iterator - iterator to run
11 + * @param {function} callback - invoked when all elements processed
12 + * @returns {stream.Readable#}
13 + */
14 +function ReadableSerial(list, iterator, callback)
15 +{
16 + if (!(this instanceof ReadableSerial))
17 + {
18 + return new ReadableSerial(list, iterator, callback);
19 + }
20 +
21 + // turn on object mode
22 + ReadableSerial.super_.call(this, {objectMode: true});
23 +
24 + this._start(serial, list, iterator, callback);
25 +}
1 +var serialOrdered = require('../serialOrdered.js');
2 +
3 +// API
4 +module.exports = ReadableSerialOrdered;
5 +// expose sort helpers
6 +module.exports.ascending = serialOrdered.ascending;
7 +module.exports.descending = serialOrdered.descending;
8 +
9 +/**
10 + * Streaming wrapper to `asynckit.serialOrdered`
11 + *
12 + * @param {array|object} list - array or object (named list) to iterate over
13 + * @param {function} iterator - iterator to run
14 + * @param {function} sortMethod - custom sort function
15 + * @param {function} callback - invoked when all elements processed
16 + * @returns {stream.Readable#}
17 + */
18 +function ReadableSerialOrdered(list, iterator, sortMethod, callback)
19 +{
20 + if (!(this instanceof ReadableSerialOrdered))
21 + {
22 + return new ReadableSerialOrdered(list, iterator, sortMethod, callback);
23 + }
24 +
25 + // turn on object mode
26 + ReadableSerialOrdered.super_.call(this, {objectMode: true});
27 +
28 + this._start(serialOrdered, list, iterator, sortMethod, callback);
29 +}
1 +// API
2 +module.exports = state;
3 +
4 +/**
5 + * Creates initial state object
6 + * for iteration over list
7 + *
8 + * @param {array|object} list - list to iterate over
9 + * @param {function|null} sortMethod - function to use for keys sort,
10 + * or `null` to keep them as is
11 + * @returns {object} - initial state object
12 + */
13 +function state(list, sortMethod)
14 +{
15 + var isNamedList = !Array.isArray(list)
16 + , initState =
17 + {
18 + index : 0,
19 + keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
20 + jobs : {},
21 + results : isNamedList ? {} : [],
22 + size : isNamedList ? Object.keys(list).length : list.length
23 + }
24 + ;
25 +
26 + if (sortMethod)
27 + {
28 + // sort array keys based on it's values
29 + // sort object's keys just on own merit
30 + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
31 + {
32 + return sortMethod(list[a], list[b]);
33 + });
34 + }
35 +
36 + return initState;
37 +}
1 +var async = require('./async.js');
2 +
3 +// API
4 +module.exports = {
5 + iterator: wrapIterator,
6 + callback: wrapCallback
7 +};
8 +
9 +/**
10 + * Wraps iterators with long signature
11 + *
12 + * @this ReadableAsyncKit#
13 + * @param {function} iterator - function to wrap
14 + * @returns {function} - wrapped function
15 + */
16 +function wrapIterator(iterator)
17 +{
18 + var stream = this;
19 +
20 + return function(item, key, cb)
21 + {
22 + var aborter
23 + , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key))
24 + ;
25 +
26 + stream.jobs[key] = wrappedCb;
27 +
28 + // it's either shortcut (item, cb)
29 + if (iterator.length == 2)
30 + {
31 + aborter = iterator(item, wrappedCb);
32 + }
33 + // or long format (item, key, cb)
34 + else
35 + {
36 + aborter = iterator(item, key, wrappedCb);
37 + }
38 +
39 + return aborter;
40 + };
41 +}
42 +
43 +/**
44 + * Wraps provided callback function
45 + * allowing to execute snitch function before
46 + * real callback
47 + *
48 + * @this ReadableAsyncKit#
49 + * @param {function} callback - function to wrap
50 + * @returns {function} - wrapped function
51 + */
52 +function wrapCallback(callback)
53 +{
54 + var stream = this;
55 +
56 + var wrapped = function(error, result)
57 + {
58 + return finisher.call(stream, error, result, callback);
59 + };
60 +
61 + return wrapped;
62 +}
63 +
64 +/**
65 + * Wraps provided iterator callback function
66 + * makes sure snitch only called once,
67 + * but passes secondary calls to the original callback
68 + *
69 + * @this ReadableAsyncKit#
70 + * @param {function} callback - callback to wrap
71 + * @param {number|string} key - iteration key
72 + * @returns {function} wrapped callback
73 + */
74 +function wrapIteratorCallback(callback, key)
75 +{
76 + var stream = this;
77 +
78 + return function(error, output)
79 + {
80 + // don't repeat yourself
81 + if (!(key in stream.jobs))
82 + {
83 + callback(error, output);
84 + return;
85 + }
86 +
87 + // clean up jobs
88 + delete stream.jobs[key];
89 +
90 + return streamer.call(stream, error, {key: key, value: output}, callback);
91 + };
92 +}
93 +
94 +/**
95 + * Stream wrapper for iterator callback
96 + *
97 + * @this ReadableAsyncKit#
98 + * @param {mixed} error - error response
99 + * @param {mixed} output - iterator output
100 + * @param {function} callback - callback that expects iterator results
101 + */
102 +function streamer(error, output, callback)
103 +{
104 + if (error && !this.error)
105 + {
106 + this.error = error;
107 + this.pause();
108 + this.emit('error', error);
109 + // send back value only, as expected
110 + callback(error, output && output.value);
111 + return;
112 + }
113 +
114 + // stream stuff
115 + this.push(output);
116 +
117 + // back to original track
118 + // send back value only, as expected
119 + callback(error, output && output.value);
120 +}
121 +
122 +/**
123 + * Stream wrapper for finishing callback
124 + *
125 + * @this ReadableAsyncKit#
126 + * @param {mixed} error - error response
127 + * @param {mixed} output - iterator output
128 + * @param {function} callback - callback that expects final results
129 + */
130 +function finisher(error, output, callback)
131 +{
132 + // signal end of the stream
133 + // only for successfully finished streams
134 + if (!error)
135 + {
136 + this.push(null);
137 + }
138 +
139 + // back to original track
140 + callback(error, output);
141 +}
1 +var abort = require('./abort.js')
2 + , async = require('./async.js')
3 + ;
4 +
5 +// API
6 +module.exports = terminator;
7 +
8 +/**
9 + * Terminates jobs in the attached state context
10 + *
11 + * @this AsyncKitState#
12 + * @param {function} callback - final callback to invoke after termination
13 + */
14 +function terminator(callback)
15 +{
16 + if (!Object.keys(this.jobs).length)
17 + {
18 + return;
19 + }
20 +
21 + // fast forward iteration index
22 + this.index = this.size;
23 +
24 + // abort jobs
25 + abort(this);
26 +
27 + // send back results we have so far
28 + async(callback)(null, this.results);
29 +}
1 +{
2 + "_args": [
3 + [
4 + {
5 + "raw": "asynckit@^0.4.0",
6 + "scope": null,
7 + "escapedName": "asynckit",
8 + "name": "asynckit",
9 + "rawSpec": "^0.4.0",
10 + "spec": ">=0.4.0 <0.5.0",
11 + "type": "range"
12 + },
13 + "C:\\Users\\yoon\\Desktop\\JS\\RUTroll\\node_modules\\riot-api-nodejs\\node_modules\\form-data"
14 + ]
15 + ],
16 + "_from": "asynckit@>=0.4.0 <0.5.0",
17 + "_id": "asynckit@0.4.0",
18 + "_inCache": true,
19 + "_location": "/asynckit",
20 + "_nodeVersion": "0.12.11",
21 + "_npmOperationalInternal": {
22 + "host": "packages-16-east.internal.npmjs.com",
23 + "tmp": "tmp/asynckit-0.4.0.tgz_1465928940169_0.8008207362145185"
24 + },
25 + "_npmUser": {
26 + "name": "alexindigo",
27 + "email": "iam@alexindigo.com"
28 + },
29 + "_npmVersion": "2.15.6",
30 + "_phantomChildren": {},
31 + "_requested": {
32 + "raw": "asynckit@^0.4.0",
33 + "scope": null,
34 + "escapedName": "asynckit",
35 + "name": "asynckit",
36 + "rawSpec": "^0.4.0",
37 + "spec": ">=0.4.0 <0.5.0",
38 + "type": "range"
39 + },
40 + "_requiredBy": [
41 + "/riot-api-nodejs/form-data"
42 + ],
43 + "_resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
44 + "_shasum": "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79",
45 + "_shrinkwrap": null,
46 + "_spec": "asynckit@^0.4.0",
47 + "_where": "C:\\Users\\yoon\\Desktop\\JS\\RUTroll\\node_modules\\riot-api-nodejs\\node_modules\\form-data",
48 + "author": {
49 + "name": "Alex Indigo",
50 + "email": "iam@alexindigo.com"
51 + },
52 + "bugs": {
53 + "url": "https://github.com/alexindigo/asynckit/issues"
54 + },
55 + "dependencies": {},
56 + "description": "Minimal async jobs utility library, with streams support",
57 + "devDependencies": {
58 + "browserify": "^13.0.0",
59 + "browserify-istanbul": "^2.0.0",
60 + "coveralls": "^2.11.9",
61 + "eslint": "^2.9.0",
62 + "istanbul": "^0.4.3",
63 + "obake": "^0.1.2",
64 + "phantomjs-prebuilt": "^2.1.7",
65 + "pre-commit": "^1.1.3",
66 + "reamde": "^1.1.0",
67 + "rimraf": "^2.5.2",
68 + "size-table": "^0.2.0",
69 + "tap-spec": "^4.1.1",
70 + "tape": "^4.5.1"
71 + },
72 + "directories": {},
73 + "dist": {
74 + "shasum": "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79",
75 + "tarball": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz"
76 + },
77 + "gitHead": "583a75ed4fe41761b66416bb6e703ebb1f8963bf",
78 + "homepage": "https://github.com/alexindigo/asynckit#readme",
79 + "keywords": [
80 + "async",
81 + "jobs",
82 + "parallel",
83 + "serial",
84 + "iterator",
85 + "array",
86 + "object",
87 + "stream",
88 + "destroy",
89 + "terminate",
90 + "abort"
91 + ],
92 + "license": "MIT",
93 + "main": "index.js",
94 + "maintainers": [
95 + {
96 + "name": "alexindigo",
97 + "email": "iam@alexindigo.com"
98 + }
99 + ],
100 + "name": "asynckit",
101 + "optionalDependencies": {},
102 + "pre-commit": [
103 + "clean",
104 + "lint",
105 + "test",
106 + "browser",
107 + "report",
108 + "size"
109 + ],
110 + "readme": "ERROR: No README data found!",
111 + "repository": {
112 + "type": "git",
113 + "url": "git+https://github.com/alexindigo/asynckit.git"
114 + },
115 + "scripts": {
116 + "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec",
117 + "clean": "rimraf coverage",
118 + "debug": "tape test/test-*.js",
119 + "lint": "eslint *.js lib/*.js test/*.js",
120 + "report": "istanbul report",
121 + "size": "browserify index.js | size-table asynckit",
122 + "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec",
123 + "win-test": "tape test/test-*.js"
124 + },
125 + "version": "0.4.0"
126 +}
1 +var iterate = require('./lib/iterate.js')
2 + , initState = require('./lib/state.js')
3 + , terminator = require('./lib/terminator.js')
4 + ;
5 +
6 +// Public API
7 +module.exports = parallel;
8 +
9 +/**
10 + * Runs iterator over provided array elements in parallel
11 + *
12 + * @param {array|object} list - array or object (named list) to iterate over
13 + * @param {function} iterator - iterator to run
14 + * @param {function} callback - invoked when all elements processed
15 + * @returns {function} - jobs terminator
16 + */
17 +function parallel(list, iterator, callback)
18 +{
19 + var state = initState(list);
20 +
21 + while (state.index < (state['keyedList'] || list).length)
22 + {
23 + iterate(list, iterator, state, function(error, result)
24 + {
25 + if (error)
26 + {
27 + callback(error, result);
28 + return;
29 + }
30 +
31 + // looks like it's the last one
32 + if (Object.keys(state.jobs).length === 0)
33 + {
34 + callback(null, state.results);
35 + return;
36 + }
37 + });
38 +
39 + state.index++;
40 + }
41 +
42 + return terminator.bind(state, callback);
43 +}
1 +var serialOrdered = require('./serialOrdered.js');
2 +
3 +// Public API
4 +module.exports = serial;
5 +
6 +/**
7 + * Runs iterator over provided array elements in series
8 + *
9 + * @param {array|object} list - array or object (named list) to iterate over
10 + * @param {function} iterator - iterator to run
11 + * @param {function} callback - invoked when all elements processed
12 + * @returns {function} - jobs terminator
13 + */
14 +function serial(list, iterator, callback)
15 +{
16 + return serialOrdered(list, iterator, null, callback);
17 +}
1 +var iterate = require('./lib/iterate.js')
2 + , initState = require('./lib/state.js')
3 + , terminator = require('./lib/terminator.js')
4 + ;
5 +
6 +// Public API
7 +module.exports = serialOrdered;
8 +// sorting helpers
9 +module.exports.ascending = ascending;
10 +module.exports.descending = descending;
11 +
12 +/**
13 + * Runs iterator over provided sorted array elements in series
14 + *
15 + * @param {array|object} list - array or object (named list) to iterate over
16 + * @param {function} iterator - iterator to run
17 + * @param {function} sortMethod - custom sort function
18 + * @param {function} callback - invoked when all elements processed
19 + * @returns {function} - jobs terminator
20 + */
21 +function serialOrdered(list, iterator, sortMethod, callback)
22 +{
23 + var state = initState(list, sortMethod);
24 +
25 + iterate(list, iterator, state, function iteratorHandler(error, result)
26 + {
27 + if (error)
28 + {
29 + callback(error, result);
30 + return;
31 + }
32 +
33 + state.index++;
34 +
35 + // are we there yet?
36 + if (state.index < (state['keyedList'] || list).length)
37 + {
38 + iterate(list, iterator, state, iteratorHandler);
39 + return;
40 + }
41 +
42 + // done here
43 + callback(null, state.results);
44 + });
45 +
46 + return terminator.bind(state, callback);
47 +}
48 +
49 +/*
50 + * -- Sort methods
51 + */
52 +
53 +/**
54 + * sort helper to sort array elements in ascending order
55 + *
56 + * @param {mixed} a - an item to compare
57 + * @param {mixed} b - an item to compare
58 + * @returns {number} - comparison result
59 + */
60 +function ascending(a, b)
61 +{
62 + return a < b ? -1 : a > b ? 1 : 0;
63 +}
64 +
65 +/**
66 + * sort helper to sort array elements in descending order
67 + *
68 + * @param {mixed} a - an item to compare
69 + * @param {mixed} b - an item to compare
70 + * @returns {number} - comparison result
71 + */
72 +function descending(a, b)
73 +{
74 + return -1 * ascending(a, b);
75 +}
1 +var inherits = require('util').inherits
2 + , Readable = require('stream').Readable
3 + , ReadableAsyncKit = require('./lib/readable_asynckit.js')
4 + , ReadableParallel = require('./lib/readable_parallel.js')
5 + , ReadableSerial = require('./lib/readable_serial.js')
6 + , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js')
7 + ;
8 +
9 +// API
10 +module.exports =
11 +{
12 + parallel : ReadableParallel,
13 + serial : ReadableSerial,
14 + serialOrdered : ReadableSerialOrdered,
15 +};
16 +
17 +inherits(ReadableAsyncKit, Readable);
18 +
19 +inherits(ReadableParallel, ReadableAsyncKit);
20 +inherits(ReadableSerial, ReadableAsyncKit);
21 +inherits(ReadableSerialOrdered, ReadableAsyncKit);
1 +Apache License
2 +
3 +Version 2.0, January 2004
4 +
5 +http://www.apache.org/licenses/
6 +
7 +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8 +
9 +1. Definitions.
10 +
11 +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12 +
13 +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14 +
15 +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16 +
17 +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18 +
19 +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20 +
21 +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22 +
23 +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24 +
25 +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26 +
27 +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28 +
29 +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30 +
31 +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32 +
33 +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34 +
35 +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36 +
37 +You must give any other recipients of the Work or Derivative Works a copy of this License; and
38 +
39 +You must cause any modified files to carry prominent notices stating that You changed the files; and
40 +
41 +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
42 +
43 +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44 +
45 +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46 +
47 +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48 +
49 +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50 +
51 +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52 +
53 +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54 +
55 +END OF TERMS AND CONDITIONS
...\ No newline at end of file ...\ No newline at end of file
1 +aws-sign
2 +========
3 +
4 +AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.
1 +
2 +/*!
3 + * Copyright 2010 LearnBoost <dev@learnboost.com>
4 + *
5 + * Licensed under the Apache License, Version 2.0 (the "License");
6 + * you may not use this file except in compliance with the License.
7 + * You may obtain a copy of the License at
8 + *
9 + * http://www.apache.org/licenses/LICENSE-2.0
10 + *
11 + * Unless required by applicable law or agreed to in writing, software
12 + * distributed under the License is distributed on an "AS IS" BASIS,
13 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 + * See the License for the specific language governing permissions and
15 + * limitations under the License.
16 + */
17 +
18 +/**
19 + * Module dependencies.
20 + */
21 +
22 +var crypto = require('crypto')
23 + , parse = require('url').parse
24 + ;
25 +
26 +/**
27 + * Valid keys.
28 + */
29 +
30 +var keys =
31 + [ 'acl'
32 + , 'location'
33 + , 'logging'
34 + , 'notification'
35 + , 'partNumber'
36 + , 'policy'
37 + , 'requestPayment'
38 + , 'torrent'
39 + , 'uploadId'
40 + , 'uploads'
41 + , 'versionId'
42 + , 'versioning'
43 + , 'versions'
44 + , 'website'
45 + ]
46 +
47 +/**
48 + * Return an "Authorization" header value with the given `options`
49 + * in the form of "AWS <key>:<signature>"
50 + *
51 + * @param {Object} options
52 + * @return {String}
53 + * @api private
54 + */
55 +
56 +function authorization (options) {
57 + return 'AWS ' + options.key + ':' + sign(options)
58 +}
59 +
60 +module.exports = authorization
61 +module.exports.authorization = authorization
62 +
63 +/**
64 + * Simple HMAC-SHA1 Wrapper
65 + *
66 + * @param {Object} options
67 + * @return {String}
68 + * @api private
69 + */
70 +
71 +function hmacSha1 (options) {
72 + return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64')
73 +}
74 +
75 +module.exports.hmacSha1 = hmacSha1
76 +
77 +/**
78 + * Create a base64 sha1 HMAC for `options`.
79 + *
80 + * @param {Object} options
81 + * @return {String}
82 + * @api private
83 + */
84 +
85 +function sign (options) {
86 + options.message = stringToSign(options)
87 + return hmacSha1(options)
88 +}
89 +module.exports.sign = sign
90 +
91 +/**
92 + * Create a base64 sha1 HMAC for `options`.
93 + *
94 + * Specifically to be used with S3 presigned URLs
95 + *
96 + * @param {Object} options
97 + * @return {String}
98 + * @api private
99 + */
100 +
101 +function signQuery (options) {
102 + options.message = queryStringToSign(options)
103 + return hmacSha1(options)
104 +}
105 +module.exports.signQuery= signQuery
106 +
107 +/**
108 + * Return a string for sign() with the given `options`.
109 + *
110 + * Spec:
111 + *
112 + * <verb>\n
113 + * <md5>\n
114 + * <content-type>\n
115 + * <date>\n
116 + * [headers\n]
117 + * <resource>
118 + *
119 + * @param {Object} options
120 + * @return {String}
121 + * @api private
122 + */
123 +
124 +function stringToSign (options) {
125 + var headers = options.amazonHeaders || ''
126 + if (headers) headers += '\n'
127 + var r =
128 + [ options.verb
129 + , options.md5
130 + , options.contentType
131 + , options.date ? options.date.toUTCString() : ''
132 + , headers + options.resource
133 + ]
134 + return r.join('\n')
135 +}
136 +module.exports.stringToSign = stringToSign
137 +
138 +/**
139 + * Return a string for sign() with the given `options`, but is meant exclusively
140 + * for S3 presigned URLs
141 + *
142 + * Spec:
143 + *
144 + * <date>\n
145 + * <resource>
146 + *
147 + * @param {Object} options
148 + * @return {String}
149 + * @api private
150 + */
151 +
152 +function queryStringToSign (options){
153 + return 'GET\n\n\n' + options.date + '\n' + options.resource
154 +}
155 +module.exports.queryStringToSign = queryStringToSign
156 +
157 +/**
158 + * Perform the following:
159 + *
160 + * - ignore non-amazon headers
161 + * - lowercase fields
162 + * - sort lexicographically
163 + * - trim whitespace between ":"
164 + * - join with newline
165 + *
166 + * @param {Object} headers
167 + * @return {String}
168 + * @api private
169 + */
170 +
171 +function canonicalizeHeaders (headers) {
172 + var buf = []
173 + , fields = Object.keys(headers)
174 + ;
175 + for (var i = 0, len = fields.length; i < len; ++i) {
176 + var field = fields[i]
177 + , val = headers[field]
178 + , field = field.toLowerCase()
179 + ;
180 + if (0 !== field.indexOf('x-amz')) continue
181 + buf.push(field + ':' + val)
182 + }
183 + return buf.sort().join('\n')
184 +}
185 +module.exports.canonicalizeHeaders = canonicalizeHeaders
186 +
187 +/**
188 + * Perform the following:
189 + *
190 + * - ignore non sub-resources
191 + * - sort lexicographically
192 + *
193 + * @param {String} resource
194 + * @return {String}
195 + * @api private
196 + */
197 +
198 +function canonicalizeResource (resource) {
199 + var url = parse(resource, true)
200 + , path = url.pathname
201 + , buf = []
202 + ;
203 +
204 + Object.keys(url.query).forEach(function(key){
205 + if (!~keys.indexOf(key)) return
206 + var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key])
207 + buf.push(key + val)
208 + })
209 +
210 + return path + (buf.length ? '?' + buf.sort().join('&') : '')
211 +}
212 +module.exports.canonicalizeResource = canonicalizeResource
1 +{
2 + "_from": "aws-sign2@~0.7.0",
3 + "_id": "aws-sign2@0.7.0",
4 + "_inBundle": false,
5 + "_integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
6 + "_location": "/aws-sign2",
7 + "_phantomChildren": {},
8 + "_requested": {
9 + "type": "range",
10 + "registry": true,
11 + "raw": "aws-sign2@~0.7.0",
12 + "name": "aws-sign2",
13 + "escapedName": "aws-sign2",
14 + "rawSpec": "~0.7.0",
15 + "saveSpec": null,
16 + "fetchSpec": "~0.7.0"
17 + },
18 + "_requiredBy": [
19 + "/request"
20 + ],
21 + "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
22 + "_shasum": "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8",
23 + "_spec": "aws-sign2@~0.7.0",
24 + "_where": "C:\\Users\\PARK\\Desktop\\새 폴더\\RUTROLL\\node_modules\\request",
25 + "author": {
26 + "name": "Mikeal Rogers",
27 + "email": "mikeal.rogers@gmail.com",
28 + "url": "http://www.futurealoof.com"
29 + },
30 + "bugs": {
31 + "url": "https://github.com/mikeal/aws-sign/issues"
32 + },
33 + "bundleDependencies": false,
34 + "dependencies": {},
35 + "deprecated": false,
36 + "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.",
37 + "devDependencies": {},
38 + "engines": {
39 + "node": "*"
40 + },
41 + "homepage": "https://github.com/mikeal/aws-sign#readme",
42 + "license": "Apache-2.0",
43 + "main": "index.js",
44 + "name": "aws-sign2",
45 + "optionalDependencies": {},
46 + "repository": {
47 + "url": "git+https://github.com/mikeal/aws-sign.git"
48 + },
49 + "version": "0.7.0"
50 +}
1 +test
2 +examples
3 +example.js
4 +browser
1 +62638
...\ No newline at end of file ...\ No newline at end of file
1 +language: node_js
2 +node_js:
3 + - "0.10"
4 + - "0.12"
5 + - "4.2"
1 +Copyright 2013 Michael Hart (michael.hart.au@gmail.com)
2 +
3 +Permission is hereby granted, free of charge, to any person obtaining a copy of
4 +this software and associated documentation files (the "Software"), to deal in
5 +the Software without restriction, including without limitation the rights to
6 +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 +of the Software, and to permit persons to whom the Software is furnished to do
8 +so, subject to the following conditions:
9 +
10 +The above copyright notice and this permission notice shall be included in all
11 +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 THE
19 +SOFTWARE.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 +module.exports = function(size) {
2 + return new LruCache(size)
3 +}
4 +
5 +function LruCache(size) {
6 + this.capacity = size | 0
7 + this.map = Object.create(null)
8 + this.list = new DoublyLinkedList()
9 +}
10 +
11 +LruCache.prototype.get = function(key) {
12 + var node = this.map[key]
13 + if (node == null) return undefined
14 + this.used(node)
15 + return node.val
16 +}
17 +
18 +LruCache.prototype.set = function(key, val) {
19 + var node = this.map[key]
20 + if (node != null) {
21 + node.val = val
22 + } else {
23 + if (!this.capacity) this.prune()
24 + if (!this.capacity) return false
25 + node = new DoublyLinkedNode(key, val)
26 + this.map[key] = node
27 + this.capacity--
28 + }
29 + this.used(node)
30 + return true
31 +}
32 +
33 +LruCache.prototype.used = function(node) {
34 + this.list.moveToFront(node)
35 +}
36 +
37 +LruCache.prototype.prune = function() {
38 + var node = this.list.pop()
39 + if (node != null) {
40 + delete this.map[node.key]
41 + this.capacity++
42 + }
43 +}
44 +
45 +
46 +function DoublyLinkedList() {
47 + this.firstNode = null
48 + this.lastNode = null
49 +}
50 +
51 +DoublyLinkedList.prototype.moveToFront = function(node) {
52 + if (this.firstNode == node) return
53 +
54 + this.remove(node)
55 +
56 + if (this.firstNode == null) {
57 + this.firstNode = node
58 + this.lastNode = node
59 + node.prev = null
60 + node.next = null
61 + } else {
62 + node.prev = null
63 + node.next = this.firstNode
64 + node.next.prev = node
65 + this.firstNode = node
66 + }
67 +}
68 +
69 +DoublyLinkedList.prototype.pop = function() {
70 + var lastNode = this.lastNode
71 + if (lastNode != null) {
72 + this.remove(lastNode)
73 + }
74 + return lastNode
75 +}
76 +
77 +DoublyLinkedList.prototype.remove = function(node) {
78 + if (this.firstNode == node) {
79 + this.firstNode = node.next
80 + } else if (node.prev != null) {
81 + node.prev.next = node.next
82 + }
83 + if (this.lastNode == node) {
84 + this.lastNode = node.prev
85 + } else if (node.next != null) {
86 + node.next.prev = node.prev
87 + }
88 +}
89 +
90 +
91 +function DoublyLinkedNode(key, val) {
92 + this.key = key
93 + this.val = val
94 + this.prev = null
95 + this.next = null
96 +}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.