tlsd 2.4.1 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +26 -3
  2. package/domains/README.txt +0 -0
  3. package/inchtml.js +40 -0
  4. package/package.json +2 -1
  5. package/proxy/config.json +5 -0
  6. package/proxy/package-lock.json +118 -0
  7. package/proxy/package.json +15 -0
  8. package/proxy/proxy.js +20 -0
  9. package/proxy/siriusmercantile.com/index.js +14 -0
  10. package/proxy/siriusmercantile.com/package-lock.json +137 -0
  11. package/proxy/siriusmercantile.com/package.json +7 -0
  12. package/proxy/zzz/was-nm/debug/CHANGELOG.md +395 -0
  13. package/proxy/zzz/was-nm/debug/LICENSE +19 -0
  14. package/proxy/zzz/was-nm/debug/README.md +437 -0
  15. package/proxy/zzz/was-nm/debug/dist/debug.js +886 -0
  16. package/proxy/zzz/was-nm/debug/node.js +1 -0
  17. package/proxy/zzz/was-nm/debug/package.json +90 -0
  18. package/proxy/zzz/was-nm/debug/src/browser.js +180 -0
  19. package/proxy/zzz/was-nm/debug/src/common.js +249 -0
  20. package/proxy/zzz/was-nm/debug/src/index.js +12 -0
  21. package/proxy/zzz/was-nm/debug/src/node.js +174 -0
  22. package/proxy/zzz/was-nm/eventemitter3/LICENSE +21 -0
  23. package/proxy/zzz/was-nm/eventemitter3/README.md +92 -0
  24. package/proxy/zzz/was-nm/eventemitter3/index.d.ts +67 -0
  25. package/proxy/zzz/was-nm/eventemitter3/index.js +336 -0
  26. package/proxy/zzz/was-nm/eventemitter3/package.json +84 -0
  27. package/proxy/zzz/was-nm/eventemitter3/umd/eventemitter3.js +340 -0
  28. package/proxy/zzz/was-nm/eventemitter3/umd/eventemitter3.min.js +1 -0
  29. package/proxy/zzz/was-nm/eventemitter3/umd/eventemitter3.min.js.map +1 -0
  30. package/proxy/zzz/was-nm/follow-redirects/LICENSE +18 -0
  31. package/proxy/zzz/was-nm/follow-redirects/README.md +145 -0
  32. package/proxy/zzz/was-nm/follow-redirects/http.js +1 -0
  33. package/proxy/zzz/was-nm/follow-redirects/https.js +1 -0
  34. package/proxy/zzz/was-nm/follow-redirects/index.js +452 -0
  35. package/proxy/zzz/was-nm/follow-redirects/package.json +87 -0
  36. package/proxy/zzz/was-nm/http-proxy/.auto-changelog +6 -0
  37. package/proxy/zzz/was-nm/http-proxy/.gitattributes +1 -0
  38. package/proxy/zzz/was-nm/http-proxy/CHANGELOG.md +1864 -0
  39. package/proxy/zzz/was-nm/http-proxy/CODE_OF_CONDUCT.md +74 -0
  40. package/proxy/zzz/was-nm/http-proxy/LICENSE +23 -0
  41. package/proxy/zzz/was-nm/http-proxy/README.md +568 -0
  42. package/proxy/zzz/was-nm/http-proxy/codecov.yml +10 -0
  43. package/proxy/zzz/was-nm/http-proxy/index.js +13 -0
  44. package/proxy/zzz/was-nm/http-proxy/lib/http-proxy/common.js +248 -0
  45. package/proxy/zzz/was-nm/http-proxy/lib/http-proxy/index.js +185 -0
  46. package/proxy/zzz/was-nm/http-proxy/lib/http-proxy/passes/web-incoming.js +192 -0
  47. package/proxy/zzz/was-nm/http-proxy/lib/http-proxy/passes/web-outgoing.js +147 -0
  48. package/proxy/zzz/was-nm/http-proxy/lib/http-proxy/passes/ws-incoming.js +162 -0
  49. package/proxy/zzz/was-nm/http-proxy/lib/http-proxy.js +66 -0
  50. package/proxy/zzz/was-nm/http-proxy/package.json +77 -0
  51. package/proxy/zzz/was-nm/http-proxy/renovate.json +19 -0
  52. package/proxy/zzz/was-nm/ms/index.js +162 -0
  53. package/proxy/zzz/was-nm/ms/license.md +21 -0
  54. package/proxy/zzz/was-nm/ms/package.json +69 -0
  55. package/proxy/zzz/was-nm/ms/readme.md +60 -0
  56. package/proxy/zzz/was-nm/requires-port/.travis.yml +19 -0
  57. package/proxy/zzz/was-nm/requires-port/LICENSE +22 -0
  58. package/proxy/zzz/was-nm/requires-port/README.md +47 -0
  59. package/proxy/zzz/was-nm/requires-port/index.js +38 -0
  60. package/proxy/zzz/was-nm/requires-port/package.json +74 -0
  61. package/proxy/zzz/was-nm/requires-port/test.js +98 -0
  62. package/proxy/zzz/was-nm/sleepless/README.md +4 -0
  63. package/proxy/zzz/was-nm/sleepless/autosite/README.txt +0 -0
  64. package/proxy/zzz/was-nm/sleepless/autosite/site/foobar.txt +1 -0
  65. package/proxy/zzz/was-nm/sleepless/autosite/site/pull.php +4 -0
  66. package/proxy/zzz/was-nm/sleepless/index.js +2 -0
  67. package/proxy/zzz/was-nm/sleepless/package.json +44 -0
  68. package/proxy/zzz/was-nm/sleepless/sleepless.js +613 -0
  69. package/proxy/zzz/was-nm/sleepless/test.html +9 -0
  70. package/proxy/zzz/was-nm/sleepless/test.js +146 -0
  71. package/server_static/rpc/rpc.js +2 -5
  72. package/test.html +4 -0
  73. package/tlsd +11 -2
  74. package/tlsd.js +16 -14
  75. package/foo/rpc/index.js +0 -13
  76. package/foo/static/index.html +0 -15
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Arnout Kazemier
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.
@@ -0,0 +1,92 @@
1
+ # EventEmitter3
2
+
3
+ [![Version npm](https://img.shields.io/npm/v/eventemitter3.svg?style=flat-square)](https://www.npmjs.com/package/eventemitter3)[![Build Status](https://img.shields.io/travis/primus/eventemitter3/master.svg?style=flat-square)](https://travis-ci.org/primus/eventemitter3)[![Dependencies](https://img.shields.io/david/primus/eventemitter3.svg?style=flat-square)](https://david-dm.org/primus/eventemitter3)[![Coverage Status](https://img.shields.io/coveralls/primus/eventemitter3/master.svg?style=flat-square)](https://coveralls.io/r/primus/eventemitter3?branch=master)[![IRC channel](https://img.shields.io/badge/IRC-irc.freenode.net%23primus-00a8ff.svg?style=flat-square)](https://webchat.freenode.net/?channels=primus)
4
+
5
+ [![Sauce Test Status](https://saucelabs.com/browser-matrix/eventemitter3.svg)](https://saucelabs.com/u/eventemitter3)
6
+
7
+ EventEmitter3 is a high performance EventEmitter. It has been micro-optimized
8
+ for various of code paths making this, one of, if not the fastest EventEmitter
9
+ available for Node.js and browsers. The module is API compatible with the
10
+ EventEmitter that ships by default with Node.js but there are some slight
11
+ differences:
12
+
13
+ - Domain support has been removed.
14
+ - We do not `throw` an error when you emit an `error` event and nobody is
15
+ listening.
16
+ - The `newListener` and `removeListener` events have been removed as they
17
+ are useful only in some uncommon use-cases.
18
+ - The `setMaxListeners`, `getMaxListeners`, `prependListener` and
19
+ `prependOnceListener` methods are not available.
20
+ - Support for custom context for events so there is no need to use `fn.bind`.
21
+ - The `removeListener` method removes all matching listeners, not only the
22
+ first.
23
+
24
+ It's a drop in replacement for existing EventEmitters, but just faster. Free
25
+ performance, who wouldn't want that? The EventEmitter is written in EcmaScript 3
26
+ so it will work in the oldest browsers and node versions that you need to
27
+ support.
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ $ npm install --save eventemitter3
33
+ ```
34
+
35
+ ## CDN
36
+
37
+ Recommended CDN:
38
+
39
+ ```text
40
+ https://unpkg.com/eventemitter3@latest/umd/eventemitter3.min.js
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ After installation the only thing you need to do is require the module:
46
+
47
+ ```js
48
+ var EventEmitter = require('eventemitter3');
49
+ ```
50
+
51
+ And you're ready to create your own EventEmitter instances. For the API
52
+ documentation, please follow the official Node.js documentation:
53
+
54
+ http://nodejs.org/api/events.html
55
+
56
+ ### Contextual emits
57
+
58
+ We've upgraded the API of the `EventEmitter.on`, `EventEmitter.once` and
59
+ `EventEmitter.removeListener` to accept an extra argument which is the `context`
60
+ or `this` value that should be set for the emitted events. This means you no
61
+ longer have the overhead of an event that required `fn.bind` in order to get a
62
+ custom `this` value.
63
+
64
+ ```js
65
+ var EE = new EventEmitter()
66
+ , context = { foo: 'bar' };
67
+
68
+ function emitted() {
69
+ console.log(this === context); // true
70
+ }
71
+
72
+ EE.once('event-name', emitted, context);
73
+ EE.on('another-event', emitted, context);
74
+ EE.removeListener('another-event', emitted, context);
75
+ ```
76
+
77
+ ### Tests and benchmarks
78
+
79
+ This module is well tested. You can run:
80
+
81
+ - `npm test` to run the tests under Node.js.
82
+ - `npm run test-browser` to run the tests in real browsers via Sauce Labs.
83
+
84
+ We also have a set of benchmarks to compare EventEmitter3 with some available
85
+ alternatives. To run the benchmarks run `npm run benchmark`.
86
+
87
+ Tests and benchmarks are not included in the npm package. If you want to play
88
+ with them you have to clone the GitHub repository.
89
+
90
+ ## License
91
+
92
+ [MIT](LICENSE)
@@ -0,0 +1,67 @@
1
+ type EventNames<T extends string | symbol | { [K in string | symbol]: any[] }> = T extends string | symbol ? T : keyof T;
2
+ type EventArgs<T extends string | symbol | { [K in string | symbol]: any[] }, K extends EventNames<T>> = T extends string | symbol ? any[] : K extends keyof T ? T[K] : never;
3
+
4
+ /**
5
+ * Minimal `EventEmitter` interface that is molded against the Node.js
6
+ * `EventEmitter` interface.
7
+ */
8
+ declare class EventEmitter<EventTypes extends string | symbol | { [K in keyof EventTypes]: any[] } = string | symbol> {
9
+ static prefixed: string | boolean;
10
+
11
+ /**
12
+ * Return an array listing the events for which the emitter has registered
13
+ * listeners.
14
+ */
15
+ eventNames(): Array<EventNames<EventTypes>>;
16
+
17
+ /**
18
+ * Return the listeners registered for a given event.
19
+ */
20
+ listeners<T extends EventNames<EventTypes>>(event: T): Array<EventEmitter.ListenerFn<EventArgs<EventTypes, T>>>;
21
+
22
+ /**
23
+ * Return the number of listeners listening to a given event.
24
+ */
25
+ listenerCount(event: EventNames<EventTypes>): number;
26
+
27
+ /**
28
+ * Calls each of the listeners registered for a given event.
29
+ */
30
+ emit<T extends EventNames<EventTypes>>(event: T, ...args: EventArgs<EventTypes, T>): boolean;
31
+
32
+ /**
33
+ * Add a listener for a given event.
34
+ */
35
+ on<T extends EventNames<EventTypes>>(event: T, fn: EventEmitter.ListenerFn<EventArgs<EventTypes, T>>, context?: any): this;
36
+ addListener<T extends EventNames<EventTypes>>(event: T, fn: EventEmitter.ListenerFn<EventArgs<EventTypes, T>>, context?: any): this;
37
+
38
+ /**
39
+ * Add a one-time listener for a given event.
40
+ */
41
+ once<T extends EventNames<EventTypes>>(event: T, fn: EventEmitter.ListenerFn<EventArgs<EventTypes, T>>, context?: any): this;
42
+
43
+ /**
44
+ * Remove the listeners of a given event.
45
+ */
46
+ removeListener<T extends EventNames<EventTypes>>(event: T, fn?: EventEmitter.ListenerFn<EventArgs<EventTypes, T>>, context?: any, once?: boolean): this;
47
+ off<T extends EventNames<EventTypes>>(event: T, fn?: EventEmitter.ListenerFn<EventArgs<EventTypes, T>>, context?: any, once?: boolean): this;
48
+
49
+ /**
50
+ * Remove all listeners, or those of the specified event.
51
+ */
52
+ removeAllListeners(event?: EventNames<EventTypes>): this;
53
+ }
54
+
55
+ declare namespace EventEmitter {
56
+ export interface ListenerFn<Args extends any[] = any[]> {
57
+ (...args: Args): void;
58
+ }
59
+
60
+ export interface EventEmitterStatic {
61
+ new<EventTypes extends string | symbol | { [K in keyof EventTypes]: any[] } = string | symbol>(): EventEmitter<EventTypes>;
62
+ }
63
+
64
+ export const EventEmitter: EventEmitterStatic;
65
+ }
66
+
67
+ export = EventEmitter;
@@ -0,0 +1,336 @@
1
+ 'use strict';
2
+
3
+ var has = Object.prototype.hasOwnProperty
4
+ , prefix = '~';
5
+
6
+ /**
7
+ * Constructor to create a storage for our `EE` objects.
8
+ * An `Events` instance is a plain object whose properties are event names.
9
+ *
10
+ * @constructor
11
+ * @private
12
+ */
13
+ function Events() {}
14
+
15
+ //
16
+ // We try to not inherit from `Object.prototype`. In some engines creating an
17
+ // instance in this way is faster than calling `Object.create(null)` directly.
18
+ // If `Object.create(null)` is not supported we prefix the event names with a
19
+ // character to make sure that the built-in object properties are not
20
+ // overridden or used as an attack vector.
21
+ //
22
+ if (Object.create) {
23
+ Events.prototype = Object.create(null);
24
+
25
+ //
26
+ // This hack is needed because the `__proto__` property is still inherited in
27
+ // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
28
+ //
29
+ if (!new Events().__proto__) prefix = false;
30
+ }
31
+
32
+ /**
33
+ * Representation of a single event listener.
34
+ *
35
+ * @param {Function} fn The listener function.
36
+ * @param {*} context The context to invoke the listener with.
37
+ * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
38
+ * @constructor
39
+ * @private
40
+ */
41
+ function EE(fn, context, once) {
42
+ this.fn = fn;
43
+ this.context = context;
44
+ this.once = once || false;
45
+ }
46
+
47
+ /**
48
+ * Add a listener for a given event.
49
+ *
50
+ * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
51
+ * @param {(String|Symbol)} event The event name.
52
+ * @param {Function} fn The listener function.
53
+ * @param {*} context The context to invoke the listener with.
54
+ * @param {Boolean} once Specify if the listener is a one-time listener.
55
+ * @returns {EventEmitter}
56
+ * @private
57
+ */
58
+ function addListener(emitter, event, fn, context, once) {
59
+ if (typeof fn !== 'function') {
60
+ throw new TypeError('The listener must be a function');
61
+ }
62
+
63
+ var listener = new EE(fn, context || emitter, once)
64
+ , evt = prefix ? prefix + event : event;
65
+
66
+ if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
67
+ else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
68
+ else emitter._events[evt] = [emitter._events[evt], listener];
69
+
70
+ return emitter;
71
+ }
72
+
73
+ /**
74
+ * Clear event by name.
75
+ *
76
+ * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
77
+ * @param {(String|Symbol)} evt The Event name.
78
+ * @private
79
+ */
80
+ function clearEvent(emitter, evt) {
81
+ if (--emitter._eventsCount === 0) emitter._events = new Events();
82
+ else delete emitter._events[evt];
83
+ }
84
+
85
+ /**
86
+ * Minimal `EventEmitter` interface that is molded against the Node.js
87
+ * `EventEmitter` interface.
88
+ *
89
+ * @constructor
90
+ * @public
91
+ */
92
+ function EventEmitter() {
93
+ this._events = new Events();
94
+ this._eventsCount = 0;
95
+ }
96
+
97
+ /**
98
+ * Return an array listing the events for which the emitter has registered
99
+ * listeners.
100
+ *
101
+ * @returns {Array}
102
+ * @public
103
+ */
104
+ EventEmitter.prototype.eventNames = function eventNames() {
105
+ var names = []
106
+ , events
107
+ , name;
108
+
109
+ if (this._eventsCount === 0) return names;
110
+
111
+ for (name in (events = this._events)) {
112
+ if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
113
+ }
114
+
115
+ if (Object.getOwnPropertySymbols) {
116
+ return names.concat(Object.getOwnPropertySymbols(events));
117
+ }
118
+
119
+ return names;
120
+ };
121
+
122
+ /**
123
+ * Return the listeners registered for a given event.
124
+ *
125
+ * @param {(String|Symbol)} event The event name.
126
+ * @returns {Array} The registered listeners.
127
+ * @public
128
+ */
129
+ EventEmitter.prototype.listeners = function listeners(event) {
130
+ var evt = prefix ? prefix + event : event
131
+ , handlers = this._events[evt];
132
+
133
+ if (!handlers) return [];
134
+ if (handlers.fn) return [handlers.fn];
135
+
136
+ for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
137
+ ee[i] = handlers[i].fn;
138
+ }
139
+
140
+ return ee;
141
+ };
142
+
143
+ /**
144
+ * Return the number of listeners listening to a given event.
145
+ *
146
+ * @param {(String|Symbol)} event The event name.
147
+ * @returns {Number} The number of listeners.
148
+ * @public
149
+ */
150
+ EventEmitter.prototype.listenerCount = function listenerCount(event) {
151
+ var evt = prefix ? prefix + event : event
152
+ , listeners = this._events[evt];
153
+
154
+ if (!listeners) return 0;
155
+ if (listeners.fn) return 1;
156
+ return listeners.length;
157
+ };
158
+
159
+ /**
160
+ * Calls each of the listeners registered for a given event.
161
+ *
162
+ * @param {(String|Symbol)} event The event name.
163
+ * @returns {Boolean} `true` if the event had listeners, else `false`.
164
+ * @public
165
+ */
166
+ EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
167
+ var evt = prefix ? prefix + event : event;
168
+
169
+ if (!this._events[evt]) return false;
170
+
171
+ var listeners = this._events[evt]
172
+ , len = arguments.length
173
+ , args
174
+ , i;
175
+
176
+ if (listeners.fn) {
177
+ if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
178
+
179
+ switch (len) {
180
+ case 1: return listeners.fn.call(listeners.context), true;
181
+ case 2: return listeners.fn.call(listeners.context, a1), true;
182
+ case 3: return listeners.fn.call(listeners.context, a1, a2), true;
183
+ case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
184
+ case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
185
+ case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
186
+ }
187
+
188
+ for (i = 1, args = new Array(len -1); i < len; i++) {
189
+ args[i - 1] = arguments[i];
190
+ }
191
+
192
+ listeners.fn.apply(listeners.context, args);
193
+ } else {
194
+ var length = listeners.length
195
+ , j;
196
+
197
+ for (i = 0; i < length; i++) {
198
+ if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
199
+
200
+ switch (len) {
201
+ case 1: listeners[i].fn.call(listeners[i].context); break;
202
+ case 2: listeners[i].fn.call(listeners[i].context, a1); break;
203
+ case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
204
+ case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
205
+ default:
206
+ if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
207
+ args[j - 1] = arguments[j];
208
+ }
209
+
210
+ listeners[i].fn.apply(listeners[i].context, args);
211
+ }
212
+ }
213
+ }
214
+
215
+ return true;
216
+ };
217
+
218
+ /**
219
+ * Add a listener for a given event.
220
+ *
221
+ * @param {(String|Symbol)} event The event name.
222
+ * @param {Function} fn The listener function.
223
+ * @param {*} [context=this] The context to invoke the listener with.
224
+ * @returns {EventEmitter} `this`.
225
+ * @public
226
+ */
227
+ EventEmitter.prototype.on = function on(event, fn, context) {
228
+ return addListener(this, event, fn, context, false);
229
+ };
230
+
231
+ /**
232
+ * Add a one-time listener for a given event.
233
+ *
234
+ * @param {(String|Symbol)} event The event name.
235
+ * @param {Function} fn The listener function.
236
+ * @param {*} [context=this] The context to invoke the listener with.
237
+ * @returns {EventEmitter} `this`.
238
+ * @public
239
+ */
240
+ EventEmitter.prototype.once = function once(event, fn, context) {
241
+ return addListener(this, event, fn, context, true);
242
+ };
243
+
244
+ /**
245
+ * Remove the listeners of a given event.
246
+ *
247
+ * @param {(String|Symbol)} event The event name.
248
+ * @param {Function} fn Only remove the listeners that match this function.
249
+ * @param {*} context Only remove the listeners that have this context.
250
+ * @param {Boolean} once Only remove one-time listeners.
251
+ * @returns {EventEmitter} `this`.
252
+ * @public
253
+ */
254
+ EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
255
+ var evt = prefix ? prefix + event : event;
256
+
257
+ if (!this._events[evt]) return this;
258
+ if (!fn) {
259
+ clearEvent(this, evt);
260
+ return this;
261
+ }
262
+
263
+ var listeners = this._events[evt];
264
+
265
+ if (listeners.fn) {
266
+ if (
267
+ listeners.fn === fn &&
268
+ (!once || listeners.once) &&
269
+ (!context || listeners.context === context)
270
+ ) {
271
+ clearEvent(this, evt);
272
+ }
273
+ } else {
274
+ for (var i = 0, events = [], length = listeners.length; i < length; i++) {
275
+ if (
276
+ listeners[i].fn !== fn ||
277
+ (once && !listeners[i].once) ||
278
+ (context && listeners[i].context !== context)
279
+ ) {
280
+ events.push(listeners[i]);
281
+ }
282
+ }
283
+
284
+ //
285
+ // Reset the array, or remove it completely if we have no more listeners.
286
+ //
287
+ if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
288
+ else clearEvent(this, evt);
289
+ }
290
+
291
+ return this;
292
+ };
293
+
294
+ /**
295
+ * Remove all listeners, or those of the specified event.
296
+ *
297
+ * @param {(String|Symbol)} [event] The event name.
298
+ * @returns {EventEmitter} `this`.
299
+ * @public
300
+ */
301
+ EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
302
+ var evt;
303
+
304
+ if (event) {
305
+ evt = prefix ? prefix + event : event;
306
+ if (this._events[evt]) clearEvent(this, evt);
307
+ } else {
308
+ this._events = new Events();
309
+ this._eventsCount = 0;
310
+ }
311
+
312
+ return this;
313
+ };
314
+
315
+ //
316
+ // Alias methods names because people roll like that.
317
+ //
318
+ EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
319
+ EventEmitter.prototype.addListener = EventEmitter.prototype.on;
320
+
321
+ //
322
+ // Expose the prefix.
323
+ //
324
+ EventEmitter.prefixed = prefix;
325
+
326
+ //
327
+ // Allow `EventEmitter` to be imported as module namespace.
328
+ //
329
+ EventEmitter.EventEmitter = EventEmitter;
330
+
331
+ //
332
+ // Expose the module.
333
+ //
334
+ if ('undefined' !== typeof module) {
335
+ module.exports = EventEmitter;
336
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "_from": "eventemitter3@^4.0.0",
3
+ "_id": "eventemitter3@4.0.0",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==",
6
+ "_location": "/eventemitter3",
7
+ "_phantomChildren": {},
8
+ "_requested": {
9
+ "type": "range",
10
+ "registry": true,
11
+ "raw": "eventemitter3@^4.0.0",
12
+ "name": "eventemitter3",
13
+ "escapedName": "eventemitter3",
14
+ "rawSpec": "^4.0.0",
15
+ "saveSpec": null,
16
+ "fetchSpec": "^4.0.0"
17
+ },
18
+ "_requiredBy": [
19
+ "/http-proxy"
20
+ ],
21
+ "_resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz",
22
+ "_shasum": "d65176163887ee59f386d64c82610b696a4a74eb",
23
+ "_spec": "eventemitter3@^4.0.0",
24
+ "_where": "/root/proxy/node_modules/http-proxy",
25
+ "author": {
26
+ "name": "Arnout Kazemier"
27
+ },
28
+ "bugs": {
29
+ "url": "https://github.com/primus/eventemitter3/issues"
30
+ },
31
+ "bundleDependencies": false,
32
+ "deprecated": false,
33
+ "description": "EventEmitter3 focuses on performance while maintaining a Node.js AND browser compatible interface.",
34
+ "devDependencies": {
35
+ "assume": "~2.2.0",
36
+ "browserify": "~16.2.0",
37
+ "mocha": "~6.1.0",
38
+ "nyc": "~14.1.0",
39
+ "pre-commit": "~1.2.0",
40
+ "sauce-browsers": "~2.0.0",
41
+ "sauce-test": "~1.3.3",
42
+ "uglify-js": "~3.6.0"
43
+ },
44
+ "files": [
45
+ "index.js",
46
+ "index.d.ts",
47
+ "umd"
48
+ ],
49
+ "homepage": "https://github.com/primus/eventemitter3#readme",
50
+ "keywords": [
51
+ "EventEmitter",
52
+ "EventEmitter2",
53
+ "EventEmitter3",
54
+ "Events",
55
+ "addEventListener",
56
+ "addListener",
57
+ "emit",
58
+ "emits",
59
+ "emitter",
60
+ "event",
61
+ "once",
62
+ "pub/sub",
63
+ "publish",
64
+ "reactor",
65
+ "subscribe"
66
+ ],
67
+ "license": "MIT",
68
+ "main": "index.js",
69
+ "name": "eventemitter3",
70
+ "repository": {
71
+ "type": "git",
72
+ "url": "git://github.com/primus/eventemitter3.git"
73
+ },
74
+ "scripts": {
75
+ "benchmark": "find benchmarks/run -name '*.js' -exec benchmarks/start.sh {} \\;",
76
+ "browserify": "rm -rf umd && mkdir umd && browserify index.js -s EventEmitter3 -o umd/eventemitter3.js",
77
+ "minify": "uglifyjs umd/eventemitter3.js --source-map -cm -o umd/eventemitter3.min.js",
78
+ "prepublishOnly": "npm run browserify && npm run minify",
79
+ "test": "nyc --reporter=html --reporter=text mocha test/test.js",
80
+ "test-browser": "node test/browser.js"
81
+ },
82
+ "typings": "index.d.ts",
83
+ "version": "4.0.0"
84
+ }