@leofcoin/peernet 1.1.7 → 1.1.9

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.
@@ -1,198 +0,0 @@
1
- function _mergeNamespaces(n, m) {
2
- m.forEach(function (e) {
3
- e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
4
- if (k !== 'default' && !(k in n)) {
5
- var d = Object.getOwnPropertyDescriptor(e, k);
6
- Object.defineProperty(n, k, d.get ? d : {
7
- enumerable: true,
8
- get: function () { return e[k]; }
9
- });
10
- }
11
- });
12
- });
13
- return Object.freeze(n);
14
- }
15
-
16
- var global;
17
- var hasRequiredGlobal;
18
-
19
- function requireGlobal () {
20
- if (hasRequiredGlobal) return global;
21
- hasRequiredGlobal = 1;
22
- var naiveFallback = function () {
23
- if (typeof self === "object" && self) return self;
24
- if (typeof window === "object" && window) return window;
25
- throw new Error("Unable to resolve global `this`");
26
- };
27
-
28
- global = (function () {
29
- if (this) return this;
30
-
31
- // Unexpected strict mode (may happen if e.g. bundled into ESM module)
32
-
33
- // Fallback to standard globalThis if available
34
- if (typeof globalThis === "object" && globalThis) return globalThis;
35
-
36
- // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
37
- // In all ES5+ engines global object inherits from Object.prototype
38
- // (if you approached one that doesn't please report)
39
- try {
40
- Object.defineProperty(Object.prototype, "__global__", {
41
- get: function () { return this; },
42
- configurable: true
43
- });
44
- } catch (error) {
45
- // Unfortunate case of updates to Object.prototype being restricted
46
- // via preventExtensions, seal or freeze
47
- return naiveFallback();
48
- }
49
- try {
50
- // Safari case (window.__global__ works, but __global__ does not)
51
- if (!__global__) return naiveFallback();
52
- return __global__;
53
- } finally {
54
- delete Object.prototype.__global__;
55
- }
56
- })();
57
- return global;
58
- }
59
-
60
- var name = "websocket";
61
- var description = "Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.";
62
- var keywords = [
63
- "websocket",
64
- "websockets",
65
- "socket",
66
- "networking",
67
- "comet",
68
- "push",
69
- "RFC-6455",
70
- "realtime",
71
- "server",
72
- "client"
73
- ];
74
- var author = "Brian McKelvey <theturtle32@gmail.com> (https://github.com/theturtle32)";
75
- var contributors = [
76
- "Iñaki Baz Castillo <ibc@aliax.net> (http://dev.sipdoc.net)"
77
- ];
78
- var version$1 = "1.0.34";
79
- var repository = {
80
- type: "git",
81
- url: "https://github.com/theturtle32/WebSocket-Node.git"
82
- };
83
- var homepage = "https://github.com/theturtle32/WebSocket-Node";
84
- var engines = {
85
- node: ">=4.0.0"
86
- };
87
- var dependencies = {
88
- bufferutil: "^4.0.1",
89
- debug: "^2.2.0",
90
- "es5-ext": "^0.10.50",
91
- "typedarray-to-buffer": "^3.1.5",
92
- "utf-8-validate": "^5.0.2",
93
- yaeti: "^0.0.6"
94
- };
95
- var devDependencies = {
96
- "buffer-equal": "^1.0.0",
97
- gulp: "^4.0.2",
98
- "gulp-jshint": "^2.0.4",
99
- "jshint-stylish": "^2.2.1",
100
- jshint: "^2.0.0",
101
- tape: "^4.9.1"
102
- };
103
- var config = {
104
- verbose: false
105
- };
106
- var scripts = {
107
- test: "tape test/unit/*.js",
108
- gulp: "gulp"
109
- };
110
- var main = "index";
111
- var directories = {
112
- lib: "./lib"
113
- };
114
- var browser$2 = "lib/browser.js";
115
- var license = "Apache-2.0";
116
- var require$$0 = {
117
- name: name,
118
- description: description,
119
- keywords: keywords,
120
- author: author,
121
- contributors: contributors,
122
- version: version$1,
123
- repository: repository,
124
- homepage: homepage,
125
- engines: engines,
126
- dependencies: dependencies,
127
- devDependencies: devDependencies,
128
- config: config,
129
- scripts: scripts,
130
- main: main,
131
- directories: directories,
132
- browser: browser$2,
133
- license: license
134
- };
135
-
136
- var version = require$$0.version;
137
-
138
- var _globalThis;
139
- if (typeof globalThis === 'object') {
140
- _globalThis = globalThis;
141
- } else {
142
- try {
143
- _globalThis = requireGlobal();
144
- } catch (error) {
145
- } finally {
146
- if (!_globalThis && typeof window !== 'undefined') { _globalThis = window; }
147
- if (!_globalThis) { throw new Error('Could not determine global this'); }
148
- }
149
- }
150
-
151
- var NativeWebSocket = _globalThis.WebSocket || _globalThis.MozWebSocket;
152
- var websocket_version = version;
153
-
154
-
155
- /**
156
- * Expose a W3C WebSocket class with just one or two arguments.
157
- */
158
- function W3CWebSocket(uri, protocols) {
159
- var native_instance;
160
-
161
- if (protocols) {
162
- native_instance = new NativeWebSocket(uri, protocols);
163
- }
164
- else {
165
- native_instance = new NativeWebSocket(uri);
166
- }
167
-
168
- /**
169
- * 'native_instance' is an instance of nativeWebSocket (the browser's WebSocket
170
- * class). Since it is an Object it will be returned as it is when creating an
171
- * instance of W3CWebSocket via 'new W3CWebSocket()'.
172
- *
173
- * ECMAScript 5: http://bclary.com/2004/11/07/#a-13.2.2
174
- */
175
- return native_instance;
176
- }
177
- if (NativeWebSocket) {
178
- ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'].forEach(function(prop) {
179
- Object.defineProperty(W3CWebSocket, prop, {
180
- get: function() { return NativeWebSocket[prop]; }
181
- });
182
- });
183
- }
184
-
185
- /**
186
- * Module exports.
187
- */
188
- var browser = {
189
- 'w3cwebsocket' : NativeWebSocket ? W3CWebSocket : null,
190
- 'version' : websocket_version
191
- };
192
-
193
- var browser$1 = /*#__PURE__*/_mergeNamespaces({
194
- __proto__: null,
195
- default: browser
196
- }, [browser]);
197
-
198
- export { browser$1 as b };