diff --git "a/system/websocket_test/em-ws-web\050intro\051/client/client.html" "b/system/websocket_test/em-ws-web\050intro\051/client/client.html" new file mode 100644 index 0000000..a10e622 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/client/client.html" @@ -0,0 +1,53 @@ + + + + + + + Client + + + + + +

名前を入力してください

+
+ +
+ +

班を選択してください

+
+ + +
+ +
+ +

ボタンを押しての接続と切断と接続状況確認

+ + + +
+ +

+ +
+ +
+ +

早押しボタンを押した順番

+

+ + + + + \ No newline at end of file diff --git "a/system/websocket_test/em-ws-web\050intro\051/client/websocket.js" "b/system/websocket_test/em-ws-web\050intro\051/client/websocket.js" new file mode 100755 index 0000000..1fff9f2 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/client/websocket.js" @@ -0,0 +1,115 @@ +// Node.js file +function init() { + let connectionButton = document.getElementById("connection"), + disconnectionButton = document.getElementById("disconnection"), + websocketStateButton = document.getElementById("websocketState"), + button = document.getElementById("send"), + connectState = document.getElementById("connectState"), + speedButton = document.getElementById("speedButton"), + answerColumn = document.getElementById("answerColumn"), + socket, + button_clicker = []; + + button.addEventListener("click", decideNameAndTeam, false); + let clientInfo = { + // id: null, + name: null, + team: null + } + + function decideNameAndTeam() { + let name = document.getElementById("name").value; + clientInfo.name = name; + let team = document.getElementById("team").value; + clientInfo.team = team; + // button.disabled = true; + // teamとnameを変えたいときは,socket.send(clientInfo)で送る、Ruby側で、if idがあれば、名前とチームを変える処理をする + } + + function websocket() { + console.log(clientInfo); + console.log(JSON.stringify(clientInfo)); + + try { + if (!socket || socket.readyState !== 1) { //!socketは最初の接続のときに真になる、socket.readyStateは接続後に真になる + + socket = new WebSocket('wss://www.koeki-prj.org/quiz2024'); + // socket = new WebSocket('ws://localhost:8293'); + socket.onopen = function (event) { + console.log("JS:接続されました!"); + socket.send(`JS: ${clientInfo["team"]} の ${clientInfo["name"]} です!`) + }; + + socket.onmessage = function (event) { + let receivedMsg = event.data; + try { + button_clicker = JSON.parse(receivedMsg); + // console.log(button_clicker); + answerColumn.innerHTML = "" //表示場所のリセット + for (let i = 0; i < button_clicker.length; i++) { + // console.log(button_clicker[i][1]); + answerColumn.innerHTML += `${i + 1}: ${button_clicker[i][0]} の ${button_clicker[i][1]} です!
` + } + } catch (error) { + console.log(receivedMsg); + if (receivedMsg == "reset") { + answerColumn.innerHTML = ""; + } + } + } + + socket.onclose = function (event) { + if (event.wasClean) { + console.log("JS:切断しました!") + } else { + console.error("JS:切断エラーが起きました!"); + } + } + + socket.onerror = function (error) { + console.error("JS:WebSocket Error" + error) + } + } + } catch (error) { + console.error("エラーが発生しました!" + error); + } + } + + function socketClose() { + if (socket.readyState == 1) { + console.log(socket); //このときsocket.readyStateが1になっている + socket.close(); + console.log(socket); //このときsocket.readyStateが2になる + } + } + + function socketState() { + // console.log(socket.readyState); //websocket切断後にこの関数を実行するとsocket.readyStateが3になる + switch (socket.readyState) { + case 0: + connectState.innerHTML = "CONNECTING"; + break; + case 1: + connectState.innerHTML = "OPEN"; + break; + case 2: + connectState.innerHTML = "CLOSING"; + break; + case 3: + connectState.innerHTML = "CLOSED"; + break; + } + } + + function sendAnswer() { + socket.send(`JS: ${clientInfo["team"]} の ${clientInfo["name"]} がボタンを押しました!`) + socket.send(JSON.stringify(clientInfo)) + } + + connectionButton.addEventListener("click", websocket, false); + disconnectionButton.addEventListener("click", socketClose, false); + websocketStateButton.addEventListener("click", socketState, false); + speedButton.addEventListener("click", sendAnswer, false); +} + +init() diff --git "a/system/websocket_test/em-ws-web\050intro\051/mp3/mp3_path.csv" "b/system/websocket_test/em-ws-web\050intro\051/mp3/mp3_path.csv" new file mode 100644 index 0000000..6681586 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/mp3/mp3_path.csv" @@ -0,0 +1,4 @@ +song,path +test1,../mp3/test1.mp3 +test2,../mp3/test2.mp3 +test3,../mp3/test3.mp3 \ No newline at end of file diff --git "a/system/websocket_test/em-ws-web\050intro\051/mp3/test1.mp3" "b/system/websocket_test/em-ws-web\050intro\051/mp3/test1.mp3" new file mode 100644 index 0000000..f44d693 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/mp3/test1.mp3" Binary files differ diff --git "a/system/websocket_test/em-ws-web\050intro\051/mp3/test2.mp3" "b/system/websocket_test/em-ws-web\050intro\051/mp3/test2.mp3" new file mode 100644 index 0000000..2389db7 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/mp3/test2.mp3" Binary files differ diff --git "a/system/websocket_test/em-ws-web\050intro\051/mp3/test3.mp3" "b/system/websocket_test/em-ws-web\050intro\051/mp3/test3.mp3" new file mode 100644 index 0000000..ab10fde --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/mp3/test3.mp3" Binary files differ diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/.package-lock.json" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/.package-lock.json" new file mode 100644 index 0000000..9a76020 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/.package-lock.json" @@ -0,0 +1,28 @@ +{ + "name": "em-ws-web", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/LICENSE" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/LICENSE" new file mode 100644 index 0000000..1da5b96 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/LICENSE" @@ -0,0 +1,20 @@ +Copyright (c) 2011 Einar Otto Stangvik +Copyright (c) 2013 Arnout Kazemier and contributors +Copyright (c) 2016 Luigi Pinca and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/README.md" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/README.md" new file mode 100644 index 0000000..21f10df --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/README.md" @@ -0,0 +1,548 @@ +# ws: a Node.js WebSocket library + +[![Version npm](https://img.shields.io/npm/v/ws.svg?logo=npm)](https://www.npmjs.com/package/ws) +[![CI](https://img.shields.io/github/actions/workflow/status/websockets/ws/ci.yml?branch=master&label=CI&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster) +[![Coverage Status](https://img.shields.io/coveralls/websockets/ws/master.svg?logo=coveralls)](https://coveralls.io/github/websockets/ws) + +ws is a simple to use, blazing fast, and thoroughly tested WebSocket client and +server implementation. + +Passes the quite extensive Autobahn test suite: [server][server-report], +[client][client-report]. + +**Note**: This module does not work in the browser. The client in the docs is a +reference to a backend with the role of a client in the WebSocket communication. +Browser clients must use the native +[`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) +object. To make the same code work seamlessly on Node.js and the browser, you +can use one of the many wrappers available on npm, like +[isomorphic-ws](https://github.com/heineiuo/isomorphic-ws). + +## Table of Contents + +- [Protocol support](#protocol-support) +- [Installing](#installing) + - [Opt-in for performance](#opt-in-for-performance) + - [Legacy opt-in for performance](#legacy-opt-in-for-performance) +- [API docs](#api-docs) +- [WebSocket compression](#websocket-compression) +- [Usage examples](#usage-examples) + - [Sending and receiving text data](#sending-and-receiving-text-data) + - [Sending binary data](#sending-binary-data) + - [Simple server](#simple-server) + - [External HTTP/S server](#external-https-server) + - [Multiple servers sharing a single HTTP/S server](#multiple-servers-sharing-a-single-https-server) + - [Client authentication](#client-authentication) + - [Server broadcast](#server-broadcast) + - [Round-trip time](#round-trip-time) + - [Use the Node.js streams API](#use-the-nodejs-streams-api) + - [Other examples](#other-examples) +- [FAQ](#faq) + - [How to get the IP address of the client?](#how-to-get-the-ip-address-of-the-client) + - [How to detect and close broken connections?](#how-to-detect-and-close-broken-connections) + - [How to connect via a proxy?](#how-to-connect-via-a-proxy) +- [Changelog](#changelog) +- [License](#license) + +## Protocol support + +- **HyBi drafts 07-12** (Use the option `protocolVersion: 8`) +- **HyBi drafts 13-17** (Current default, alternatively option + `protocolVersion: 13`) + +## Installing + +``` +npm install ws +``` + +### Opt-in for performance + +[bufferutil][] is an optional module that can be installed alongside the ws +module: + +``` +npm install --save-optional bufferutil +``` + +This is a binary addon that improves the performance of certain operations such +as masking and unmasking the data payload of the WebSocket frames. Prebuilt +binaries are available for the most popular platforms, so you don't necessarily +need to have a C++ compiler installed on your machine. + +To force ws to not use bufferutil, use the +[`WS_NO_BUFFER_UTIL`](./doc/ws.md#ws_no_buffer_util) environment variable. This +can be useful to enhance security in systems where a user can put a package in +the package search path of an application of another user, due to how the +Node.js resolver algorithm works. + +#### Legacy opt-in for performance + +If you are running on an old version of Node.js (prior to v18.14.0), ws also +supports the [utf-8-validate][] module: + +``` +npm install --save-optional utf-8-validate +``` + +This contains a binary polyfill for [`buffer.isUtf8()`][]. + +To force ws not to use utf-8-validate, use the +[`WS_NO_UTF_8_VALIDATE`](./doc/ws.md#ws_no_utf_8_validate) environment variable. + +## API docs + +See [`/doc/ws.md`](./doc/ws.md) for Node.js-like documentation of ws classes and +utility functions. + +## WebSocket compression + +ws supports the [permessage-deflate extension][permessage-deflate] which enables +the client and server to negotiate a compression algorithm and its parameters, +and then selectively apply it to the data payloads of each WebSocket message. + +The extension is disabled by default on the server and enabled by default on the +client. It adds a significant overhead in terms of performance and memory +consumption so we suggest to enable it only if it is really needed. + +Note that Node.js has a variety of issues with high-performance compression, +where increased concurrency, especially on Linux, can lead to [catastrophic +memory fragmentation][node-zlib-bug] and slow performance. If you intend to use +permessage-deflate in production, it is worthwhile to set up a test +representative of your workload and ensure Node.js/zlib will handle it with +acceptable performance and memory usage. + +Tuning of permessage-deflate can be done via the options defined below. You can +also use `zlibDeflateOptions` and `zlibInflateOptions`, which is passed directly +into the creation of [raw deflate/inflate streams][node-zlib-deflaterawdocs]. + +See [the docs][ws-server-options] for more options. + +```js +import WebSocket, { WebSocketServer } from 'ws'; + +const wss = new WebSocketServer({ + port: 8080, + perMessageDeflate: { + zlibDeflateOptions: { + // See zlib defaults. + chunkSize: 1024, + memLevel: 7, + level: 3 + }, + zlibInflateOptions: { + chunkSize: 10 * 1024 + }, + // Other options settable: + clientNoContextTakeover: true, // Defaults to negotiated value. + serverNoContextTakeover: true, // Defaults to negotiated value. + serverMaxWindowBits: 10, // Defaults to negotiated value. + // Below options specified as default values. + concurrencyLimit: 10, // Limits zlib concurrency for perf. + threshold: 1024 // Size (in bytes) below which messages + // should not be compressed if context takeover is disabled. + } +}); +``` + +The client will only use the extension if it is supported and enabled on the +server. To always disable the extension on the client, set the +`perMessageDeflate` option to `false`. + +```js +import WebSocket from 'ws'; + +const ws = new WebSocket('ws://www.host.com/path', { + perMessageDeflate: false +}); +``` + +## Usage examples + +### Sending and receiving text data + +```js +import WebSocket from 'ws'; + +const ws = new WebSocket('ws://www.host.com/path'); + +ws.on('error', console.error); + +ws.on('open', function open() { + ws.send('something'); +}); + +ws.on('message', function message(data) { + console.log('received: %s', data); +}); +``` + +### Sending binary data + +```js +import WebSocket from 'ws'; + +const ws = new WebSocket('ws://www.host.com/path'); + +ws.on('error', console.error); + +ws.on('open', function open() { + const array = new Float32Array(5); + + for (var i = 0; i < array.length; ++i) { + array[i] = i / 2; + } + + ws.send(array); +}); +``` + +### Simple server + +```js +import { WebSocketServer } from 'ws'; + +const wss = new WebSocketServer({ port: 8080 }); + +wss.on('connection', function connection(ws) { + ws.on('error', console.error); + + ws.on('message', function message(data) { + console.log('received: %s', data); + }); + + ws.send('something'); +}); +``` + +### External HTTP/S server + +```js +import { createServer } from 'https'; +import { readFileSync } from 'fs'; +import { WebSocketServer } from 'ws'; + +const server = createServer({ + cert: readFileSync('/path/to/cert.pem'), + key: readFileSync('/path/to/key.pem') +}); +const wss = new WebSocketServer({ server }); + +wss.on('connection', function connection(ws) { + ws.on('error', console.error); + + ws.on('message', function message(data) { + console.log('received: %s', data); + }); + + ws.send('something'); +}); + +server.listen(8080); +``` + +### Multiple servers sharing a single HTTP/S server + +```js +import { createServer } from 'http'; +import { WebSocketServer } from 'ws'; + +const server = createServer(); +const wss1 = new WebSocketServer({ noServer: true }); +const wss2 = new WebSocketServer({ noServer: true }); + +wss1.on('connection', function connection(ws) { + ws.on('error', console.error); + + // ... +}); + +wss2.on('connection', function connection(ws) { + ws.on('error', console.error); + + // ... +}); + +server.on('upgrade', function upgrade(request, socket, head) { + const { pathname } = new URL(request.url, 'wss://base.url'); + + if (pathname === '/foo') { + wss1.handleUpgrade(request, socket, head, function done(ws) { + wss1.emit('connection', ws, request); + }); + } else if (pathname === '/bar') { + wss2.handleUpgrade(request, socket, head, function done(ws) { + wss2.emit('connection', ws, request); + }); + } else { + socket.destroy(); + } +}); + +server.listen(8080); +``` + +### Client authentication + +```js +import { createServer } from 'http'; +import { WebSocketServer } from 'ws'; + +function onSocketError(err) { + console.error(err); +} + +const server = createServer(); +const wss = new WebSocketServer({ noServer: true }); + +wss.on('connection', function connection(ws, request, client) { + ws.on('error', console.error); + + ws.on('message', function message(data) { + console.log(`Received message ${data} from user ${client}`); + }); +}); + +server.on('upgrade', function upgrade(request, socket, head) { + socket.on('error', onSocketError); + + // This function is not defined on purpose. Implement it with your own logic. + authenticate(request, function next(err, client) { + if (err || !client) { + socket.write('HTTP/1.1 401 Unauthorized\r\n\r\n'); + socket.destroy(); + return; + } + + socket.removeListener('error', onSocketError); + + wss.handleUpgrade(request, socket, head, function done(ws) { + wss.emit('connection', ws, request, client); + }); + }); +}); + +server.listen(8080); +``` + +Also see the provided [example][session-parse-example] using `express-session`. + +### Server broadcast + +A client WebSocket broadcasting to all connected WebSocket clients, including +itself. + +```js +import WebSocket, { WebSocketServer } from 'ws'; + +const wss = new WebSocketServer({ port: 8080 }); + +wss.on('connection', function connection(ws) { + ws.on('error', console.error); + + ws.on('message', function message(data, isBinary) { + wss.clients.forEach(function each(client) { + if (client.readyState === WebSocket.OPEN) { + client.send(data, { binary: isBinary }); + } + }); + }); +}); +``` + +A client WebSocket broadcasting to every other connected WebSocket clients, +excluding itself. + +```js +import WebSocket, { WebSocketServer } from 'ws'; + +const wss = new WebSocketServer({ port: 8080 }); + +wss.on('connection', function connection(ws) { + ws.on('error', console.error); + + ws.on('message', function message(data, isBinary) { + wss.clients.forEach(function each(client) { + if (client !== ws && client.readyState === WebSocket.OPEN) { + client.send(data, { binary: isBinary }); + } + }); + }); +}); +``` + +### Round-trip time + +```js +import WebSocket from 'ws'; + +const ws = new WebSocket('wss://websocket-echo.com/'); + +ws.on('error', console.error); + +ws.on('open', function open() { + console.log('connected'); + ws.send(Date.now()); +}); + +ws.on('close', function close() { + console.log('disconnected'); +}); + +ws.on('message', function message(data) { + console.log(`Round-trip time: ${Date.now() - data} ms`); + + setTimeout(function timeout() { + ws.send(Date.now()); + }, 500); +}); +``` + +### Use the Node.js streams API + +```js +import WebSocket, { createWebSocketStream } from 'ws'; + +const ws = new WebSocket('wss://websocket-echo.com/'); + +const duplex = createWebSocketStream(ws, { encoding: 'utf8' }); + +duplex.on('error', console.error); + +duplex.pipe(process.stdout); +process.stdin.pipe(duplex); +``` + +### Other examples + +For a full example with a browser client communicating with a ws server, see the +examples folder. + +Otherwise, see the test cases. + +## FAQ + +### How to get the IP address of the client? + +The remote IP address can be obtained from the raw socket. + +```js +import { WebSocketServer } from 'ws'; + +const wss = new WebSocketServer({ port: 8080 }); + +wss.on('connection', function connection(ws, req) { + const ip = req.socket.remoteAddress; + + ws.on('error', console.error); +}); +``` + +When the server runs behind a proxy like NGINX, the de-facto standard is to use +the `X-Forwarded-For` header. + +```js +wss.on('connection', function connection(ws, req) { + const ip = req.headers['x-forwarded-for'].split(',')[0].trim(); + + ws.on('error', console.error); +}); +``` + +### How to detect and close broken connections? + +Sometimes, the link between the server and the client can be interrupted in a +way that keeps both the server and the client unaware of the broken state of the +connection (e.g. when pulling the cord). + +In these cases, ping messages can be used as a means to verify that the remote +endpoint is still responsive. + +```js +import { WebSocketServer } from 'ws'; + +function heartbeat() { + this.isAlive = true; +} + +const wss = new WebSocketServer({ port: 8080 }); + +wss.on('connection', function connection(ws) { + ws.isAlive = true; + ws.on('error', console.error); + ws.on('pong', heartbeat); +}); + +const interval = setInterval(function ping() { + wss.clients.forEach(function each(ws) { + if (ws.isAlive === false) return ws.terminate(); + + ws.isAlive = false; + ws.ping(); + }); +}, 30000); + +wss.on('close', function close() { + clearInterval(interval); +}); +``` + +Pong messages are automatically sent in response to ping messages as required by +the spec. + +Just like the server example above, your clients might as well lose connection +without knowing it. You might want to add a ping listener on your clients to +prevent that. A simple implementation would be: + +```js +import WebSocket from 'ws'; + +function heartbeat() { + clearTimeout(this.pingTimeout); + + // Use `WebSocket#terminate()`, which immediately destroys the connection, + // instead of `WebSocket#close()`, which waits for the close timer. + // Delay should be equal to the interval at which your server + // sends out pings plus a conservative assumption of the latency. + this.pingTimeout = setTimeout(() => { + this.terminate(); + }, 30000 + 1000); +} + +const client = new WebSocket('wss://websocket-echo.com/'); + +client.on('error', console.error); +client.on('open', heartbeat); +client.on('ping', heartbeat); +client.on('close', function clear() { + clearTimeout(this.pingTimeout); +}); +``` + +### How to connect via a proxy? + +Use a custom `http.Agent` implementation like [https-proxy-agent][] or +[socks-proxy-agent][]. + +## Changelog + +We're using the GitHub [releases][changelog] for changelog entries. + +## License + +[MIT](LICENSE) + +[`buffer.isutf8()`]: https://nodejs.org/api/buffer.html#bufferisutf8input +[bufferutil]: https://github.com/websockets/bufferutil +[changelog]: https://github.com/websockets/ws/releases +[client-report]: http://websockets.github.io/ws/autobahn/clients/ +[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent +[node-zlib-bug]: https://github.com/nodejs/node/issues/8871 +[node-zlib-deflaterawdocs]: + https://nodejs.org/api/zlib.html#zlib_zlib_createdeflateraw_options +[permessage-deflate]: https://tools.ietf.org/html/rfc7692 +[server-report]: http://websockets.github.io/ws/autobahn/servers/ +[session-parse-example]: ./examples/express-session-parse +[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent +[utf-8-validate]: https://github.com/websockets/utf-8-validate +[ws-server-options]: ./doc/ws.md#new-websocketserveroptions-callback diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/browser.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/browser.js" new file mode 100644 index 0000000..ca4f628 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/browser.js" @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function () { + throw new Error( + 'ws does not work in the browser. Browser clients must use the native ' + + 'WebSocket object' + ); +}; diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/index.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/index.js" new file mode 100644 index 0000000..41edb3b --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/index.js" @@ -0,0 +1,13 @@ +'use strict'; + +const WebSocket = require('./lib/websocket'); + +WebSocket.createWebSocketStream = require('./lib/stream'); +WebSocket.Server = require('./lib/websocket-server'); +WebSocket.Receiver = require('./lib/receiver'); +WebSocket.Sender = require('./lib/sender'); + +WebSocket.WebSocket = WebSocket; +WebSocket.WebSocketServer = WebSocket.Server; + +module.exports = WebSocket; diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/buffer-util.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/buffer-util.js" new file mode 100644 index 0000000..f7536e2 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/buffer-util.js" @@ -0,0 +1,131 @@ +'use strict'; + +const { EMPTY_BUFFER } = require('./constants'); + +const FastBuffer = Buffer[Symbol.species]; + +/** + * Merges an array of buffers into a new buffer. + * + * @param {Buffer[]} list The array of buffers to concat + * @param {Number} totalLength The total length of buffers in the list + * @return {Buffer} The resulting buffer + * @public + */ +function concat(list, totalLength) { + if (list.length === 0) return EMPTY_BUFFER; + if (list.length === 1) return list[0]; + + const target = Buffer.allocUnsafe(totalLength); + let offset = 0; + + for (let i = 0; i < list.length; i++) { + const buf = list[i]; + target.set(buf, offset); + offset += buf.length; + } + + if (offset < totalLength) { + return new FastBuffer(target.buffer, target.byteOffset, offset); + } + + return target; +} + +/** + * Masks a buffer using the given mask. + * + * @param {Buffer} source The buffer to mask + * @param {Buffer} mask The mask to use + * @param {Buffer} output The buffer where to store the result + * @param {Number} offset The offset at which to start writing + * @param {Number} length The number of bytes to mask. + * @public + */ +function _mask(source, mask, output, offset, length) { + for (let i = 0; i < length; i++) { + output[offset + i] = source[i] ^ mask[i & 3]; + } +} + +/** + * Unmasks a buffer using the given mask. + * + * @param {Buffer} buffer The buffer to unmask + * @param {Buffer} mask The mask to use + * @public + */ +function _unmask(buffer, mask) { + for (let i = 0; i < buffer.length; i++) { + buffer[i] ^= mask[i & 3]; + } +} + +/** + * Converts a buffer to an `ArrayBuffer`. + * + * @param {Buffer} buf The buffer to convert + * @return {ArrayBuffer} Converted buffer + * @public + */ +function toArrayBuffer(buf) { + if (buf.length === buf.buffer.byteLength) { + return buf.buffer; + } + + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length); +} + +/** + * Converts `data` to a `Buffer`. + * + * @param {*} data The data to convert + * @return {Buffer} The buffer + * @throws {TypeError} + * @public + */ +function toBuffer(data) { + toBuffer.readOnly = true; + + if (Buffer.isBuffer(data)) return data; + + let buf; + + if (data instanceof ArrayBuffer) { + buf = new FastBuffer(data); + } else if (ArrayBuffer.isView(data)) { + buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength); + } else { + buf = Buffer.from(data); + toBuffer.readOnly = false; + } + + return buf; +} + +module.exports = { + concat, + mask: _mask, + toArrayBuffer, + toBuffer, + unmask: _unmask +}; + +/* istanbul ignore else */ +if (!process.env.WS_NO_BUFFER_UTIL) { + try { + const bufferUtil = require('bufferutil'); + + module.exports.mask = function (source, mask, output, offset, length) { + if (length < 48) _mask(source, mask, output, offset, length); + else bufferUtil.mask(source, mask, output, offset, length); + }; + + module.exports.unmask = function (buffer, mask) { + if (buffer.length < 32) _unmask(buffer, mask); + else bufferUtil.unmask(buffer, mask); + }; + } catch (e) { + // Continue regardless of the error. + } +} diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/constants.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/constants.js" new file mode 100644 index 0000000..74214d4 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/constants.js" @@ -0,0 +1,18 @@ +'use strict'; + +const BINARY_TYPES = ['nodebuffer', 'arraybuffer', 'fragments']; +const hasBlob = typeof Blob !== 'undefined'; + +if (hasBlob) BINARY_TYPES.push('blob'); + +module.exports = { + BINARY_TYPES, + EMPTY_BUFFER: Buffer.alloc(0), + GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11', + hasBlob, + kForOnEventAttribute: Symbol('kIsForOnEventAttribute'), + kListener: Symbol('kListener'), + kStatusCode: Symbol('status-code'), + kWebSocket: Symbol('websocket'), + NOOP: () => {} +}; diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/event-target.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/event-target.js" new file mode 100644 index 0000000..fea4cbc --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/event-target.js" @@ -0,0 +1,292 @@ +'use strict'; + +const { kForOnEventAttribute, kListener } = require('./constants'); + +const kCode = Symbol('kCode'); +const kData = Symbol('kData'); +const kError = Symbol('kError'); +const kMessage = Symbol('kMessage'); +const kReason = Symbol('kReason'); +const kTarget = Symbol('kTarget'); +const kType = Symbol('kType'); +const kWasClean = Symbol('kWasClean'); + +/** + * Class representing an event. + */ +class Event { + /** + * Create a new `Event`. + * + * @param {String} type The name of the event + * @throws {TypeError} If the `type` argument is not specified + */ + constructor(type) { + this[kTarget] = null; + this[kType] = type; + } + + /** + * @type {*} + */ + get target() { + return this[kTarget]; + } + + /** + * @type {String} + */ + get type() { + return this[kType]; + } +} + +Object.defineProperty(Event.prototype, 'target', { enumerable: true }); +Object.defineProperty(Event.prototype, 'type', { enumerable: true }); + +/** + * Class representing a close event. + * + * @extends Event + */ +class CloseEvent extends Event { + /** + * Create a new `CloseEvent`. + * + * @param {String} type The name of the event + * @param {Object} [options] A dictionary object that allows for setting + * attributes via object members of the same name + * @param {Number} [options.code=0] The status code explaining why the + * connection was closed + * @param {String} [options.reason=''] A human-readable string explaining why + * the connection was closed + * @param {Boolean} [options.wasClean=false] Indicates whether or not the + * connection was cleanly closed + */ + constructor(type, options = {}) { + super(type); + + this[kCode] = options.code === undefined ? 0 : options.code; + this[kReason] = options.reason === undefined ? '' : options.reason; + this[kWasClean] = options.wasClean === undefined ? false : options.wasClean; + } + + /** + * @type {Number} + */ + get code() { + return this[kCode]; + } + + /** + * @type {String} + */ + get reason() { + return this[kReason]; + } + + /** + * @type {Boolean} + */ + get wasClean() { + return this[kWasClean]; + } +} + +Object.defineProperty(CloseEvent.prototype, 'code', { enumerable: true }); +Object.defineProperty(CloseEvent.prototype, 'reason', { enumerable: true }); +Object.defineProperty(CloseEvent.prototype, 'wasClean', { enumerable: true }); + +/** + * Class representing an error event. + * + * @extends Event + */ +class ErrorEvent extends Event { + /** + * Create a new `ErrorEvent`. + * + * @param {String} type The name of the event + * @param {Object} [options] A dictionary object that allows for setting + * attributes via object members of the same name + * @param {*} [options.error=null] The error that generated this event + * @param {String} [options.message=''] The error message + */ + constructor(type, options = {}) { + super(type); + + this[kError] = options.error === undefined ? null : options.error; + this[kMessage] = options.message === undefined ? '' : options.message; + } + + /** + * @type {*} + */ + get error() { + return this[kError]; + } + + /** + * @type {String} + */ + get message() { + return this[kMessage]; + } +} + +Object.defineProperty(ErrorEvent.prototype, 'error', { enumerable: true }); +Object.defineProperty(ErrorEvent.prototype, 'message', { enumerable: true }); + +/** + * Class representing a message event. + * + * @extends Event + */ +class MessageEvent extends Event { + /** + * Create a new `MessageEvent`. + * + * @param {String} type The name of the event + * @param {Object} [options] A dictionary object that allows for setting + * attributes via object members of the same name + * @param {*} [options.data=null] The message content + */ + constructor(type, options = {}) { + super(type); + + this[kData] = options.data === undefined ? null : options.data; + } + + /** + * @type {*} + */ + get data() { + return this[kData]; + } +} + +Object.defineProperty(MessageEvent.prototype, 'data', { enumerable: true }); + +/** + * This provides methods for emulating the `EventTarget` interface. It's not + * meant to be used directly. + * + * @mixin + */ +const EventTarget = { + /** + * Register an event listener. + * + * @param {String} type A string representing the event type to listen for + * @param {(Function|Object)} handler The listener to add + * @param {Object} [options] An options object specifies characteristics about + * the event listener + * @param {Boolean} [options.once=false] A `Boolean` indicating that the + * listener should be invoked at most once after being added. If `true`, + * the listener would be automatically removed when invoked. + * @public + */ + addEventListener(type, handler, options = {}) { + for (const listener of this.listeners(type)) { + if ( + !options[kForOnEventAttribute] && + listener[kListener] === handler && + !listener[kForOnEventAttribute] + ) { + return; + } + } + + let wrapper; + + if (type === 'message') { + wrapper = function onMessage(data, isBinary) { + const event = new MessageEvent('message', { + data: isBinary ? data : data.toString() + }); + + event[kTarget] = this; + callListener(handler, this, event); + }; + } else if (type === 'close') { + wrapper = function onClose(code, message) { + const event = new CloseEvent('close', { + code, + reason: message.toString(), + wasClean: this._closeFrameReceived && this._closeFrameSent + }); + + event[kTarget] = this; + callListener(handler, this, event); + }; + } else if (type === 'error') { + wrapper = function onError(error) { + const event = new ErrorEvent('error', { + error, + message: error.message + }); + + event[kTarget] = this; + callListener(handler, this, event); + }; + } else if (type === 'open') { + wrapper = function onOpen() { + const event = new Event('open'); + + event[kTarget] = this; + callListener(handler, this, event); + }; + } else { + return; + } + + wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute]; + wrapper[kListener] = handler; + + if (options.once) { + this.once(type, wrapper); + } else { + this.on(type, wrapper); + } + }, + + /** + * Remove an event listener. + * + * @param {String} type A string representing the event type to remove + * @param {(Function|Object)} handler The listener to remove + * @public + */ + removeEventListener(type, handler) { + for (const listener of this.listeners(type)) { + if (listener[kListener] === handler && !listener[kForOnEventAttribute]) { + this.removeListener(type, listener); + break; + } + } + } +}; + +module.exports = { + CloseEvent, + ErrorEvent, + Event, + EventTarget, + MessageEvent +}; + +/** + * Call an event listener + * + * @param {(Function|Object)} listener The listener to call + * @param {*} thisArg The value to use as `this`` when calling the listener + * @param {Event} event The event to pass to the listener + * @private + */ +function callListener(listener, thisArg, event) { + if (typeof listener === 'object' && listener.handleEvent) { + listener.handleEvent.call(listener, event); + } else { + listener.call(thisArg, event); + } +} diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/extension.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/extension.js" new file mode 100644 index 0000000..3d7895c --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/extension.js" @@ -0,0 +1,203 @@ +'use strict'; + +const { tokenChars } = require('./validation'); + +/** + * Adds an offer to the map of extension offers or a parameter to the map of + * parameters. + * + * @param {Object} dest The map of extension offers or parameters + * @param {String} name The extension or parameter name + * @param {(Object|Boolean|String)} elem The extension parameters or the + * parameter value + * @private + */ +function push(dest, name, elem) { + if (dest[name] === undefined) dest[name] = [elem]; + else dest[name].push(elem); +} + +/** + * Parses the `Sec-WebSocket-Extensions` header into an object. + * + * @param {String} header The field value of the header + * @return {Object} The parsed object + * @public + */ +function parse(header) { + const offers = Object.create(null); + let params = Object.create(null); + let mustUnescape = false; + let isEscaping = false; + let inQuotes = false; + let extensionName; + let paramName; + let start = -1; + let code = -1; + let end = -1; + let i = 0; + + for (; i < header.length; i++) { + code = header.charCodeAt(i); + + if (extensionName === undefined) { + if (end === -1 && tokenChars[code] === 1) { + if (start === -1) start = i; + } else if ( + i !== 0 && + (code === 0x20 /* ' ' */ || code === 0x09) /* '\t' */ + ) { + if (end === -1 && start !== -1) end = i; + } else if (code === 0x3b /* ';' */ || code === 0x2c /* ',' */) { + if (start === -1) { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + + if (end === -1) end = i; + const name = header.slice(start, end); + if (code === 0x2c) { + push(offers, name, params); + params = Object.create(null); + } else { + extensionName = name; + } + + start = end = -1; + } else { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + } else if (paramName === undefined) { + if (end === -1 && tokenChars[code] === 1) { + if (start === -1) start = i; + } else if (code === 0x20 || code === 0x09) { + if (end === -1 && start !== -1) end = i; + } else if (code === 0x3b || code === 0x2c) { + if (start === -1) { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + + if (end === -1) end = i; + push(params, header.slice(start, end), true); + if (code === 0x2c) { + push(offers, extensionName, params); + params = Object.create(null); + extensionName = undefined; + } + + start = end = -1; + } else if (code === 0x3d /* '=' */ && start !== -1 && end === -1) { + paramName = header.slice(start, i); + start = end = -1; + } else { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + } else { + // + // The value of a quoted-string after unescaping must conform to the + // token ABNF, so only token characters are valid. + // Ref: https://tools.ietf.org/html/rfc6455#section-9.1 + // + if (isEscaping) { + if (tokenChars[code] !== 1) { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + if (start === -1) start = i; + else if (!mustUnescape) mustUnescape = true; + isEscaping = false; + } else if (inQuotes) { + if (tokenChars[code] === 1) { + if (start === -1) start = i; + } else if (code === 0x22 /* '"' */ && start !== -1) { + inQuotes = false; + end = i; + } else if (code === 0x5c /* '\' */) { + isEscaping = true; + } else { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + } else if (code === 0x22 && header.charCodeAt(i - 1) === 0x3d) { + inQuotes = true; + } else if (end === -1 && tokenChars[code] === 1) { + if (start === -1) start = i; + } else if (start !== -1 && (code === 0x20 || code === 0x09)) { + if (end === -1) end = i; + } else if (code === 0x3b || code === 0x2c) { + if (start === -1) { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + + if (end === -1) end = i; + let value = header.slice(start, end); + if (mustUnescape) { + value = value.replace(/\\/g, ''); + mustUnescape = false; + } + push(params, paramName, value); + if (code === 0x2c) { + push(offers, extensionName, params); + params = Object.create(null); + extensionName = undefined; + } + + paramName = undefined; + start = end = -1; + } else { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + } + } + + if (start === -1 || inQuotes || code === 0x20 || code === 0x09) { + throw new SyntaxError('Unexpected end of input'); + } + + if (end === -1) end = i; + const token = header.slice(start, end); + if (extensionName === undefined) { + push(offers, token, params); + } else { + if (paramName === undefined) { + push(params, token, true); + } else if (mustUnescape) { + push(params, paramName, token.replace(/\\/g, '')); + } else { + push(params, paramName, token); + } + push(offers, extensionName, params); + } + + return offers; +} + +/** + * Builds the `Sec-WebSocket-Extensions` header field value. + * + * @param {Object} extensions The map of extensions and parameters to format + * @return {String} A string representing the given object + * @public + */ +function format(extensions) { + return Object.keys(extensions) + .map((extension) => { + let configurations = extensions[extension]; + if (!Array.isArray(configurations)) configurations = [configurations]; + return configurations + .map((params) => { + return [extension] + .concat( + Object.keys(params).map((k) => { + let values = params[k]; + if (!Array.isArray(values)) values = [values]; + return values + .map((v) => (v === true ? k : `${k}=${v}`)) + .join('; '); + }) + ) + .join('; '); + }) + .join(', '); + }) + .join(', '); +} + +module.exports = { format, parse }; diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/limiter.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/limiter.js" new file mode 100644 index 0000000..3fd3578 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/limiter.js" @@ -0,0 +1,55 @@ +'use strict'; + +const kDone = Symbol('kDone'); +const kRun = Symbol('kRun'); + +/** + * A very simple job queue with adjustable concurrency. Adapted from + * https://github.com/STRML/async-limiter + */ +class Limiter { + /** + * Creates a new `Limiter`. + * + * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed + * to run concurrently + */ + constructor(concurrency) { + this[kDone] = () => { + this.pending--; + this[kRun](); + }; + this.concurrency = concurrency || Infinity; + this.jobs = []; + this.pending = 0; + } + + /** + * Adds a job to the queue. + * + * @param {Function} job The job to run + * @public + */ + add(job) { + this.jobs.push(job); + this[kRun](); + } + + /** + * Removes a job from the queue and runs it if possible. + * + * @private + */ + [kRun]() { + if (this.pending === this.concurrency) return; + + if (this.jobs.length) { + const job = this.jobs.shift(); + + this.pending++; + job(this[kDone]); + } + } +} + +module.exports = Limiter; diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/permessage-deflate.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/permessage-deflate.js" new file mode 100644 index 0000000..77d918b --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/permessage-deflate.js" @@ -0,0 +1,514 @@ +'use strict'; + +const zlib = require('zlib'); + +const bufferUtil = require('./buffer-util'); +const Limiter = require('./limiter'); +const { kStatusCode } = require('./constants'); + +const FastBuffer = Buffer[Symbol.species]; +const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]); +const kPerMessageDeflate = Symbol('permessage-deflate'); +const kTotalLength = Symbol('total-length'); +const kCallback = Symbol('callback'); +const kBuffers = Symbol('buffers'); +const kError = Symbol('error'); + +// +// We limit zlib concurrency, which prevents severe memory fragmentation +// as documented in https://github.com/nodejs/node/issues/8871#issuecomment-250915913 +// and https://github.com/websockets/ws/issues/1202 +// +// Intentionally global; it's the global thread pool that's an issue. +// +let zlibLimiter; + +/** + * permessage-deflate implementation. + */ +class PerMessageDeflate { + /** + * Creates a PerMessageDeflate instance. + * + * @param {Object} [options] Configuration options + * @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support + * for, or request, a custom client window size + * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/ + * acknowledge disabling of client context takeover + * @param {Number} [options.concurrencyLimit=10] The number of concurrent + * calls to zlib + * @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the + * use of a custom server window size + * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept + * disabling of server context takeover + * @param {Number} [options.threshold=1024] Size (in bytes) below which + * messages should not be compressed if context takeover is disabled + * @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on + * deflate + * @param {Object} [options.zlibInflateOptions] Options to pass to zlib on + * inflate + * @param {Boolean} [isServer=false] Create the instance in either server or + * client mode + * @param {Number} [maxPayload=0] The maximum allowed message length + */ + constructor(options, isServer, maxPayload) { + this._maxPayload = maxPayload | 0; + this._options = options || {}; + this._threshold = + this._options.threshold !== undefined ? this._options.threshold : 1024; + this._isServer = !!isServer; + this._deflate = null; + this._inflate = null; + + this.params = null; + + if (!zlibLimiter) { + const concurrency = + this._options.concurrencyLimit !== undefined + ? this._options.concurrencyLimit + : 10; + zlibLimiter = new Limiter(concurrency); + } + } + + /** + * @type {String} + */ + static get extensionName() { + return 'permessage-deflate'; + } + + /** + * Create an extension negotiation offer. + * + * @return {Object} Extension parameters + * @public + */ + offer() { + const params = {}; + + if (this._options.serverNoContextTakeover) { + params.server_no_context_takeover = true; + } + if (this._options.clientNoContextTakeover) { + params.client_no_context_takeover = true; + } + if (this._options.serverMaxWindowBits) { + params.server_max_window_bits = this._options.serverMaxWindowBits; + } + if (this._options.clientMaxWindowBits) { + params.client_max_window_bits = this._options.clientMaxWindowBits; + } else if (this._options.clientMaxWindowBits == null) { + params.client_max_window_bits = true; + } + + return params; + } + + /** + * Accept an extension negotiation offer/response. + * + * @param {Array} configurations The extension negotiation offers/reponse + * @return {Object} Accepted configuration + * @public + */ + accept(configurations) { + configurations = this.normalizeParams(configurations); + + this.params = this._isServer + ? this.acceptAsServer(configurations) + : this.acceptAsClient(configurations); + + return this.params; + } + + /** + * Releases all resources used by the extension. + * + * @public + */ + cleanup() { + if (this._inflate) { + this._inflate.close(); + this._inflate = null; + } + + if (this._deflate) { + const callback = this._deflate[kCallback]; + + this._deflate.close(); + this._deflate = null; + + if (callback) { + callback( + new Error( + 'The deflate stream was closed while data was being processed' + ) + ); + } + } + } + + /** + * Accept an extension negotiation offer. + * + * @param {Array} offers The extension negotiation offers + * @return {Object} Accepted configuration + * @private + */ + acceptAsServer(offers) { + const opts = this._options; + const accepted = offers.find((params) => { + if ( + (opts.serverNoContextTakeover === false && + params.server_no_context_takeover) || + (params.server_max_window_bits && + (opts.serverMaxWindowBits === false || + (typeof opts.serverMaxWindowBits === 'number' && + opts.serverMaxWindowBits > params.server_max_window_bits))) || + (typeof opts.clientMaxWindowBits === 'number' && + !params.client_max_window_bits) + ) { + return false; + } + + return true; + }); + + if (!accepted) { + throw new Error('None of the extension offers can be accepted'); + } + + if (opts.serverNoContextTakeover) { + accepted.server_no_context_takeover = true; + } + if (opts.clientNoContextTakeover) { + accepted.client_no_context_takeover = true; + } + if (typeof opts.serverMaxWindowBits === 'number') { + accepted.server_max_window_bits = opts.serverMaxWindowBits; + } + if (typeof opts.clientMaxWindowBits === 'number') { + accepted.client_max_window_bits = opts.clientMaxWindowBits; + } else if ( + accepted.client_max_window_bits === true || + opts.clientMaxWindowBits === false + ) { + delete accepted.client_max_window_bits; + } + + return accepted; + } + + /** + * Accept the extension negotiation response. + * + * @param {Array} response The extension negotiation response + * @return {Object} Accepted configuration + * @private + */ + acceptAsClient(response) { + const params = response[0]; + + if ( + this._options.clientNoContextTakeover === false && + params.client_no_context_takeover + ) { + throw new Error('Unexpected parameter "client_no_context_takeover"'); + } + + if (!params.client_max_window_bits) { + if (typeof this._options.clientMaxWindowBits === 'number') { + params.client_max_window_bits = this._options.clientMaxWindowBits; + } + } else if ( + this._options.clientMaxWindowBits === false || + (typeof this._options.clientMaxWindowBits === 'number' && + params.client_max_window_bits > this._options.clientMaxWindowBits) + ) { + throw new Error( + 'Unexpected or invalid parameter "client_max_window_bits"' + ); + } + + return params; + } + + /** + * Normalize parameters. + * + * @param {Array} configurations The extension negotiation offers/reponse + * @return {Array} The offers/response with normalized parameters + * @private + */ + normalizeParams(configurations) { + configurations.forEach((params) => { + Object.keys(params).forEach((key) => { + let value = params[key]; + + if (value.length > 1) { + throw new Error(`Parameter "${key}" must have only a single value`); + } + + value = value[0]; + + if (key === 'client_max_window_bits') { + if (value !== true) { + const num = +value; + if (!Number.isInteger(num) || num < 8 || num > 15) { + throw new TypeError( + `Invalid value for parameter "${key}": ${value}` + ); + } + value = num; + } else if (!this._isServer) { + throw new TypeError( + `Invalid value for parameter "${key}": ${value}` + ); + } + } else if (key === 'server_max_window_bits') { + const num = +value; + if (!Number.isInteger(num) || num < 8 || num > 15) { + throw new TypeError( + `Invalid value for parameter "${key}": ${value}` + ); + } + value = num; + } else if ( + key === 'client_no_context_takeover' || + key === 'server_no_context_takeover' + ) { + if (value !== true) { + throw new TypeError( + `Invalid value for parameter "${key}": ${value}` + ); + } + } else { + throw new Error(`Unknown parameter "${key}"`); + } + + params[key] = value; + }); + }); + + return configurations; + } + + /** + * Decompress data. Concurrency limited. + * + * @param {Buffer} data Compressed data + * @param {Boolean} fin Specifies whether or not this is the last fragment + * @param {Function} callback Callback + * @public + */ + decompress(data, fin, callback) { + zlibLimiter.add((done) => { + this._decompress(data, fin, (err, result) => { + done(); + callback(err, result); + }); + }); + } + + /** + * Compress data. Concurrency limited. + * + * @param {(Buffer|String)} data Data to compress + * @param {Boolean} fin Specifies whether or not this is the last fragment + * @param {Function} callback Callback + * @public + */ + compress(data, fin, callback) { + zlibLimiter.add((done) => { + this._compress(data, fin, (err, result) => { + done(); + callback(err, result); + }); + }); + } + + /** + * Decompress data. + * + * @param {Buffer} data Compressed data + * @param {Boolean} fin Specifies whether or not this is the last fragment + * @param {Function} callback Callback + * @private + */ + _decompress(data, fin, callback) { + const endpoint = this._isServer ? 'client' : 'server'; + + if (!this._inflate) { + const key = `${endpoint}_max_window_bits`; + const windowBits = + typeof this.params[key] !== 'number' + ? zlib.Z_DEFAULT_WINDOWBITS + : this.params[key]; + + this._inflate = zlib.createInflateRaw({ + ...this._options.zlibInflateOptions, + windowBits + }); + this._inflate[kPerMessageDeflate] = this; + this._inflate[kTotalLength] = 0; + this._inflate[kBuffers] = []; + this._inflate.on('error', inflateOnError); + this._inflate.on('data', inflateOnData); + } + + this._inflate[kCallback] = callback; + + this._inflate.write(data); + if (fin) this._inflate.write(TRAILER); + + this._inflate.flush(() => { + const err = this._inflate[kError]; + + if (err) { + this._inflate.close(); + this._inflate = null; + callback(err); + return; + } + + const data = bufferUtil.concat( + this._inflate[kBuffers], + this._inflate[kTotalLength] + ); + + if (this._inflate._readableState.endEmitted) { + this._inflate.close(); + this._inflate = null; + } else { + this._inflate[kTotalLength] = 0; + this._inflate[kBuffers] = []; + + if (fin && this.params[`${endpoint}_no_context_takeover`]) { + this._inflate.reset(); + } + } + + callback(null, data); + }); + } + + /** + * Compress data. + * + * @param {(Buffer|String)} data Data to compress + * @param {Boolean} fin Specifies whether or not this is the last fragment + * @param {Function} callback Callback + * @private + */ + _compress(data, fin, callback) { + const endpoint = this._isServer ? 'server' : 'client'; + + if (!this._deflate) { + const key = `${endpoint}_max_window_bits`; + const windowBits = + typeof this.params[key] !== 'number' + ? zlib.Z_DEFAULT_WINDOWBITS + : this.params[key]; + + this._deflate = zlib.createDeflateRaw({ + ...this._options.zlibDeflateOptions, + windowBits + }); + + this._deflate[kTotalLength] = 0; + this._deflate[kBuffers] = []; + + this._deflate.on('data', deflateOnData); + } + + this._deflate[kCallback] = callback; + + this._deflate.write(data); + this._deflate.flush(zlib.Z_SYNC_FLUSH, () => { + if (!this._deflate) { + // + // The deflate stream was closed while data was being processed. + // + return; + } + + let data = bufferUtil.concat( + this._deflate[kBuffers], + this._deflate[kTotalLength] + ); + + if (fin) { + data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4); + } + + // + // Ensure that the callback will not be called again in + // `PerMessageDeflate#cleanup()`. + // + this._deflate[kCallback] = null; + + this._deflate[kTotalLength] = 0; + this._deflate[kBuffers] = []; + + if (fin && this.params[`${endpoint}_no_context_takeover`]) { + this._deflate.reset(); + } + + callback(null, data); + }); + } +} + +module.exports = PerMessageDeflate; + +/** + * The listener of the `zlib.DeflateRaw` stream `'data'` event. + * + * @param {Buffer} chunk A chunk of data + * @private + */ +function deflateOnData(chunk) { + this[kBuffers].push(chunk); + this[kTotalLength] += chunk.length; +} + +/** + * The listener of the `zlib.InflateRaw` stream `'data'` event. + * + * @param {Buffer} chunk A chunk of data + * @private + */ +function inflateOnData(chunk) { + this[kTotalLength] += chunk.length; + + if ( + this[kPerMessageDeflate]._maxPayload < 1 || + this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload + ) { + this[kBuffers].push(chunk); + return; + } + + this[kError] = new RangeError('Max payload size exceeded'); + this[kError].code = 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'; + this[kError][kStatusCode] = 1009; + this.removeListener('data', inflateOnData); + this.reset(); +} + +/** + * The listener of the `zlib.InflateRaw` stream `'error'` event. + * + * @param {Error} err The emitted error + * @private + */ +function inflateOnError(err) { + // + // There is no need to call `Zlib#close()` as the handle is automatically + // closed when an error is emitted. + // + this[kPerMessageDeflate]._inflate = null; + err[kStatusCode] = 1007; + this[kCallback](err); +} diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/receiver.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/receiver.js" new file mode 100644 index 0000000..54d9b4f --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/receiver.js" @@ -0,0 +1,706 @@ +'use strict'; + +const { Writable } = require('stream'); + +const PerMessageDeflate = require('./permessage-deflate'); +const { + BINARY_TYPES, + EMPTY_BUFFER, + kStatusCode, + kWebSocket +} = require('./constants'); +const { concat, toArrayBuffer, unmask } = require('./buffer-util'); +const { isValidStatusCode, isValidUTF8 } = require('./validation'); + +const FastBuffer = Buffer[Symbol.species]; + +const GET_INFO = 0; +const GET_PAYLOAD_LENGTH_16 = 1; +const GET_PAYLOAD_LENGTH_64 = 2; +const GET_MASK = 3; +const GET_DATA = 4; +const INFLATING = 5; +const DEFER_EVENT = 6; + +/** + * HyBi Receiver implementation. + * + * @extends Writable + */ +class Receiver extends Writable { + /** + * Creates a Receiver instance. + * + * @param {Object} [options] Options object + * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether + * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted + * multiple times in the same tick + * @param {String} [options.binaryType=nodebuffer] The type for binary data + * @param {Object} [options.extensions] An object containing the negotiated + * extensions + * @param {Boolean} [options.isServer=false] Specifies whether to operate in + * client or server mode + * @param {Number} [options.maxPayload=0] The maximum allowed message length + * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or + * not to skip UTF-8 validation for text and close messages + */ + constructor(options = {}) { + super(); + + this._allowSynchronousEvents = + options.allowSynchronousEvents !== undefined + ? options.allowSynchronousEvents + : true; + this._binaryType = options.binaryType || BINARY_TYPES[0]; + this._extensions = options.extensions || {}; + this._isServer = !!options.isServer; + this._maxPayload = options.maxPayload | 0; + this._skipUTF8Validation = !!options.skipUTF8Validation; + this[kWebSocket] = undefined; + + this._bufferedBytes = 0; + this._buffers = []; + + this._compressed = false; + this._payloadLength = 0; + this._mask = undefined; + this._fragmented = 0; + this._masked = false; + this._fin = false; + this._opcode = 0; + + this._totalPayloadLength = 0; + this._messageLength = 0; + this._fragments = []; + + this._errored = false; + this._loop = false; + this._state = GET_INFO; + } + + /** + * Implements `Writable.prototype._write()`. + * + * @param {Buffer} chunk The chunk of data to write + * @param {String} encoding The character encoding of `chunk` + * @param {Function} cb Callback + * @private + */ + _write(chunk, encoding, cb) { + if (this._opcode === 0x08 && this._state == GET_INFO) return cb(); + + this._bufferedBytes += chunk.length; + this._buffers.push(chunk); + this.startLoop(cb); + } + + /** + * Consumes `n` bytes from the buffered data. + * + * @param {Number} n The number of bytes to consume + * @return {Buffer} The consumed bytes + * @private + */ + consume(n) { + this._bufferedBytes -= n; + + if (n === this._buffers[0].length) return this._buffers.shift(); + + if (n < this._buffers[0].length) { + const buf = this._buffers[0]; + this._buffers[0] = new FastBuffer( + buf.buffer, + buf.byteOffset + n, + buf.length - n + ); + + return new FastBuffer(buf.buffer, buf.byteOffset, n); + } + + const dst = Buffer.allocUnsafe(n); + + do { + const buf = this._buffers[0]; + const offset = dst.length - n; + + if (n >= buf.length) { + dst.set(this._buffers.shift(), offset); + } else { + dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset); + this._buffers[0] = new FastBuffer( + buf.buffer, + buf.byteOffset + n, + buf.length - n + ); + } + + n -= buf.length; + } while (n > 0); + + return dst; + } + + /** + * Starts the parsing loop. + * + * @param {Function} cb Callback + * @private + */ + startLoop(cb) { + this._loop = true; + + do { + switch (this._state) { + case GET_INFO: + this.getInfo(cb); + break; + case GET_PAYLOAD_LENGTH_16: + this.getPayloadLength16(cb); + break; + case GET_PAYLOAD_LENGTH_64: + this.getPayloadLength64(cb); + break; + case GET_MASK: + this.getMask(); + break; + case GET_DATA: + this.getData(cb); + break; + case INFLATING: + case DEFER_EVENT: + this._loop = false; + return; + } + } while (this._loop); + + if (!this._errored) cb(); + } + + /** + * Reads the first two bytes of a frame. + * + * @param {Function} cb Callback + * @private + */ + getInfo(cb) { + if (this._bufferedBytes < 2) { + this._loop = false; + return; + } + + const buf = this.consume(2); + + if ((buf[0] & 0x30) !== 0x00) { + const error = this.createError( + RangeError, + 'RSV2 and RSV3 must be clear', + true, + 1002, + 'WS_ERR_UNEXPECTED_RSV_2_3' + ); + + cb(error); + return; + } + + const compressed = (buf[0] & 0x40) === 0x40; + + if (compressed && !this._extensions[PerMessageDeflate.extensionName]) { + const error = this.createError( + RangeError, + 'RSV1 must be clear', + true, + 1002, + 'WS_ERR_UNEXPECTED_RSV_1' + ); + + cb(error); + return; + } + + this._fin = (buf[0] & 0x80) === 0x80; + this._opcode = buf[0] & 0x0f; + this._payloadLength = buf[1] & 0x7f; + + if (this._opcode === 0x00) { + if (compressed) { + const error = this.createError( + RangeError, + 'RSV1 must be clear', + true, + 1002, + 'WS_ERR_UNEXPECTED_RSV_1' + ); + + cb(error); + return; + } + + if (!this._fragmented) { + const error = this.createError( + RangeError, + 'invalid opcode 0', + true, + 1002, + 'WS_ERR_INVALID_OPCODE' + ); + + cb(error); + return; + } + + this._opcode = this._fragmented; + } else if (this._opcode === 0x01 || this._opcode === 0x02) { + if (this._fragmented) { + const error = this.createError( + RangeError, + `invalid opcode ${this._opcode}`, + true, + 1002, + 'WS_ERR_INVALID_OPCODE' + ); + + cb(error); + return; + } + + this._compressed = compressed; + } else if (this._opcode > 0x07 && this._opcode < 0x0b) { + if (!this._fin) { + const error = this.createError( + RangeError, + 'FIN must be set', + true, + 1002, + 'WS_ERR_EXPECTED_FIN' + ); + + cb(error); + return; + } + + if (compressed) { + const error = this.createError( + RangeError, + 'RSV1 must be clear', + true, + 1002, + 'WS_ERR_UNEXPECTED_RSV_1' + ); + + cb(error); + return; + } + + if ( + this._payloadLength > 0x7d || + (this._opcode === 0x08 && this._payloadLength === 1) + ) { + const error = this.createError( + RangeError, + `invalid payload length ${this._payloadLength}`, + true, + 1002, + 'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH' + ); + + cb(error); + return; + } + } else { + const error = this.createError( + RangeError, + `invalid opcode ${this._opcode}`, + true, + 1002, + 'WS_ERR_INVALID_OPCODE' + ); + + cb(error); + return; + } + + if (!this._fin && !this._fragmented) this._fragmented = this._opcode; + this._masked = (buf[1] & 0x80) === 0x80; + + if (this._isServer) { + if (!this._masked) { + const error = this.createError( + RangeError, + 'MASK must be set', + true, + 1002, + 'WS_ERR_EXPECTED_MASK' + ); + + cb(error); + return; + } + } else if (this._masked) { + const error = this.createError( + RangeError, + 'MASK must be clear', + true, + 1002, + 'WS_ERR_UNEXPECTED_MASK' + ); + + cb(error); + return; + } + + if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16; + else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64; + else this.haveLength(cb); + } + + /** + * Gets extended payload length (7+16). + * + * @param {Function} cb Callback + * @private + */ + getPayloadLength16(cb) { + if (this._bufferedBytes < 2) { + this._loop = false; + return; + } + + this._payloadLength = this.consume(2).readUInt16BE(0); + this.haveLength(cb); + } + + /** + * Gets extended payload length (7+64). + * + * @param {Function} cb Callback + * @private + */ + getPayloadLength64(cb) { + if (this._bufferedBytes < 8) { + this._loop = false; + return; + } + + const buf = this.consume(8); + const num = buf.readUInt32BE(0); + + // + // The maximum safe integer in JavaScript is 2^53 - 1. An error is returned + // if payload length is greater than this number. + // + if (num > Math.pow(2, 53 - 32) - 1) { + const error = this.createError( + RangeError, + 'Unsupported WebSocket frame: payload length > 2^53 - 1', + false, + 1009, + 'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH' + ); + + cb(error); + return; + } + + this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4); + this.haveLength(cb); + } + + /** + * Payload length has been read. + * + * @param {Function} cb Callback + * @private + */ + haveLength(cb) { + if (this._payloadLength && this._opcode < 0x08) { + this._totalPayloadLength += this._payloadLength; + if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) { + const error = this.createError( + RangeError, + 'Max payload size exceeded', + false, + 1009, + 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH' + ); + + cb(error); + return; + } + } + + if (this._masked) this._state = GET_MASK; + else this._state = GET_DATA; + } + + /** + * Reads mask bytes. + * + * @private + */ + getMask() { + if (this._bufferedBytes < 4) { + this._loop = false; + return; + } + + this._mask = this.consume(4); + this._state = GET_DATA; + } + + /** + * Reads data bytes. + * + * @param {Function} cb Callback + * @private + */ + getData(cb) { + let data = EMPTY_BUFFER; + + if (this._payloadLength) { + if (this._bufferedBytes < this._payloadLength) { + this._loop = false; + return; + } + + data = this.consume(this._payloadLength); + + if ( + this._masked && + (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0 + ) { + unmask(data, this._mask); + } + } + + if (this._opcode > 0x07) { + this.controlMessage(data, cb); + return; + } + + if (this._compressed) { + this._state = INFLATING; + this.decompress(data, cb); + return; + } + + if (data.length) { + // + // This message is not compressed so its length is the sum of the payload + // length of all fragments. + // + this._messageLength = this._totalPayloadLength; + this._fragments.push(data); + } + + this.dataMessage(cb); + } + + /** + * Decompresses data. + * + * @param {Buffer} data Compressed data + * @param {Function} cb Callback + * @private + */ + decompress(data, cb) { + const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; + + perMessageDeflate.decompress(data, this._fin, (err, buf) => { + if (err) return cb(err); + + if (buf.length) { + this._messageLength += buf.length; + if (this._messageLength > this._maxPayload && this._maxPayload > 0) { + const error = this.createError( + RangeError, + 'Max payload size exceeded', + false, + 1009, + 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH' + ); + + cb(error); + return; + } + + this._fragments.push(buf); + } + + this.dataMessage(cb); + if (this._state === GET_INFO) this.startLoop(cb); + }); + } + + /** + * Handles a data message. + * + * @param {Function} cb Callback + * @private + */ + dataMessage(cb) { + if (!this._fin) { + this._state = GET_INFO; + return; + } + + const messageLength = this._messageLength; + const fragments = this._fragments; + + this._totalPayloadLength = 0; + this._messageLength = 0; + this._fragmented = 0; + this._fragments = []; + + if (this._opcode === 2) { + let data; + + if (this._binaryType === 'nodebuffer') { + data = concat(fragments, messageLength); + } else if (this._binaryType === 'arraybuffer') { + data = toArrayBuffer(concat(fragments, messageLength)); + } else if (this._binaryType === 'blob') { + data = new Blob(fragments); + } else { + data = fragments; + } + + if (this._allowSynchronousEvents) { + this.emit('message', data, true); + this._state = GET_INFO; + } else { + this._state = DEFER_EVENT; + setImmediate(() => { + this.emit('message', data, true); + this._state = GET_INFO; + this.startLoop(cb); + }); + } + } else { + const buf = concat(fragments, messageLength); + + if (!this._skipUTF8Validation && !isValidUTF8(buf)) { + const error = this.createError( + Error, + 'invalid UTF-8 sequence', + true, + 1007, + 'WS_ERR_INVALID_UTF8' + ); + + cb(error); + return; + } + + if (this._state === INFLATING || this._allowSynchronousEvents) { + this.emit('message', buf, false); + this._state = GET_INFO; + } else { + this._state = DEFER_EVENT; + setImmediate(() => { + this.emit('message', buf, false); + this._state = GET_INFO; + this.startLoop(cb); + }); + } + } + } + + /** + * Handles a control message. + * + * @param {Buffer} data Data to handle + * @return {(Error|RangeError|undefined)} A possible error + * @private + */ + controlMessage(data, cb) { + if (this._opcode === 0x08) { + if (data.length === 0) { + this._loop = false; + this.emit('conclude', 1005, EMPTY_BUFFER); + this.end(); + } else { + const code = data.readUInt16BE(0); + + if (!isValidStatusCode(code)) { + const error = this.createError( + RangeError, + `invalid status code ${code}`, + true, + 1002, + 'WS_ERR_INVALID_CLOSE_CODE' + ); + + cb(error); + return; + } + + const buf = new FastBuffer( + data.buffer, + data.byteOffset + 2, + data.length - 2 + ); + + if (!this._skipUTF8Validation && !isValidUTF8(buf)) { + const error = this.createError( + Error, + 'invalid UTF-8 sequence', + true, + 1007, + 'WS_ERR_INVALID_UTF8' + ); + + cb(error); + return; + } + + this._loop = false; + this.emit('conclude', code, buf); + this.end(); + } + + this._state = GET_INFO; + return; + } + + if (this._allowSynchronousEvents) { + this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data); + this._state = GET_INFO; + } else { + this._state = DEFER_EVENT; + setImmediate(() => { + this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data); + this._state = GET_INFO; + this.startLoop(cb); + }); + } + } + + /** + * Builds an error object. + * + * @param {function(new:Error|RangeError)} ErrorCtor The error constructor + * @param {String} message The error message + * @param {Boolean} prefix Specifies whether or not to add a default prefix to + * `message` + * @param {Number} statusCode The status code + * @param {String} errorCode The exposed error code + * @return {(Error|RangeError)} The error + * @private + */ + createError(ErrorCtor, message, prefix, statusCode, errorCode) { + this._loop = false; + this._errored = true; + + const err = new ErrorCtor( + prefix ? `Invalid WebSocket frame: ${message}` : message + ); + + Error.captureStackTrace(err, this.createError); + err.code = errorCode; + err[kStatusCode] = statusCode; + return err; + } +} + +module.exports = Receiver; diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/sender.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/sender.js" new file mode 100644 index 0000000..ee16cea --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/sender.js" @@ -0,0 +1,602 @@ +/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex" }] */ + +'use strict'; + +const { Duplex } = require('stream'); +const { randomFillSync } = require('crypto'); + +const PerMessageDeflate = require('./permessage-deflate'); +const { EMPTY_BUFFER, kWebSocket, NOOP } = require('./constants'); +const { isBlob, isValidStatusCode } = require('./validation'); +const { mask: applyMask, toBuffer } = require('./buffer-util'); + +const kByteLength = Symbol('kByteLength'); +const maskBuffer = Buffer.alloc(4); +const RANDOM_POOL_SIZE = 8 * 1024; +let randomPool; +let randomPoolPointer = RANDOM_POOL_SIZE; + +const DEFAULT = 0; +const DEFLATING = 1; +const GET_BLOB_DATA = 2; + +/** + * HyBi Sender implementation. + */ +class Sender { + /** + * Creates a Sender instance. + * + * @param {Duplex} socket The connection socket + * @param {Object} [extensions] An object containing the negotiated extensions + * @param {Function} [generateMask] The function used to generate the masking + * key + */ + constructor(socket, extensions, generateMask) { + this._extensions = extensions || {}; + + if (generateMask) { + this._generateMask = generateMask; + this._maskBuffer = Buffer.alloc(4); + } + + this._socket = socket; + + this._firstFragment = true; + this._compress = false; + + this._bufferedBytes = 0; + this._queue = []; + this._state = DEFAULT; + this.onerror = NOOP; + this[kWebSocket] = undefined; + } + + /** + * Frames a piece of data according to the HyBi WebSocket protocol. + * + * @param {(Buffer|String)} data The data to frame + * @param {Object} options Options object + * @param {Boolean} [options.fin=false] Specifies whether or not to set the + * FIN bit + * @param {Function} [options.generateMask] The function used to generate the + * masking key + * @param {Boolean} [options.mask=false] Specifies whether or not to mask + * `data` + * @param {Buffer} [options.maskBuffer] The buffer used to store the masking + * key + * @param {Number} options.opcode The opcode + * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be + * modified + * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the + * RSV1 bit + * @return {(Buffer|String)[]} The framed data + * @public + */ + static frame(data, options) { + let mask; + let merge = false; + let offset = 2; + let skipMasking = false; + + if (options.mask) { + mask = options.maskBuffer || maskBuffer; + + if (options.generateMask) { + options.generateMask(mask); + } else { + if (randomPoolPointer === RANDOM_POOL_SIZE) { + /* istanbul ignore else */ + if (randomPool === undefined) { + // + // This is lazily initialized because server-sent frames must not + // be masked so it may never be used. + // + randomPool = Buffer.alloc(RANDOM_POOL_SIZE); + } + + randomFillSync(randomPool, 0, RANDOM_POOL_SIZE); + randomPoolPointer = 0; + } + + mask[0] = randomPool[randomPoolPointer++]; + mask[1] = randomPool[randomPoolPointer++]; + mask[2] = randomPool[randomPoolPointer++]; + mask[3] = randomPool[randomPoolPointer++]; + } + + skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0; + offset = 6; + } + + let dataLength; + + if (typeof data === 'string') { + if ( + (!options.mask || skipMasking) && + options[kByteLength] !== undefined + ) { + dataLength = options[kByteLength]; + } else { + data = Buffer.from(data); + dataLength = data.length; + } + } else { + dataLength = data.length; + merge = options.mask && options.readOnly && !skipMasking; + } + + let payloadLength = dataLength; + + if (dataLength >= 65536) { + offset += 8; + payloadLength = 127; + } else if (dataLength > 125) { + offset += 2; + payloadLength = 126; + } + + const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset); + + target[0] = options.fin ? options.opcode | 0x80 : options.opcode; + if (options.rsv1) target[0] |= 0x40; + + target[1] = payloadLength; + + if (payloadLength === 126) { + target.writeUInt16BE(dataLength, 2); + } else if (payloadLength === 127) { + target[2] = target[3] = 0; + target.writeUIntBE(dataLength, 4, 6); + } + + if (!options.mask) return [target, data]; + + target[1] |= 0x80; + target[offset - 4] = mask[0]; + target[offset - 3] = mask[1]; + target[offset - 2] = mask[2]; + target[offset - 1] = mask[3]; + + if (skipMasking) return [target, data]; + + if (merge) { + applyMask(data, mask, target, offset, dataLength); + return [target]; + } + + applyMask(data, mask, data, 0, dataLength); + return [target, data]; + } + + /** + * Sends a close message to the other peer. + * + * @param {Number} [code] The status code component of the body + * @param {(String|Buffer)} [data] The message component of the body + * @param {Boolean} [mask=false] Specifies whether or not to mask the message + * @param {Function} [cb] Callback + * @public + */ + close(code, data, mask, cb) { + let buf; + + if (code === undefined) { + buf = EMPTY_BUFFER; + } else if (typeof code !== 'number' || !isValidStatusCode(code)) { + throw new TypeError('First argument must be a valid error code number'); + } else if (data === undefined || !data.length) { + buf = Buffer.allocUnsafe(2); + buf.writeUInt16BE(code, 0); + } else { + const length = Buffer.byteLength(data); + + if (length > 123) { + throw new RangeError('The message must not be greater than 123 bytes'); + } + + buf = Buffer.allocUnsafe(2 + length); + buf.writeUInt16BE(code, 0); + + if (typeof data === 'string') { + buf.write(data, 2); + } else { + buf.set(data, 2); + } + } + + const options = { + [kByteLength]: buf.length, + fin: true, + generateMask: this._generateMask, + mask, + maskBuffer: this._maskBuffer, + opcode: 0x08, + readOnly: false, + rsv1: false + }; + + if (this._state !== DEFAULT) { + this.enqueue([this.dispatch, buf, false, options, cb]); + } else { + this.sendFrame(Sender.frame(buf, options), cb); + } + } + + /** + * Sends a ping message to the other peer. + * + * @param {*} data The message to send + * @param {Boolean} [mask=false] Specifies whether or not to mask `data` + * @param {Function} [cb] Callback + * @public + */ + ping(data, mask, cb) { + let byteLength; + let readOnly; + + if (typeof data === 'string') { + byteLength = Buffer.byteLength(data); + readOnly = false; + } else if (isBlob(data)) { + byteLength = data.size; + readOnly = false; + } else { + data = toBuffer(data); + byteLength = data.length; + readOnly = toBuffer.readOnly; + } + + if (byteLength > 125) { + throw new RangeError('The data size must not be greater than 125 bytes'); + } + + const options = { + [kByteLength]: byteLength, + fin: true, + generateMask: this._generateMask, + mask, + maskBuffer: this._maskBuffer, + opcode: 0x09, + readOnly, + rsv1: false + }; + + if (isBlob(data)) { + if (this._state !== DEFAULT) { + this.enqueue([this.getBlobData, data, false, options, cb]); + } else { + this.getBlobData(data, false, options, cb); + } + } else if (this._state !== DEFAULT) { + this.enqueue([this.dispatch, data, false, options, cb]); + } else { + this.sendFrame(Sender.frame(data, options), cb); + } + } + + /** + * Sends a pong message to the other peer. + * + * @param {*} data The message to send + * @param {Boolean} [mask=false] Specifies whether or not to mask `data` + * @param {Function} [cb] Callback + * @public + */ + pong(data, mask, cb) { + let byteLength; + let readOnly; + + if (typeof data === 'string') { + byteLength = Buffer.byteLength(data); + readOnly = false; + } else if (isBlob(data)) { + byteLength = data.size; + readOnly = false; + } else { + data = toBuffer(data); + byteLength = data.length; + readOnly = toBuffer.readOnly; + } + + if (byteLength > 125) { + throw new RangeError('The data size must not be greater than 125 bytes'); + } + + const options = { + [kByteLength]: byteLength, + fin: true, + generateMask: this._generateMask, + mask, + maskBuffer: this._maskBuffer, + opcode: 0x0a, + readOnly, + rsv1: false + }; + + if (isBlob(data)) { + if (this._state !== DEFAULT) { + this.enqueue([this.getBlobData, data, false, options, cb]); + } else { + this.getBlobData(data, false, options, cb); + } + } else if (this._state !== DEFAULT) { + this.enqueue([this.dispatch, data, false, options, cb]); + } else { + this.sendFrame(Sender.frame(data, options), cb); + } + } + + /** + * Sends a data message to the other peer. + * + * @param {*} data The message to send + * @param {Object} options Options object + * @param {Boolean} [options.binary=false] Specifies whether `data` is binary + * or text + * @param {Boolean} [options.compress=false] Specifies whether or not to + * compress `data` + * @param {Boolean} [options.fin=false] Specifies whether the fragment is the + * last one + * @param {Boolean} [options.mask=false] Specifies whether or not to mask + * `data` + * @param {Function} [cb] Callback + * @public + */ + send(data, options, cb) { + const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; + let opcode = options.binary ? 2 : 1; + let rsv1 = options.compress; + + let byteLength; + let readOnly; + + if (typeof data === 'string') { + byteLength = Buffer.byteLength(data); + readOnly = false; + } else if (isBlob(data)) { + byteLength = data.size; + readOnly = false; + } else { + data = toBuffer(data); + byteLength = data.length; + readOnly = toBuffer.readOnly; + } + + if (this._firstFragment) { + this._firstFragment = false; + if ( + rsv1 && + perMessageDeflate && + perMessageDeflate.params[ + perMessageDeflate._isServer + ? 'server_no_context_takeover' + : 'client_no_context_takeover' + ] + ) { + rsv1 = byteLength >= perMessageDeflate._threshold; + } + this._compress = rsv1; + } else { + rsv1 = false; + opcode = 0; + } + + if (options.fin) this._firstFragment = true; + + const opts = { + [kByteLength]: byteLength, + fin: options.fin, + generateMask: this._generateMask, + mask: options.mask, + maskBuffer: this._maskBuffer, + opcode, + readOnly, + rsv1 + }; + + if (isBlob(data)) { + if (this._state !== DEFAULT) { + this.enqueue([this.getBlobData, data, this._compress, opts, cb]); + } else { + this.getBlobData(data, this._compress, opts, cb); + } + } else if (this._state !== DEFAULT) { + this.enqueue([this.dispatch, data, this._compress, opts, cb]); + } else { + this.dispatch(data, this._compress, opts, cb); + } + } + + /** + * Gets the contents of a blob as binary data. + * + * @param {Blob} blob The blob + * @param {Boolean} [compress=false] Specifies whether or not to compress + * the data + * @param {Object} options Options object + * @param {Boolean} [options.fin=false] Specifies whether or not to set the + * FIN bit + * @param {Function} [options.generateMask] The function used to generate the + * masking key + * @param {Boolean} [options.mask=false] Specifies whether or not to mask + * `data` + * @param {Buffer} [options.maskBuffer] The buffer used to store the masking + * key + * @param {Number} options.opcode The opcode + * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be + * modified + * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the + * RSV1 bit + * @param {Function} [cb] Callback + * @private + */ + getBlobData(blob, compress, options, cb) { + this._bufferedBytes += options[kByteLength]; + this._state = GET_BLOB_DATA; + + blob + .arrayBuffer() + .then((arrayBuffer) => { + if (this._socket.destroyed) { + const err = new Error( + 'The socket was closed while the blob was being read' + ); + + // + // `callCallbacks` is called in the next tick to ensure that errors + // that might be thrown in the callbacks behave like errors thrown + // outside the promise chain. + // + process.nextTick(callCallbacks, this, err, cb); + return; + } + + this._bufferedBytes -= options[kByteLength]; + const data = toBuffer(arrayBuffer); + + if (!compress) { + this._state = DEFAULT; + this.sendFrame(Sender.frame(data, options), cb); + this.dequeue(); + } else { + this.dispatch(data, compress, options, cb); + } + }) + .catch((err) => { + // + // `onError` is called in the next tick for the same reason that + // `callCallbacks` above is. + // + process.nextTick(onError, this, err, cb); + }); + } + + /** + * Dispatches a message. + * + * @param {(Buffer|String)} data The message to send + * @param {Boolean} [compress=false] Specifies whether or not to compress + * `data` + * @param {Object} options Options object + * @param {Boolean} [options.fin=false] Specifies whether or not to set the + * FIN bit + * @param {Function} [options.generateMask] The function used to generate the + * masking key + * @param {Boolean} [options.mask=false] Specifies whether or not to mask + * `data` + * @param {Buffer} [options.maskBuffer] The buffer used to store the masking + * key + * @param {Number} options.opcode The opcode + * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be + * modified + * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the + * RSV1 bit + * @param {Function} [cb] Callback + * @private + */ + dispatch(data, compress, options, cb) { + if (!compress) { + this.sendFrame(Sender.frame(data, options), cb); + return; + } + + const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; + + this._bufferedBytes += options[kByteLength]; + this._state = DEFLATING; + perMessageDeflate.compress(data, options.fin, (_, buf) => { + if (this._socket.destroyed) { + const err = new Error( + 'The socket was closed while data was being compressed' + ); + + callCallbacks(this, err, cb); + return; + } + + this._bufferedBytes -= options[kByteLength]; + this._state = DEFAULT; + options.readOnly = false; + this.sendFrame(Sender.frame(buf, options), cb); + this.dequeue(); + }); + } + + /** + * Executes queued send operations. + * + * @private + */ + dequeue() { + while (this._state === DEFAULT && this._queue.length) { + const params = this._queue.shift(); + + this._bufferedBytes -= params[3][kByteLength]; + Reflect.apply(params[0], this, params.slice(1)); + } + } + + /** + * Enqueues a send operation. + * + * @param {Array} params Send operation parameters. + * @private + */ + enqueue(params) { + this._bufferedBytes += params[3][kByteLength]; + this._queue.push(params); + } + + /** + * Sends a frame. + * + * @param {Buffer[]} list The frame to send + * @param {Function} [cb] Callback + * @private + */ + sendFrame(list, cb) { + if (list.length === 2) { + this._socket.cork(); + this._socket.write(list[0]); + this._socket.write(list[1], cb); + this._socket.uncork(); + } else { + this._socket.write(list[0], cb); + } + } +} + +module.exports = Sender; + +/** + * Calls queued callbacks with an error. + * + * @param {Sender} sender The `Sender` instance + * @param {Error} err The error to call the callbacks with + * @param {Function} [cb] The first callback + * @private + */ +function callCallbacks(sender, err, cb) { + if (typeof cb === 'function') cb(err); + + for (let i = 0; i < sender._queue.length; i++) { + const params = sender._queue[i]; + const callback = params[params.length - 1]; + + if (typeof callback === 'function') callback(err); + } +} + +/** + * Handles a `Sender` error. + * + * @param {Sender} sender The `Sender` instance + * @param {Error} err The error + * @param {Function} [cb] The first pending callback + * @private + */ +function onError(sender, err, cb) { + callCallbacks(sender, err, cb); + sender.onerror(err); +} diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/stream.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/stream.js" new file mode 100644 index 0000000..230734b --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/stream.js" @@ -0,0 +1,159 @@ +'use strict'; + +const { Duplex } = require('stream'); + +/** + * Emits the `'close'` event on a stream. + * + * @param {Duplex} stream The stream. + * @private + */ +function emitClose(stream) { + stream.emit('close'); +} + +/** + * The listener of the `'end'` event. + * + * @private + */ +function duplexOnEnd() { + if (!this.destroyed && this._writableState.finished) { + this.destroy(); + } +} + +/** + * The listener of the `'error'` event. + * + * @param {Error} err The error + * @private + */ +function duplexOnError(err) { + this.removeListener('error', duplexOnError); + this.destroy(); + if (this.listenerCount('error') === 0) { + // Do not suppress the throwing behavior. + this.emit('error', err); + } +} + +/** + * Wraps a `WebSocket` in a duplex stream. + * + * @param {WebSocket} ws The `WebSocket` to wrap + * @param {Object} [options] The options for the `Duplex` constructor + * @return {Duplex} The duplex stream + * @public + */ +function createWebSocketStream(ws, options) { + let terminateOnDestroy = true; + + const duplex = new Duplex({ + ...options, + autoDestroy: false, + emitClose: false, + objectMode: false, + writableObjectMode: false + }); + + ws.on('message', function message(msg, isBinary) { + const data = + !isBinary && duplex._readableState.objectMode ? msg.toString() : msg; + + if (!duplex.push(data)) ws.pause(); + }); + + ws.once('error', function error(err) { + if (duplex.destroyed) return; + + // Prevent `ws.terminate()` from being called by `duplex._destroy()`. + // + // - If the `'error'` event is emitted before the `'open'` event, then + // `ws.terminate()` is a noop as no socket is assigned. + // - Otherwise, the error is re-emitted by the listener of the `'error'` + // event of the `Receiver` object. The listener already closes the + // connection by calling `ws.close()`. This allows a close frame to be + // sent to the other peer. If `ws.terminate()` is called right after this, + // then the close frame might not be sent. + terminateOnDestroy = false; + duplex.destroy(err); + }); + + ws.once('close', function close() { + if (duplex.destroyed) return; + + duplex.push(null); + }); + + duplex._destroy = function (err, callback) { + if (ws.readyState === ws.CLOSED) { + callback(err); + process.nextTick(emitClose, duplex); + return; + } + + let called = false; + + ws.once('error', function error(err) { + called = true; + callback(err); + }); + + ws.once('close', function close() { + if (!called) callback(err); + process.nextTick(emitClose, duplex); + }); + + if (terminateOnDestroy) ws.terminate(); + }; + + duplex._final = function (callback) { + if (ws.readyState === ws.CONNECTING) { + ws.once('open', function open() { + duplex._final(callback); + }); + return; + } + + // If the value of the `_socket` property is `null` it means that `ws` is a + // client websocket and the handshake failed. In fact, when this happens, a + // socket is never assigned to the websocket. Wait for the `'error'` event + // that will be emitted by the websocket. + if (ws._socket === null) return; + + if (ws._socket._writableState.finished) { + callback(); + if (duplex._readableState.endEmitted) duplex.destroy(); + } else { + ws._socket.once('finish', function finish() { + // `duplex` is not destroyed here because the `'end'` event will be + // emitted on `duplex` after this `'finish'` event. The EOF signaling + // `null` chunk is, in fact, pushed when the websocket emits `'close'`. + callback(); + }); + ws.close(); + } + }; + + duplex._read = function () { + if (ws.isPaused) ws.resume(); + }; + + duplex._write = function (chunk, encoding, callback) { + if (ws.readyState === ws.CONNECTING) { + ws.once('open', function open() { + duplex._write(chunk, encoding, callback); + }); + return; + } + + ws.send(chunk, callback); + }; + + duplex.on('end', duplexOnEnd); + duplex.on('error', duplexOnError); + return duplex; +} + +module.exports = createWebSocketStream; diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/subprotocol.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/subprotocol.js" new file mode 100644 index 0000000..d4381e8 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/subprotocol.js" @@ -0,0 +1,62 @@ +'use strict'; + +const { tokenChars } = require('./validation'); + +/** + * Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names. + * + * @param {String} header The field value of the header + * @return {Set} The subprotocol names + * @public + */ +function parse(header) { + const protocols = new Set(); + let start = -1; + let end = -1; + let i = 0; + + for (i; i < header.length; i++) { + const code = header.charCodeAt(i); + + if (end === -1 && tokenChars[code] === 1) { + if (start === -1) start = i; + } else if ( + i !== 0 && + (code === 0x20 /* ' ' */ || code === 0x09) /* '\t' */ + ) { + if (end === -1 && start !== -1) end = i; + } else if (code === 0x2c /* ',' */) { + if (start === -1) { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + + if (end === -1) end = i; + + const protocol = header.slice(start, end); + + if (protocols.has(protocol)) { + throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`); + } + + protocols.add(protocol); + start = end = -1; + } else { + throw new SyntaxError(`Unexpected character at index ${i}`); + } + } + + if (start === -1 || end !== -1) { + throw new SyntaxError('Unexpected end of input'); + } + + const protocol = header.slice(start, i); + + if (protocols.has(protocol)) { + throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`); + } + + protocols.add(protocol); + return protocols; +} + +module.exports = { parse }; diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/validation.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/validation.js" new file mode 100644 index 0000000..4a2e68d --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/validation.js" @@ -0,0 +1,152 @@ +'use strict'; + +const { isUtf8 } = require('buffer'); + +const { hasBlob } = require('./constants'); + +// +// Allowed token characters: +// +// '!', '#', '$', '%', '&', ''', '*', '+', '-', +// '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~' +// +// tokenChars[32] === 0 // ' ' +// tokenChars[33] === 1 // '!' +// tokenChars[34] === 0 // '"' +// ... +// +// prettier-ignore +const tokenChars = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31 + 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32 - 47 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48 - 63 + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64 - 79 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80 - 95 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96 - 111 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 // 112 - 127 +]; + +/** + * Checks if a status code is allowed in a close frame. + * + * @param {Number} code The status code + * @return {Boolean} `true` if the status code is valid, else `false` + * @public + */ +function isValidStatusCode(code) { + return ( + (code >= 1000 && + code <= 1014 && + code !== 1004 && + code !== 1005 && + code !== 1006) || + (code >= 3000 && code <= 4999) + ); +} + +/** + * Checks if a given buffer contains only correct UTF-8. + * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by + * Markus Kuhn. + * + * @param {Buffer} buf The buffer to check + * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false` + * @public + */ +function _isValidUTF8(buf) { + const len = buf.length; + let i = 0; + + while (i < len) { + if ((buf[i] & 0x80) === 0) { + // 0xxxxxxx + i++; + } else if ((buf[i] & 0xe0) === 0xc0) { + // 110xxxxx 10xxxxxx + if ( + i + 1 === len || + (buf[i + 1] & 0xc0) !== 0x80 || + (buf[i] & 0xfe) === 0xc0 // Overlong + ) { + return false; + } + + i += 2; + } else if ((buf[i] & 0xf0) === 0xe0) { + // 1110xxxx 10xxxxxx 10xxxxxx + if ( + i + 2 >= len || + (buf[i + 1] & 0xc0) !== 0x80 || + (buf[i + 2] & 0xc0) !== 0x80 || + (buf[i] === 0xe0 && (buf[i + 1] & 0xe0) === 0x80) || // Overlong + (buf[i] === 0xed && (buf[i + 1] & 0xe0) === 0xa0) // Surrogate (U+D800 - U+DFFF) + ) { + return false; + } + + i += 3; + } else if ((buf[i] & 0xf8) === 0xf0) { + // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + if ( + i + 3 >= len || + (buf[i + 1] & 0xc0) !== 0x80 || + (buf[i + 2] & 0xc0) !== 0x80 || + (buf[i + 3] & 0xc0) !== 0x80 || + (buf[i] === 0xf0 && (buf[i + 1] & 0xf0) === 0x80) || // Overlong + (buf[i] === 0xf4 && buf[i + 1] > 0x8f) || + buf[i] > 0xf4 // > U+10FFFF + ) { + return false; + } + + i += 4; + } else { + return false; + } + } + + return true; +} + +/** + * Determines whether a value is a `Blob`. + * + * @param {*} value The value to be tested + * @return {Boolean} `true` if `value` is a `Blob`, else `false` + * @private + */ +function isBlob(value) { + return ( + hasBlob && + typeof value === 'object' && + typeof value.arrayBuffer === 'function' && + typeof value.type === 'string' && + typeof value.stream === 'function' && + (value[Symbol.toStringTag] === 'Blob' || + value[Symbol.toStringTag] === 'File') + ); +} + +module.exports = { + isBlob, + isValidStatusCode, + isValidUTF8: _isValidUTF8, + tokenChars +}; + +if (isUtf8) { + module.exports.isValidUTF8 = function (buf) { + return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf); + }; +} /* istanbul ignore else */ else if (!process.env.WS_NO_UTF_8_VALIDATE) { + try { + const isValidUTF8 = require('utf-8-validate'); + + module.exports.isValidUTF8 = function (buf) { + return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf); + }; + } catch (e) { + // Continue regardless of the error. + } +} diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/websocket-server.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/websocket-server.js" new file mode 100644 index 0000000..67b52ff --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/websocket-server.js" @@ -0,0 +1,540 @@ +/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$", "caughtErrors": "none" }] */ + +'use strict'; + +const EventEmitter = require('events'); +const http = require('http'); +const { Duplex } = require('stream'); +const { createHash } = require('crypto'); + +const extension = require('./extension'); +const PerMessageDeflate = require('./permessage-deflate'); +const subprotocol = require('./subprotocol'); +const WebSocket = require('./websocket'); +const { GUID, kWebSocket } = require('./constants'); + +const keyRegex = /^[+/0-9A-Za-z]{22}==$/; + +const RUNNING = 0; +const CLOSING = 1; +const CLOSED = 2; + +/** + * Class representing a WebSocket server. + * + * @extends EventEmitter + */ +class WebSocketServer extends EventEmitter { + /** + * Create a `WebSocketServer` instance. + * + * @param {Object} options Configuration options + * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether + * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted + * multiple times in the same tick + * @param {Boolean} [options.autoPong=true] Specifies whether or not to + * automatically send a pong in response to a ping + * @param {Number} [options.backlog=511] The maximum length of the queue of + * pending connections + * @param {Boolean} [options.clientTracking=true] Specifies whether or not to + * track clients + * @param {Function} [options.handleProtocols] A hook to handle protocols + * @param {String} [options.host] The hostname where to bind the server + * @param {Number} [options.maxPayload=104857600] The maximum allowed message + * size + * @param {Boolean} [options.noServer=false] Enable no server mode + * @param {String} [options.path] Accept only connections matching this path + * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable + * permessage-deflate + * @param {Number} [options.port] The port where to bind the server + * @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S + * server to use + * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or + * not to skip UTF-8 validation for text and close messages + * @param {Function} [options.verifyClient] A hook to reject connections + * @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket` + * class to use. It must be the `WebSocket` class or class that extends it + * @param {Function} [callback] A listener for the `listening` event + */ + constructor(options, callback) { + super(); + + options = { + allowSynchronousEvents: true, + autoPong: true, + maxPayload: 100 * 1024 * 1024, + skipUTF8Validation: false, + perMessageDeflate: false, + handleProtocols: null, + clientTracking: true, + verifyClient: null, + noServer: false, + backlog: null, // use default (511 as implemented in net.js) + server: null, + host: null, + path: null, + port: null, + WebSocket, + ...options + }; + + if ( + (options.port == null && !options.server && !options.noServer) || + (options.port != null && (options.server || options.noServer)) || + (options.server && options.noServer) + ) { + throw new TypeError( + 'One and only one of the "port", "server", or "noServer" options ' + + 'must be specified' + ); + } + + if (options.port != null) { + this._server = http.createServer((req, res) => { + const body = http.STATUS_CODES[426]; + + res.writeHead(426, { + 'Content-Length': body.length, + 'Content-Type': 'text/plain' + }); + res.end(body); + }); + this._server.listen( + options.port, + options.host, + options.backlog, + callback + ); + } else if (options.server) { + this._server = options.server; + } + + if (this._server) { + const emitConnection = this.emit.bind(this, 'connection'); + + this._removeListeners = addListeners(this._server, { + listening: this.emit.bind(this, 'listening'), + error: this.emit.bind(this, 'error'), + upgrade: (req, socket, head) => { + this.handleUpgrade(req, socket, head, emitConnection); + } + }); + } + + if (options.perMessageDeflate === true) options.perMessageDeflate = {}; + if (options.clientTracking) { + this.clients = new Set(); + this._shouldEmitClose = false; + } + + this.options = options; + this._state = RUNNING; + } + + /** + * Returns the bound address, the address family name, and port of the server + * as reported by the operating system if listening on an IP socket. + * If the server is listening on a pipe or UNIX domain socket, the name is + * returned as a string. + * + * @return {(Object|String|null)} The address of the server + * @public + */ + address() { + if (this.options.noServer) { + throw new Error('The server is operating in "noServer" mode'); + } + + if (!this._server) return null; + return this._server.address(); + } + + /** + * Stop the server from accepting new connections and emit the `'close'` event + * when all existing connections are closed. + * + * @param {Function} [cb] A one-time listener for the `'close'` event + * @public + */ + close(cb) { + if (this._state === CLOSED) { + if (cb) { + this.once('close', () => { + cb(new Error('The server is not running')); + }); + } + + process.nextTick(emitClose, this); + return; + } + + if (cb) this.once('close', cb); + + if (this._state === CLOSING) return; + this._state = CLOSING; + + if (this.options.noServer || this.options.server) { + if (this._server) { + this._removeListeners(); + this._removeListeners = this._server = null; + } + + if (this.clients) { + if (!this.clients.size) { + process.nextTick(emitClose, this); + } else { + this._shouldEmitClose = true; + } + } else { + process.nextTick(emitClose, this); + } + } else { + const server = this._server; + + this._removeListeners(); + this._removeListeners = this._server = null; + + // + // The HTTP/S server was created internally. Close it, and rely on its + // `'close'` event. + // + server.close(() => { + emitClose(this); + }); + } + } + + /** + * See if a given request should be handled by this server instance. + * + * @param {http.IncomingMessage} req Request object to inspect + * @return {Boolean} `true` if the request is valid, else `false` + * @public + */ + shouldHandle(req) { + if (this.options.path) { + const index = req.url.indexOf('?'); + const pathname = index !== -1 ? req.url.slice(0, index) : req.url; + + if (pathname !== this.options.path) return false; + } + + return true; + } + + /** + * Handle a HTTP Upgrade request. + * + * @param {http.IncomingMessage} req The request object + * @param {Duplex} socket The network socket between the server and client + * @param {Buffer} head The first packet of the upgraded stream + * @param {Function} cb Callback + * @public + */ + handleUpgrade(req, socket, head, cb) { + socket.on('error', socketOnError); + + const key = req.headers['sec-websocket-key']; + const upgrade = req.headers.upgrade; + const version = +req.headers['sec-websocket-version']; + + if (req.method !== 'GET') { + const message = 'Invalid HTTP method'; + abortHandshakeOrEmitwsClientError(this, req, socket, 405, message); + return; + } + + if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') { + const message = 'Invalid Upgrade header'; + abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); + return; + } + + if (key === undefined || !keyRegex.test(key)) { + const message = 'Missing or invalid Sec-WebSocket-Key header'; + abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); + return; + } + + if (version !== 8 && version !== 13) { + const message = 'Missing or invalid Sec-WebSocket-Version header'; + abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); + return; + } + + if (!this.shouldHandle(req)) { + abortHandshake(socket, 400); + return; + } + + const secWebSocketProtocol = req.headers['sec-websocket-protocol']; + let protocols = new Set(); + + if (secWebSocketProtocol !== undefined) { + try { + protocols = subprotocol.parse(secWebSocketProtocol); + } catch (err) { + const message = 'Invalid Sec-WebSocket-Protocol header'; + abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); + return; + } + } + + const secWebSocketExtensions = req.headers['sec-websocket-extensions']; + const extensions = {}; + + if ( + this.options.perMessageDeflate && + secWebSocketExtensions !== undefined + ) { + const perMessageDeflate = new PerMessageDeflate( + this.options.perMessageDeflate, + true, + this.options.maxPayload + ); + + try { + const offers = extension.parse(secWebSocketExtensions); + + if (offers[PerMessageDeflate.extensionName]) { + perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]); + extensions[PerMessageDeflate.extensionName] = perMessageDeflate; + } + } catch (err) { + const message = + 'Invalid or unacceptable Sec-WebSocket-Extensions header'; + abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); + return; + } + } + + // + // Optionally call external client verification handler. + // + if (this.options.verifyClient) { + const info = { + origin: + req.headers[`${version === 8 ? 'sec-websocket-origin' : 'origin'}`], + secure: !!(req.socket.authorized || req.socket.encrypted), + req + }; + + if (this.options.verifyClient.length === 2) { + this.options.verifyClient(info, (verified, code, message, headers) => { + if (!verified) { + return abortHandshake(socket, code || 401, message, headers); + } + + this.completeUpgrade( + extensions, + key, + protocols, + req, + socket, + head, + cb + ); + }); + return; + } + + if (!this.options.verifyClient(info)) return abortHandshake(socket, 401); + } + + this.completeUpgrade(extensions, key, protocols, req, socket, head, cb); + } + + /** + * Upgrade the connection to WebSocket. + * + * @param {Object} extensions The accepted extensions + * @param {String} key The value of the `Sec-WebSocket-Key` header + * @param {Set} protocols The subprotocols + * @param {http.IncomingMessage} req The request object + * @param {Duplex} socket The network socket between the server and client + * @param {Buffer} head The first packet of the upgraded stream + * @param {Function} cb Callback + * @throws {Error} If called more than once with the same socket + * @private + */ + completeUpgrade(extensions, key, protocols, req, socket, head, cb) { + // + // Destroy the socket if the client has already sent a FIN packet. + // + if (!socket.readable || !socket.writable) return socket.destroy(); + + if (socket[kWebSocket]) { + throw new Error( + 'server.handleUpgrade() was called more than once with the same ' + + 'socket, possibly due to a misconfiguration' + ); + } + + if (this._state > RUNNING) return abortHandshake(socket, 503); + + const digest = createHash('sha1') + .update(key + GUID) + .digest('base64'); + + const headers = [ + 'HTTP/1.1 101 Switching Protocols', + 'Upgrade: websocket', + 'Connection: Upgrade', + `Sec-WebSocket-Accept: ${digest}` + ]; + + const ws = new this.options.WebSocket(null, undefined, this.options); + + if (protocols.size) { + // + // Optionally call external protocol selection handler. + // + const protocol = this.options.handleProtocols + ? this.options.handleProtocols(protocols, req) + : protocols.values().next().value; + + if (protocol) { + headers.push(`Sec-WebSocket-Protocol: ${protocol}`); + ws._protocol = protocol; + } + } + + if (extensions[PerMessageDeflate.extensionName]) { + const params = extensions[PerMessageDeflate.extensionName].params; + const value = extension.format({ + [PerMessageDeflate.extensionName]: [params] + }); + headers.push(`Sec-WebSocket-Extensions: ${value}`); + ws._extensions = extensions; + } + + // + // Allow external modification/inspection of handshake headers. + // + this.emit('headers', headers, req); + + socket.write(headers.concat('\r\n').join('\r\n')); + socket.removeListener('error', socketOnError); + + ws.setSocket(socket, head, { + allowSynchronousEvents: this.options.allowSynchronousEvents, + maxPayload: this.options.maxPayload, + skipUTF8Validation: this.options.skipUTF8Validation + }); + + if (this.clients) { + this.clients.add(ws); + ws.on('close', () => { + this.clients.delete(ws); + + if (this._shouldEmitClose && !this.clients.size) { + process.nextTick(emitClose, this); + } + }); + } + + cb(ws, req); + } +} + +module.exports = WebSocketServer; + +/** + * Add event listeners on an `EventEmitter` using a map of + * pairs. + * + * @param {EventEmitter} server The event emitter + * @param {Object.} map The listeners to add + * @return {Function} A function that will remove the added listeners when + * called + * @private + */ +function addListeners(server, map) { + for (const event of Object.keys(map)) server.on(event, map[event]); + + return function removeListeners() { + for (const event of Object.keys(map)) { + server.removeListener(event, map[event]); + } + }; +} + +/** + * Emit a `'close'` event on an `EventEmitter`. + * + * @param {EventEmitter} server The event emitter + * @private + */ +function emitClose(server) { + server._state = CLOSED; + server.emit('close'); +} + +/** + * Handle socket errors. + * + * @private + */ +function socketOnError() { + this.destroy(); +} + +/** + * Close the connection when preconditions are not fulfilled. + * + * @param {Duplex} socket The socket of the upgrade request + * @param {Number} code The HTTP response status code + * @param {String} [message] The HTTP response body + * @param {Object} [headers] Additional HTTP response headers + * @private + */ +function abortHandshake(socket, code, message, headers) { + // + // The socket is writable unless the user destroyed or ended it before calling + // `server.handleUpgrade()` or in the `verifyClient` function, which is a user + // error. Handling this does not make much sense as the worst that can happen + // is that some of the data written by the user might be discarded due to the + // call to `socket.end()` below, which triggers an `'error'` event that in + // turn causes the socket to be destroyed. + // + message = message || http.STATUS_CODES[code]; + headers = { + Connection: 'close', + 'Content-Type': 'text/html', + 'Content-Length': Buffer.byteLength(message), + ...headers + }; + + socket.once('finish', socket.destroy); + + socket.end( + `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` + + Object.keys(headers) + .map((h) => `${h}: ${headers[h]}`) + .join('\r\n') + + '\r\n\r\n' + + message + ); +} + +/** + * Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least + * one listener for it, otherwise call `abortHandshake()`. + * + * @param {WebSocketServer} server The WebSocket server + * @param {http.IncomingMessage} req The request object + * @param {Duplex} socket The socket of the upgrade request + * @param {Number} code The HTTP response status code + * @param {String} message The HTTP response body + * @private + */ +function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) { + if (server.listenerCount('wsClientError')) { + const err = new Error(message); + Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError); + + server.emit('wsClientError', err, socket, req); + } else { + abortHandshake(socket, code, message); + } +} diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/websocket.js" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/websocket.js" new file mode 100644 index 0000000..7fb4029 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/lib/websocket.js" @@ -0,0 +1,1388 @@ +/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$", "caughtErrors": "none" }] */ + +'use strict'; + +const EventEmitter = require('events'); +const https = require('https'); +const http = require('http'); +const net = require('net'); +const tls = require('tls'); +const { randomBytes, createHash } = require('crypto'); +const { Duplex, Readable } = require('stream'); +const { URL } = require('url'); + +const PerMessageDeflate = require('./permessage-deflate'); +const Receiver = require('./receiver'); +const Sender = require('./sender'); +const { isBlob } = require('./validation'); + +const { + BINARY_TYPES, + EMPTY_BUFFER, + GUID, + kForOnEventAttribute, + kListener, + kStatusCode, + kWebSocket, + NOOP +} = require('./constants'); +const { + EventTarget: { addEventListener, removeEventListener } +} = require('./event-target'); +const { format, parse } = require('./extension'); +const { toBuffer } = require('./buffer-util'); + +const closeTimeout = 30 * 1000; +const kAborted = Symbol('kAborted'); +const protocolVersions = [8, 13]; +const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED']; +const subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/; + +/** + * Class representing a WebSocket. + * + * @extends EventEmitter + */ +class WebSocket extends EventEmitter { + /** + * Create a new `WebSocket`. + * + * @param {(String|URL)} address The URL to which to connect + * @param {(String|String[])} [protocols] The subprotocols + * @param {Object} [options] Connection options + */ + constructor(address, protocols, options) { + super(); + + this._binaryType = BINARY_TYPES[0]; + this._closeCode = 1006; + this._closeFrameReceived = false; + this._closeFrameSent = false; + this._closeMessage = EMPTY_BUFFER; + this._closeTimer = null; + this._errorEmitted = false; + this._extensions = {}; + this._paused = false; + this._protocol = ''; + this._readyState = WebSocket.CONNECTING; + this._receiver = null; + this._sender = null; + this._socket = null; + + if (address !== null) { + this._bufferedAmount = 0; + this._isServer = false; + this._redirects = 0; + + if (protocols === undefined) { + protocols = []; + } else if (!Array.isArray(protocols)) { + if (typeof protocols === 'object' && protocols !== null) { + options = protocols; + protocols = []; + } else { + protocols = [protocols]; + } + } + + initAsClient(this, address, protocols, options); + } else { + this._autoPong = options.autoPong; + this._isServer = true; + } + } + + /** + * For historical reasons, the custom "nodebuffer" type is used by the default + * instead of "blob". + * + * @type {String} + */ + get binaryType() { + return this._binaryType; + } + + set binaryType(type) { + if (!BINARY_TYPES.includes(type)) return; + + this._binaryType = type; + + // + // Allow to change `binaryType` on the fly. + // + if (this._receiver) this._receiver._binaryType = type; + } + + /** + * @type {Number} + */ + get bufferedAmount() { + if (!this._socket) return this._bufferedAmount; + + return this._socket._writableState.length + this._sender._bufferedBytes; + } + + /** + * @type {String} + */ + get extensions() { + return Object.keys(this._extensions).join(); + } + + /** + * @type {Boolean} + */ + get isPaused() { + return this._paused; + } + + /** + * @type {Function} + */ + /* istanbul ignore next */ + get onclose() { + return null; + } + + /** + * @type {Function} + */ + /* istanbul ignore next */ + get onerror() { + return null; + } + + /** + * @type {Function} + */ + /* istanbul ignore next */ + get onopen() { + return null; + } + + /** + * @type {Function} + */ + /* istanbul ignore next */ + get onmessage() { + return null; + } + + /** + * @type {String} + */ + get protocol() { + return this._protocol; + } + + /** + * @type {Number} + */ + get readyState() { + return this._readyState; + } + + /** + * @type {String} + */ + get url() { + return this._url; + } + + /** + * Set up the socket and the internal resources. + * + * @param {Duplex} socket The network socket between the server and client + * @param {Buffer} head The first packet of the upgraded stream + * @param {Object} options Options object + * @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether + * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted + * multiple times in the same tick + * @param {Function} [options.generateMask] The function used to generate the + * masking key + * @param {Number} [options.maxPayload=0] The maximum allowed message size + * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or + * not to skip UTF-8 validation for text and close messages + * @private + */ + setSocket(socket, head, options) { + const receiver = new Receiver({ + allowSynchronousEvents: options.allowSynchronousEvents, + binaryType: this.binaryType, + extensions: this._extensions, + isServer: this._isServer, + maxPayload: options.maxPayload, + skipUTF8Validation: options.skipUTF8Validation + }); + + const sender = new Sender(socket, this._extensions, options.generateMask); + + this._receiver = receiver; + this._sender = sender; + this._socket = socket; + + receiver[kWebSocket] = this; + sender[kWebSocket] = this; + socket[kWebSocket] = this; + + receiver.on('conclude', receiverOnConclude); + receiver.on('drain', receiverOnDrain); + receiver.on('error', receiverOnError); + receiver.on('message', receiverOnMessage); + receiver.on('ping', receiverOnPing); + receiver.on('pong', receiverOnPong); + + sender.onerror = senderOnError; + + // + // These methods may not be available if `socket` is just a `Duplex`. + // + if (socket.setTimeout) socket.setTimeout(0); + if (socket.setNoDelay) socket.setNoDelay(); + + if (head.length > 0) socket.unshift(head); + + socket.on('close', socketOnClose); + socket.on('data', socketOnData); + socket.on('end', socketOnEnd); + socket.on('error', socketOnError); + + this._readyState = WebSocket.OPEN; + this.emit('open'); + } + + /** + * Emit the `'close'` event. + * + * @private + */ + emitClose() { + if (!this._socket) { + this._readyState = WebSocket.CLOSED; + this.emit('close', this._closeCode, this._closeMessage); + return; + } + + if (this._extensions[PerMessageDeflate.extensionName]) { + this._extensions[PerMessageDeflate.extensionName].cleanup(); + } + + this._receiver.removeAllListeners(); + this._readyState = WebSocket.CLOSED; + this.emit('close', this._closeCode, this._closeMessage); + } + + /** + * Start a closing handshake. + * + * +----------+ +-----------+ +----------+ + * - - -|ws.close()|-->|close frame|-->|ws.close()|- - - + * | +----------+ +-----------+ +----------+ | + * +----------+ +-----------+ | + * CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING + * +----------+ +-----------+ | + * | | | +---+ | + * +------------------------+-->|fin| - - - - + * | +---+ | +---+ + * - - - - -|fin|<---------------------+ + * +---+ + * + * @param {Number} [code] Status code explaining why the connection is closing + * @param {(String|Buffer)} [data] The reason why the connection is + * closing + * @public + */ + close(code, data) { + if (this.readyState === WebSocket.CLOSED) return; + if (this.readyState === WebSocket.CONNECTING) { + const msg = 'WebSocket was closed before the connection was established'; + abortHandshake(this, this._req, msg); + return; + } + + if (this.readyState === WebSocket.CLOSING) { + if ( + this._closeFrameSent && + (this._closeFrameReceived || this._receiver._writableState.errorEmitted) + ) { + this._socket.end(); + } + + return; + } + + this._readyState = WebSocket.CLOSING; + this._sender.close(code, data, !this._isServer, (err) => { + // + // This error is handled by the `'error'` listener on the socket. We only + // want to know if the close frame has been sent here. + // + if (err) return; + + this._closeFrameSent = true; + + if ( + this._closeFrameReceived || + this._receiver._writableState.errorEmitted + ) { + this._socket.end(); + } + }); + + setCloseTimer(this); + } + + /** + * Pause the socket. + * + * @public + */ + pause() { + if ( + this.readyState === WebSocket.CONNECTING || + this.readyState === WebSocket.CLOSED + ) { + return; + } + + this._paused = true; + this._socket.pause(); + } + + /** + * Send a ping. + * + * @param {*} [data] The data to send + * @param {Boolean} [mask] Indicates whether or not to mask `data` + * @param {Function} [cb] Callback which is executed when the ping is sent + * @public + */ + ping(data, mask, cb) { + if (this.readyState === WebSocket.CONNECTING) { + throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); + } + + if (typeof data === 'function') { + cb = data; + data = mask = undefined; + } else if (typeof mask === 'function') { + cb = mask; + mask = undefined; + } + + if (typeof data === 'number') data = data.toString(); + + if (this.readyState !== WebSocket.OPEN) { + sendAfterClose(this, data, cb); + return; + } + + if (mask === undefined) mask = !this._isServer; + this._sender.ping(data || EMPTY_BUFFER, mask, cb); + } + + /** + * Send a pong. + * + * @param {*} [data] The data to send + * @param {Boolean} [mask] Indicates whether or not to mask `data` + * @param {Function} [cb] Callback which is executed when the pong is sent + * @public + */ + pong(data, mask, cb) { + if (this.readyState === WebSocket.CONNECTING) { + throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); + } + + if (typeof data === 'function') { + cb = data; + data = mask = undefined; + } else if (typeof mask === 'function') { + cb = mask; + mask = undefined; + } + + if (typeof data === 'number') data = data.toString(); + + if (this.readyState !== WebSocket.OPEN) { + sendAfterClose(this, data, cb); + return; + } + + if (mask === undefined) mask = !this._isServer; + this._sender.pong(data || EMPTY_BUFFER, mask, cb); + } + + /** + * Resume the socket. + * + * @public + */ + resume() { + if ( + this.readyState === WebSocket.CONNECTING || + this.readyState === WebSocket.CLOSED + ) { + return; + } + + this._paused = false; + if (!this._receiver._writableState.needDrain) this._socket.resume(); + } + + /** + * Send a data message. + * + * @param {*} data The message to send + * @param {Object} [options] Options object + * @param {Boolean} [options.binary] Specifies whether `data` is binary or + * text + * @param {Boolean} [options.compress] Specifies whether or not to compress + * `data` + * @param {Boolean} [options.fin=true] Specifies whether the fragment is the + * last one + * @param {Boolean} [options.mask] Specifies whether or not to mask `data` + * @param {Function} [cb] Callback which is executed when data is written out + * @public + */ + send(data, options, cb) { + if (this.readyState === WebSocket.CONNECTING) { + throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); + } + + if (typeof options === 'function') { + cb = options; + options = {}; + } + + if (typeof data === 'number') data = data.toString(); + + if (this.readyState !== WebSocket.OPEN) { + sendAfterClose(this, data, cb); + return; + } + + const opts = { + binary: typeof data !== 'string', + mask: !this._isServer, + compress: true, + fin: true, + ...options + }; + + if (!this._extensions[PerMessageDeflate.extensionName]) { + opts.compress = false; + } + + this._sender.send(data || EMPTY_BUFFER, opts, cb); + } + + /** + * Forcibly close the connection. + * + * @public + */ + terminate() { + if (this.readyState === WebSocket.CLOSED) return; + if (this.readyState === WebSocket.CONNECTING) { + const msg = 'WebSocket was closed before the connection was established'; + abortHandshake(this, this._req, msg); + return; + } + + if (this._socket) { + this._readyState = WebSocket.CLOSING; + this._socket.destroy(); + } + } +} + +/** + * @constant {Number} CONNECTING + * @memberof WebSocket + */ +Object.defineProperty(WebSocket, 'CONNECTING', { + enumerable: true, + value: readyStates.indexOf('CONNECTING') +}); + +/** + * @constant {Number} CONNECTING + * @memberof WebSocket.prototype + */ +Object.defineProperty(WebSocket.prototype, 'CONNECTING', { + enumerable: true, + value: readyStates.indexOf('CONNECTING') +}); + +/** + * @constant {Number} OPEN + * @memberof WebSocket + */ +Object.defineProperty(WebSocket, 'OPEN', { + enumerable: true, + value: readyStates.indexOf('OPEN') +}); + +/** + * @constant {Number} OPEN + * @memberof WebSocket.prototype + */ +Object.defineProperty(WebSocket.prototype, 'OPEN', { + enumerable: true, + value: readyStates.indexOf('OPEN') +}); + +/** + * @constant {Number} CLOSING + * @memberof WebSocket + */ +Object.defineProperty(WebSocket, 'CLOSING', { + enumerable: true, + value: readyStates.indexOf('CLOSING') +}); + +/** + * @constant {Number} CLOSING + * @memberof WebSocket.prototype + */ +Object.defineProperty(WebSocket.prototype, 'CLOSING', { + enumerable: true, + value: readyStates.indexOf('CLOSING') +}); + +/** + * @constant {Number} CLOSED + * @memberof WebSocket + */ +Object.defineProperty(WebSocket, 'CLOSED', { + enumerable: true, + value: readyStates.indexOf('CLOSED') +}); + +/** + * @constant {Number} CLOSED + * @memberof WebSocket.prototype + */ +Object.defineProperty(WebSocket.prototype, 'CLOSED', { + enumerable: true, + value: readyStates.indexOf('CLOSED') +}); + +[ + 'binaryType', + 'bufferedAmount', + 'extensions', + 'isPaused', + 'protocol', + 'readyState', + 'url' +].forEach((property) => { + Object.defineProperty(WebSocket.prototype, property, { enumerable: true }); +}); + +// +// Add the `onopen`, `onerror`, `onclose`, and `onmessage` attributes. +// See https://html.spec.whatwg.org/multipage/comms.html#the-websocket-interface +// +['open', 'error', 'close', 'message'].forEach((method) => { + Object.defineProperty(WebSocket.prototype, `on${method}`, { + enumerable: true, + get() { + for (const listener of this.listeners(method)) { + if (listener[kForOnEventAttribute]) return listener[kListener]; + } + + return null; + }, + set(handler) { + for (const listener of this.listeners(method)) { + if (listener[kForOnEventAttribute]) { + this.removeListener(method, listener); + break; + } + } + + if (typeof handler !== 'function') return; + + this.addEventListener(method, handler, { + [kForOnEventAttribute]: true + }); + } + }); +}); + +WebSocket.prototype.addEventListener = addEventListener; +WebSocket.prototype.removeEventListener = removeEventListener; + +module.exports = WebSocket; + +/** + * Initialize a WebSocket client. + * + * @param {WebSocket} websocket The client to initialize + * @param {(String|URL)} address The URL to which to connect + * @param {Array} protocols The subprotocols + * @param {Object} [options] Connection options + * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether any + * of the `'message'`, `'ping'`, and `'pong'` events can be emitted multiple + * times in the same tick + * @param {Boolean} [options.autoPong=true] Specifies whether or not to + * automatically send a pong in response to a ping + * @param {Function} [options.finishRequest] A function which can be used to + * customize the headers of each http request before it is sent + * @param {Boolean} [options.followRedirects=false] Whether or not to follow + * redirects + * @param {Function} [options.generateMask] The function used to generate the + * masking key + * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the + * handshake request + * @param {Number} [options.maxPayload=104857600] The maximum allowed message + * size + * @param {Number} [options.maxRedirects=10] The maximum number of redirects + * allowed + * @param {String} [options.origin] Value of the `Origin` or + * `Sec-WebSocket-Origin` header + * @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable + * permessage-deflate + * @param {Number} [options.protocolVersion=13] Value of the + * `Sec-WebSocket-Version` header + * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or + * not to skip UTF-8 validation for text and close messages + * @private + */ +function initAsClient(websocket, address, protocols, options) { + const opts = { + allowSynchronousEvents: true, + autoPong: true, + protocolVersion: protocolVersions[1], + maxPayload: 100 * 1024 * 1024, + skipUTF8Validation: false, + perMessageDeflate: true, + followRedirects: false, + maxRedirects: 10, + ...options, + socketPath: undefined, + hostname: undefined, + protocol: undefined, + timeout: undefined, + method: 'GET', + host: undefined, + path: undefined, + port: undefined + }; + + websocket._autoPong = opts.autoPong; + + if (!protocolVersions.includes(opts.protocolVersion)) { + throw new RangeError( + `Unsupported protocol version: ${opts.protocolVersion} ` + + `(supported versions: ${protocolVersions.join(', ')})` + ); + } + + let parsedUrl; + + if (address instanceof URL) { + parsedUrl = address; + } else { + try { + parsedUrl = new URL(address); + } catch (e) { + throw new SyntaxError(`Invalid URL: ${address}`); + } + } + + if (parsedUrl.protocol === 'http:') { + parsedUrl.protocol = 'ws:'; + } else if (parsedUrl.protocol === 'https:') { + parsedUrl.protocol = 'wss:'; + } + + websocket._url = parsedUrl.href; + + const isSecure = parsedUrl.protocol === 'wss:'; + const isIpcUrl = parsedUrl.protocol === 'ws+unix:'; + let invalidUrlMessage; + + if (parsedUrl.protocol !== 'ws:' && !isSecure && !isIpcUrl) { + invalidUrlMessage = + 'The URL\'s protocol must be one of "ws:", "wss:", ' + + '"http:", "https", or "ws+unix:"'; + } else if (isIpcUrl && !parsedUrl.pathname) { + invalidUrlMessage = "The URL's pathname is empty"; + } else if (parsedUrl.hash) { + invalidUrlMessage = 'The URL contains a fragment identifier'; + } + + if (invalidUrlMessage) { + const err = new SyntaxError(invalidUrlMessage); + + if (websocket._redirects === 0) { + throw err; + } else { + emitErrorAndClose(websocket, err); + return; + } + } + + const defaultPort = isSecure ? 443 : 80; + const key = randomBytes(16).toString('base64'); + const request = isSecure ? https.request : http.request; + const protocolSet = new Set(); + let perMessageDeflate; + + opts.createConnection = + opts.createConnection || (isSecure ? tlsConnect : netConnect); + opts.defaultPort = opts.defaultPort || defaultPort; + opts.port = parsedUrl.port || defaultPort; + opts.host = parsedUrl.hostname.startsWith('[') + ? parsedUrl.hostname.slice(1, -1) + : parsedUrl.hostname; + opts.headers = { + ...opts.headers, + 'Sec-WebSocket-Version': opts.protocolVersion, + 'Sec-WebSocket-Key': key, + Connection: 'Upgrade', + Upgrade: 'websocket' + }; + opts.path = parsedUrl.pathname + parsedUrl.search; + opts.timeout = opts.handshakeTimeout; + + if (opts.perMessageDeflate) { + perMessageDeflate = new PerMessageDeflate( + opts.perMessageDeflate !== true ? opts.perMessageDeflate : {}, + false, + opts.maxPayload + ); + opts.headers['Sec-WebSocket-Extensions'] = format({ + [PerMessageDeflate.extensionName]: perMessageDeflate.offer() + }); + } + if (protocols.length) { + for (const protocol of protocols) { + if ( + typeof protocol !== 'string' || + !subprotocolRegex.test(protocol) || + protocolSet.has(protocol) + ) { + throw new SyntaxError( + 'An invalid or duplicated subprotocol was specified' + ); + } + + protocolSet.add(protocol); + } + + opts.headers['Sec-WebSocket-Protocol'] = protocols.join(','); + } + if (opts.origin) { + if (opts.protocolVersion < 13) { + opts.headers['Sec-WebSocket-Origin'] = opts.origin; + } else { + opts.headers.Origin = opts.origin; + } + } + if (parsedUrl.username || parsedUrl.password) { + opts.auth = `${parsedUrl.username}:${parsedUrl.password}`; + } + + if (isIpcUrl) { + const parts = opts.path.split(':'); + + opts.socketPath = parts[0]; + opts.path = parts[1]; + } + + let req; + + if (opts.followRedirects) { + if (websocket._redirects === 0) { + websocket._originalIpc = isIpcUrl; + websocket._originalSecure = isSecure; + websocket._originalHostOrSocketPath = isIpcUrl + ? opts.socketPath + : parsedUrl.host; + + const headers = options && options.headers; + + // + // Shallow copy the user provided options so that headers can be changed + // without mutating the original object. + // + options = { ...options, headers: {} }; + + if (headers) { + for (const [key, value] of Object.entries(headers)) { + options.headers[key.toLowerCase()] = value; + } + } + } else if (websocket.listenerCount('redirect') === 0) { + const isSameHost = isIpcUrl + ? websocket._originalIpc + ? opts.socketPath === websocket._originalHostOrSocketPath + : false + : websocket._originalIpc + ? false + : parsedUrl.host === websocket._originalHostOrSocketPath; + + if (!isSameHost || (websocket._originalSecure && !isSecure)) { + // + // Match curl 7.77.0 behavior and drop the following headers. These + // headers are also dropped when following a redirect to a subdomain. + // + delete opts.headers.authorization; + delete opts.headers.cookie; + + if (!isSameHost) delete opts.headers.host; + + opts.auth = undefined; + } + } + + // + // Match curl 7.77.0 behavior and make the first `Authorization` header win. + // If the `Authorization` header is set, then there is nothing to do as it + // will take precedence. + // + if (opts.auth && !options.headers.authorization) { + options.headers.authorization = + 'Basic ' + Buffer.from(opts.auth).toString('base64'); + } + + req = websocket._req = request(opts); + + if (websocket._redirects) { + // + // Unlike what is done for the `'upgrade'` event, no early exit is + // triggered here if the user calls `websocket.close()` or + // `websocket.terminate()` from a listener of the `'redirect'` event. This + // is because the user can also call `request.destroy()` with an error + // before calling `websocket.close()` or `websocket.terminate()` and this + // would result in an error being emitted on the `request` object with no + // `'error'` event listeners attached. + // + websocket.emit('redirect', websocket.url, req); + } + } else { + req = websocket._req = request(opts); + } + + if (opts.timeout) { + req.on('timeout', () => { + abortHandshake(websocket, req, 'Opening handshake has timed out'); + }); + } + + req.on('error', (err) => { + if (req === null || req[kAborted]) return; + + req = websocket._req = null; + emitErrorAndClose(websocket, err); + }); + + req.on('response', (res) => { + const location = res.headers.location; + const statusCode = res.statusCode; + + if ( + location && + opts.followRedirects && + statusCode >= 300 && + statusCode < 400 + ) { + if (++websocket._redirects > opts.maxRedirects) { + abortHandshake(websocket, req, 'Maximum redirects exceeded'); + return; + } + + req.abort(); + + let addr; + + try { + addr = new URL(location, address); + } catch (e) { + const err = new SyntaxError(`Invalid URL: ${location}`); + emitErrorAndClose(websocket, err); + return; + } + + initAsClient(websocket, addr, protocols, options); + } else if (!websocket.emit('unexpected-response', req, res)) { + abortHandshake( + websocket, + req, + `Unexpected server response: ${res.statusCode}` + ); + } + }); + + req.on('upgrade', (res, socket, head) => { + websocket.emit('upgrade', res); + + // + // The user may have closed the connection from a listener of the + // `'upgrade'` event. + // + if (websocket.readyState !== WebSocket.CONNECTING) return; + + req = websocket._req = null; + + const upgrade = res.headers.upgrade; + + if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') { + abortHandshake(websocket, socket, 'Invalid Upgrade header'); + return; + } + + const digest = createHash('sha1') + .update(key + GUID) + .digest('base64'); + + if (res.headers['sec-websocket-accept'] !== digest) { + abortHandshake(websocket, socket, 'Invalid Sec-WebSocket-Accept header'); + return; + } + + const serverProt = res.headers['sec-websocket-protocol']; + let protError; + + if (serverProt !== undefined) { + if (!protocolSet.size) { + protError = 'Server sent a subprotocol but none was requested'; + } else if (!protocolSet.has(serverProt)) { + protError = 'Server sent an invalid subprotocol'; + } + } else if (protocolSet.size) { + protError = 'Server sent no subprotocol'; + } + + if (protError) { + abortHandshake(websocket, socket, protError); + return; + } + + if (serverProt) websocket._protocol = serverProt; + + const secWebSocketExtensions = res.headers['sec-websocket-extensions']; + + if (secWebSocketExtensions !== undefined) { + if (!perMessageDeflate) { + const message = + 'Server sent a Sec-WebSocket-Extensions header but no extension ' + + 'was requested'; + abortHandshake(websocket, socket, message); + return; + } + + let extensions; + + try { + extensions = parse(secWebSocketExtensions); + } catch (err) { + const message = 'Invalid Sec-WebSocket-Extensions header'; + abortHandshake(websocket, socket, message); + return; + } + + const extensionNames = Object.keys(extensions); + + if ( + extensionNames.length !== 1 || + extensionNames[0] !== PerMessageDeflate.extensionName + ) { + const message = 'Server indicated an extension that was not requested'; + abortHandshake(websocket, socket, message); + return; + } + + try { + perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]); + } catch (err) { + const message = 'Invalid Sec-WebSocket-Extensions header'; + abortHandshake(websocket, socket, message); + return; + } + + websocket._extensions[PerMessageDeflate.extensionName] = + perMessageDeflate; + } + + websocket.setSocket(socket, head, { + allowSynchronousEvents: opts.allowSynchronousEvents, + generateMask: opts.generateMask, + maxPayload: opts.maxPayload, + skipUTF8Validation: opts.skipUTF8Validation + }); + }); + + if (opts.finishRequest) { + opts.finishRequest(req, websocket); + } else { + req.end(); + } +} + +/** + * Emit the `'error'` and `'close'` events. + * + * @param {WebSocket} websocket The WebSocket instance + * @param {Error} The error to emit + * @private + */ +function emitErrorAndClose(websocket, err) { + websocket._readyState = WebSocket.CLOSING; + // + // The following assignment is practically useless and is done only for + // consistency. + // + websocket._errorEmitted = true; + websocket.emit('error', err); + websocket.emitClose(); +} + +/** + * Create a `net.Socket` and initiate a connection. + * + * @param {Object} options Connection options + * @return {net.Socket} The newly created socket used to start the connection + * @private + */ +function netConnect(options) { + options.path = options.socketPath; + return net.connect(options); +} + +/** + * Create a `tls.TLSSocket` and initiate a connection. + * + * @param {Object} options Connection options + * @return {tls.TLSSocket} The newly created socket used to start the connection + * @private + */ +function tlsConnect(options) { + options.path = undefined; + + if (!options.servername && options.servername !== '') { + options.servername = net.isIP(options.host) ? '' : options.host; + } + + return tls.connect(options); +} + +/** + * Abort the handshake and emit an error. + * + * @param {WebSocket} websocket The WebSocket instance + * @param {(http.ClientRequest|net.Socket|tls.Socket)} stream The request to + * abort or the socket to destroy + * @param {String} message The error message + * @private + */ +function abortHandshake(websocket, stream, message) { + websocket._readyState = WebSocket.CLOSING; + + const err = new Error(message); + Error.captureStackTrace(err, abortHandshake); + + if (stream.setHeader) { + stream[kAborted] = true; + stream.abort(); + + if (stream.socket && !stream.socket.destroyed) { + // + // On Node.js >= 14.3.0 `request.abort()` does not destroy the socket if + // called after the request completed. See + // https://github.com/websockets/ws/issues/1869. + // + stream.socket.destroy(); + } + + process.nextTick(emitErrorAndClose, websocket, err); + } else { + stream.destroy(err); + stream.once('error', websocket.emit.bind(websocket, 'error')); + stream.once('close', websocket.emitClose.bind(websocket)); + } +} + +/** + * Handle cases where the `ping()`, `pong()`, or `send()` methods are called + * when the `readyState` attribute is `CLOSING` or `CLOSED`. + * + * @param {WebSocket} websocket The WebSocket instance + * @param {*} [data] The data to send + * @param {Function} [cb] Callback + * @private + */ +function sendAfterClose(websocket, data, cb) { + if (data) { + const length = isBlob(data) ? data.size : toBuffer(data).length; + + // + // The `_bufferedAmount` property is used only when the peer is a client and + // the opening handshake fails. Under these circumstances, in fact, the + // `setSocket()` method is not called, so the `_socket` and `_sender` + // properties are set to `null`. + // + if (websocket._socket) websocket._sender._bufferedBytes += length; + else websocket._bufferedAmount += length; + } + + if (cb) { + const err = new Error( + `WebSocket is not open: readyState ${websocket.readyState} ` + + `(${readyStates[websocket.readyState]})` + ); + process.nextTick(cb, err); + } +} + +/** + * The listener of the `Receiver` `'conclude'` event. + * + * @param {Number} code The status code + * @param {Buffer} reason The reason for closing + * @private + */ +function receiverOnConclude(code, reason) { + const websocket = this[kWebSocket]; + + websocket._closeFrameReceived = true; + websocket._closeMessage = reason; + websocket._closeCode = code; + + if (websocket._socket[kWebSocket] === undefined) return; + + websocket._socket.removeListener('data', socketOnData); + process.nextTick(resume, websocket._socket); + + if (code === 1005) websocket.close(); + else websocket.close(code, reason); +} + +/** + * The listener of the `Receiver` `'drain'` event. + * + * @private + */ +function receiverOnDrain() { + const websocket = this[kWebSocket]; + + if (!websocket.isPaused) websocket._socket.resume(); +} + +/** + * The listener of the `Receiver` `'error'` event. + * + * @param {(RangeError|Error)} err The emitted error + * @private + */ +function receiverOnError(err) { + const websocket = this[kWebSocket]; + + if (websocket._socket[kWebSocket] !== undefined) { + websocket._socket.removeListener('data', socketOnData); + + // + // On Node.js < 14.0.0 the `'error'` event is emitted synchronously. See + // https://github.com/websockets/ws/issues/1940. + // + process.nextTick(resume, websocket._socket); + + websocket.close(err[kStatusCode]); + } + + if (!websocket._errorEmitted) { + websocket._errorEmitted = true; + websocket.emit('error', err); + } +} + +/** + * The listener of the `Receiver` `'finish'` event. + * + * @private + */ +function receiverOnFinish() { + this[kWebSocket].emitClose(); +} + +/** + * The listener of the `Receiver` `'message'` event. + * + * @param {Buffer|ArrayBuffer|Buffer[])} data The message + * @param {Boolean} isBinary Specifies whether the message is binary or not + * @private + */ +function receiverOnMessage(data, isBinary) { + this[kWebSocket].emit('message', data, isBinary); +} + +/** + * The listener of the `Receiver` `'ping'` event. + * + * @param {Buffer} data The data included in the ping frame + * @private + */ +function receiverOnPing(data) { + const websocket = this[kWebSocket]; + + if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP); + websocket.emit('ping', data); +} + +/** + * The listener of the `Receiver` `'pong'` event. + * + * @param {Buffer} data The data included in the pong frame + * @private + */ +function receiverOnPong(data) { + this[kWebSocket].emit('pong', data); +} + +/** + * Resume a readable stream + * + * @param {Readable} stream The readable stream + * @private + */ +function resume(stream) { + stream.resume(); +} + +/** + * The `Sender` error event handler. + * + * @param {Error} The error + * @private + */ +function senderOnError(err) { + const websocket = this[kWebSocket]; + + if (websocket.readyState === WebSocket.CLOSED) return; + if (websocket.readyState === WebSocket.OPEN) { + websocket._readyState = WebSocket.CLOSING; + setCloseTimer(websocket); + } + + // + // `socket.end()` is used instead of `socket.destroy()` to allow the other + // peer to finish sending queued data. There is no need to set a timer here + // because `CLOSING` means that it is already set or not needed. + // + this._socket.end(); + + if (!websocket._errorEmitted) { + websocket._errorEmitted = true; + websocket.emit('error', err); + } +} + +/** + * Set a timer to destroy the underlying raw socket of a WebSocket. + * + * @param {WebSocket} websocket The WebSocket instance + * @private + */ +function setCloseTimer(websocket) { + websocket._closeTimer = setTimeout( + websocket._socket.destroy.bind(websocket._socket), + closeTimeout + ); +} + +/** + * The listener of the socket `'close'` event. + * + * @private + */ +function socketOnClose() { + const websocket = this[kWebSocket]; + + this.removeListener('close', socketOnClose); + this.removeListener('data', socketOnData); + this.removeListener('end', socketOnEnd); + + websocket._readyState = WebSocket.CLOSING; + + let chunk; + + // + // The close frame might not have been received or the `'end'` event emitted, + // for example, if the socket was destroyed due to an error. Ensure that the + // `receiver` stream is closed after writing any remaining buffered data to + // it. If the readable side of the socket is in flowing mode then there is no + // buffered data as everything has been already written and `readable.read()` + // will return `null`. If instead, the socket is paused, any possible buffered + // data will be read as a single chunk. + // + if ( + !this._readableState.endEmitted && + !websocket._closeFrameReceived && + !websocket._receiver._writableState.errorEmitted && + (chunk = websocket._socket.read()) !== null + ) { + websocket._receiver.write(chunk); + } + + websocket._receiver.end(); + + this[kWebSocket] = undefined; + + clearTimeout(websocket._closeTimer); + + if ( + websocket._receiver._writableState.finished || + websocket._receiver._writableState.errorEmitted + ) { + websocket.emitClose(); + } else { + websocket._receiver.on('error', receiverOnFinish); + websocket._receiver.on('finish', receiverOnFinish); + } +} + +/** + * The listener of the socket `'data'` event. + * + * @param {Buffer} chunk A chunk of data + * @private + */ +function socketOnData(chunk) { + if (!this[kWebSocket]._receiver.write(chunk)) { + this.pause(); + } +} + +/** + * The listener of the socket `'end'` event. + * + * @private + */ +function socketOnEnd() { + const websocket = this[kWebSocket]; + + websocket._readyState = WebSocket.CLOSING; + websocket._receiver.end(); + this.end(); +} + +/** + * The listener of the socket `'error'` event. + * + * @private + */ +function socketOnError() { + const websocket = this[kWebSocket]; + + this.removeListener('error', socketOnError); + this.on('error', NOOP); + + if (websocket) { + websocket._readyState = WebSocket.CLOSING; + this.destroy(); + } +} diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/package.json" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/package.json" new file mode 100644 index 0000000..4f7155d --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/package.json" @@ -0,0 +1,69 @@ +{ + "name": "ws", + "version": "8.18.0", + "description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js", + "keywords": [ + "HyBi", + "Push", + "RFC-6455", + "WebSocket", + "WebSockets", + "real-time" + ], + "homepage": "https://github.com/websockets/ws", + "bugs": "https://github.com/websockets/ws/issues", + "repository": { + "type": "git", + "url": "git+https://github.com/websockets/ws.git" + }, + "author": "Einar Otto Stangvik (http://2x.io)", + "license": "MIT", + "main": "index.js", + "exports": { + ".": { + "browser": "./browser.js", + "import": "./wrapper.mjs", + "require": "./index.js" + }, + "./package.json": "./package.json" + }, + "browser": "browser.js", + "engines": { + "node": ">=10.0.0" + }, + "files": [ + "browser.js", + "index.js", + "lib/*.js", + "wrapper.mjs" + ], + "scripts": { + "test": "nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js", + "integration": "mocha --throw-deprecation test/*.integration.js", + "lint": "eslint . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\"" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + }, + "devDependencies": { + "benchmark": "^2.1.4", + "bufferutil": "^4.0.1", + "eslint": "^9.0.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "globals": "^15.0.0", + "mocha": "^8.4.0", + "nyc": "^15.0.0", + "prettier": "^3.0.0", + "utf-8-validate": "^6.0.0" + } +} diff --git "a/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/wrapper.mjs" "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/wrapper.mjs" new file mode 100644 index 0000000..7245ad1 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/node_modules/ws/wrapper.mjs" @@ -0,0 +1,8 @@ +import createWebSocketStream from './lib/stream.js'; +import Receiver from './lib/receiver.js'; +import Sender from './lib/sender.js'; +import WebSocket from './lib/websocket.js'; +import WebSocketServer from './lib/websocket-server.js'; + +export { createWebSocketStream, Receiver, Sender, WebSocket, WebSocketServer }; +export default WebSocket; diff --git "a/system/websocket_test/em-ws-web\050intro\051/package-lock.json" "b/system/websocket_test/em-ws-web\050intro\051/package-lock.json" new file mode 100644 index 0000000..46dfb9a --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/package-lock.json" @@ -0,0 +1,44 @@ +{ + "name": "em-ws-web", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "em-ws-web", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "ws": "^8.18.0" + } + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + }, + "dependencies": { + "ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "requires": {} + } + } +} diff --git "a/system/websocket_test/em-ws-web\050intro\051/package.json" "b/system/websocket_test/em-ws-web\050intro\051/package.json" new file mode 100644 index 0000000..2893f3c --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/package.json" @@ -0,0 +1,15 @@ +{ + "name": "em-ws-web", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "ws": "^8.18.0" + } +} diff --git "a/system/websocket_test/em-ws-web\050intro\051/server/em-websocket.rb" "b/system/websocket_test/em-ws-web\050intro\051/server/em-websocket.rb" new file mode 100755 index 0000000..8d1829a --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/server/em-websocket.rb" @@ -0,0 +1,82 @@ +#!/usr/bin/env ruby + +require 'em-websocket' #websoketライブラリ +require 'pp' #人間が読みやすいように表示してくれる +require 'json' #json形式にしたり、直したりする + +PORT = 8293 #portを指定 +button_clicker = [] +clients_id_only = {} #クライエント + +puts "参加者が入ったら表示するよ" + +EM::WebSocket.start({ #EventMachienを使用してWebsocket server を起動 (簡単に言えば非同期処理できる) + :host => '0.0.0.0', #すべてのネットワーク・インターフェースを表す、別ホストからでもアクセスできる + :port => PORT, + # :secure => true +}) do |em_ws| + clients_id_only[em_ws] = true + printf("現在の接続人数は %d 人です\n", clients_id_only.length) + + em_ws.onopen do #onopen:クライエントが接続したときに呼び出されるイベント + em_ws.send "Ruby:接続されたよ!" #接続したクライエントにメッセージを送る + # printf("Ruby:clientが接続されました\n") #あとで誰が接続されたかデータ来るところにするーー + em_ws.send(button_clicker.to_json) #途中参加した人も現在の早押しの順番を反映させるためにjsonを送る + end + + em_ws.onmessage do |msg| #onmassage:クライエントからメッセージを受信したときに呼び出されるイベント + + # jsonデータかの判別 + begin # 例外が発生する可能性のあるコードブロックの開始、このブロックでエラーがあれがrescue節に移る + data = JSON.parse(msg) #json -> hash に変更 + # puts data + rescue => error # beginブロック内で例外が発生した場合に実行される、エラーはerrorという変数に格納 + if msg.match(/ボタンを押しました/) + msg.match(/(team\d)\sの\s([0-9a-z]+)\s/) + hayaoshi(button_clicker, $1, $2) + clients_id_only.each do |key, value| + key.send(button_clicker.to_json) + key.send("pushed button"); + end + p button_clicker + elsif msg == "reset" + button_clicker = [] + p button_clicker + clients_id_only.each do |key, value| + key.send("reset"); + end + end + # puts error.class  + puts error.message + # puts error.backtrace + # puts msg + end + # em_ws.send "Ruby:サーバにメッセージ届きました!" #メッセージが来たことをクライエントに知らせる + end + + em_ws.onclose do #クライエントが接続を閉じたときに呼び出されるイベント + puts "Ruby:clientが接続を閉じました" #あとで誰抜けたかデータ持ってくるーー + clients_id_only.delete(em_ws) + printf("現在の接続人数は %d 人です\n", clients_id_only.length) + end + + em_ws.onerror do |error| #エラーが発生したときに呼び出されるイベント + puts "Ruby:Error: #{error.message}" + end + + def hayaoshi(array, team, name) + flag = false + array.each do |key, value| + if key == team + flag = true + end + end + if flag == false + array.push([team, name]) + return "#{team} の #{name} さんがボタンを押しました!" + else + return "#{team} はもう押してます!" + end + end + +end diff --git "a/system/websocket_test/em-ws-web\050intro\051/server/server.html" "b/system/websocket_test/em-ws-web\050intro\051/server/server.html" new file mode 100644 index 0000000..3977287 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/server/server.html" @@ -0,0 +1,26 @@ + + + + + + + Server + + + +

songName

+ + +
+ + + +
+ +

早押しボタンを押した順番

+

+ + + + + \ No newline at end of file diff --git "a/system/websocket_test/em-ws-web\050intro\051/server/server.js" "b/system/websocket_test/em-ws-web\050intro\051/server/server.js" new file mode 100644 index 0000000..803c1bd --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/server/server.js" @@ -0,0 +1,116 @@ +function init() { + let songName = document.getElementById("songName"), + audio = document.getElementById("audio"), + previousSong = document.getElementById("previousSong"), + nextSong = document.getElementById("nextSong"), + speedButtonReset = document.getElementById("speedButtonReset"), + answerColumn = document.getElementById("answerColumn"), + counter = 1; + + console.log(audio); + console.log(previousSong); + console.log(nextSong); + + fetch("../mp3/mp3_path.csv") + .then((response) => { + return response.text(); + }) + .then((data) => { + let result = data.split(/\r?\n|\r/).map((e) => { + return e.split(","); + }); + console.log(result); + console.log(`このCSVには ${result.length - 1}曲 登録されています。`); + songName.innerHTML = result[1][0]; + + nextSong.addEventListener("click", next, false); + previousSong.addEventListener("click", previous, false); + + function previous() { + counter -= 1; + if (counter == 0) { + counter = result.length - 1; + } + songName.innerHTML = result[counter][0]; + audio.src = result[counter][1]; + + socket.send("reset"); + answerColumn.innerHTML = ""; + } + + function next() { + counter += 1; + if (counter == result.length) { + counter = 1; + } + songName.innerHTML = result[counter][0]; + audio.src = result[counter][1]; + + socket.send("reset"); + answerColumn.innerHTML = ""; + } + + }) + .catch((error) => { + console.log(error); + }); + + let socket; + function websocket() { + try { + if (!socket || socket.readyState !== 1) { //!socketは最初の接続のときに真になる、socket.readyStateは接続後に真になる + + socket = new WebSocket('wss://www.koeki-prj.org/quiz2024'); + // socket = new WebSocket('ws://localhost:8293'); + socket.onopen = function (event) { + console.log("JS:接続されました!"); + socket.send("JS:Hostです!") + }; + + socket.onmessage = function (event) { + let receivedMsg = event.data; + try { + button_clicker = JSON.parse(receivedMsg); + console.log(button_clicker); + answerColumn.innerHTML = "" //表示場所のリセット + for(let i = 0; i < button_clicker.length; i++) { + console.log(button_clicker[i][1]); + answerColumn.innerHTML += `${i + 1}: ${button_clicker[i][0]} の ${button_clicker[i][1]} です!
` + } + } catch (error) { + console.log(event.data); + if (event.data.match(/pushed button/)) { + console.log(event.data); + audio.pause(); + } + } + } + + socket.onclose = function (event) { + if (event.wasClean) { + console.log("JS:切断しました!") + } else { + console.error("JS:切断エラーが起きました!"); + } + } + + socket.onerror = function (error) { + console.error("JS:WebSocket Error" + error) + } + + speedButtonReset.addEventListener("click", reset, false); + + function reset() { + socket.send("reset"); + answerColumn.innerHTML = ""; + } + } + } catch (error) { + console.error("エラーが発生しました!" + error); + } + } + + document.addEventListener("DOMContentLoaded", websocket, false); +} + +init() diff --git "a/system/websocket_test/em-ws-web\050intro\051/template/client/client_websocket.js" "b/system/websocket_test/em-ws-web\050intro\051/template/client/client_websocket.js" new file mode 100644 index 0000000..07dc7f1 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/template/client/client_websocket.js" @@ -0,0 +1,42 @@ +// Node.js file +function init() { + let socket; + + function websocket() { + port = 8293; + + try { + if (!socket || socket.readyState !== 1) { //!socketは最初の接続のときに真になる、socket.readyStateは接続後に真になる + + socket = new WebSocket(`ws://localhost:/${port}`); + socket.onopen = function (event) { + console.log("JS:接続されました!"); + }; + + socket.onmessage = function (event) { + try { //json判別 + } catch (error) { + console.log(event.data); + } + } + + socket.onclose = function (event) { + if (event.wasClean) { + console.log("JS:切断しました!") + } else { + console.error("JS:切断エラーが起きました!"); + } + } + + socket.onerror = function (error) { + console.error("JS:WebSocket Error" + error) + } + } + } catch (error) { + console.error("エラーが発生しました!" + error); + } + } + websocket() +} + +init() diff --git "a/system/websocket_test/em-ws-web\050intro\051/template/server/server_websocket.rb" "b/system/websocket_test/em-ws-web\050intro\051/template/server/server_websocket.rb" new file mode 100644 index 0000000..9d9ccdb --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/template/server/server_websocket.rb" @@ -0,0 +1,43 @@ +#!/usr/bin/env ruby + +require 'em-websocket' #websoketライブラリ +require 'pp' #人間が読みやすいように表示してくれる +require 'json' #json形式にしたり、直したりする + +PORT = 8293 #portを指定 + +puts "参加者が入ったら表示するよ" + +EM::WebSocket.start({ #EventMachienを使用してWebsocket server を起動 (簡単に言えば非同期処理できる) + :host => '0.0.0.0', #すべてのネットワーク・インターフェースを表す、別ホストからでもアクセスできる + :port => PORT +}) do |em_ws| + join_member[em_ws] = true + puts join_member.length + + em_ws.onopen do #onopen:クライエントが接続したときに呼び出されるイベント + em_ws.send "Ruby:接続されたよ!" #接続したクライエントにメッセージを送る + printf("Ruby:clientが接続されました\n") #あとで誰が接続されたかデータ来るところにするーー + end + + em_ws.onmessage do |msg| #onmassage:クライエントからメッセージを受信したときに呼び出されるイベント + # jsonデータかの判別 + begin # 例外が発生する可能性のあるコードブロックの開始、このブロックでエラーがあれがrescue節に移る + rescue => error # beginブロック内で例外が発生した場合に実行される、エラーはerrorという変数に格納 + puts error.message + puts msg + end + em_ws.send "Ruby:サーバにメッセージ届きました!" #メッセージが来たことをクライエントに知らせる + end + + em_ws.onclose do #クライエントが接続を閉じたときに呼び出されるイベント + puts "Ruby:clientが接続を閉じました" #あとで誰抜けたかデータ持ってくるーー + join_member.delete(em_ws) + puts join_member.length + end + + em_ws.onerror do |error| #エラーが発生したときに呼び出されるイベント + puts "Ruby:Error: #{error.message}" + end + +end diff --git "a/system/websocket_test/em-ws-web\050intro\051/test/array.rb" "b/system/websocket_test/em-ws-web\050intro\051/test/array.rb" new file mode 100755 index 0000000..bc40800 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/test/array.rb" @@ -0,0 +1,35 @@ +#!/usr/bin/env ruby + +#make for array +button_clicker = [] + +def hayaoshi(button_clicker, team, name) + flag = false + button_clicker.each do |key, value| + if key == team + flag = true + end + end + if flag == false + button_clicker.push([team, name]) + return printf("%s の %s さん!\n", team, name) + end +end + +str = hayaoshi(button_clicker, "team2", "tsubasa") +puts str +# hayaoshi(button_clicker, "team2", "tubasa") +# hayaoshi(button_clicker, "team1", "wow") + +# p button_clicker +# button_clicker.each do |key, value| +# printf("%s の %s さん!\n", key, value) +# end + + +# str = "team2 の tsubasa がボタンを押しました" +# str.match(/(team\d)\sの\s([0-9a-z]+)\s/) +# team = $1 +# name = $2 +# puts "team = #{team}, name = #{name}" + diff --git "a/system/websocket_test/em-ws-web\050intro\051/test/hash.rb" "b/system/websocket_test/em-ws-web\050intro\051/test/hash.rb" new file mode 100755 index 0000000..4fa0961 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/test/hash.rb" @@ -0,0 +1,156 @@ +#!/usr/bin/env ruby + +require 'pp' +require 'json' + +# ------------------------------------ +# pp Set.new +# pp Set.new([1,2]) + +# client = Hash.new #Hashの作成 +# pp client + +# i = 0 +# while (i < 10) +# client[i] = 'name' #nameのところにはhtmlで入力された名前を入れる +# i += 1 +# end + +# pp client +# print("hashの長さ(client)は", client.keys.length, "\n") #Hashの長さを調べる +# ------------------------------------ + +# ------------------------------------ +# hash = Hash.new +# clients = Hash.new + +# hash = { +# user1: { +# id: nil, +# team: 1 +# }, +# user2: { +# id: nil, +# team: 2 +# } +# } + +# testHash = { +# team1: { +# id1: { +# name: "name" +# }, +# id2: { +# name: "name" +# } +# }, +# team2: { +# id3: { +# name: "name" +# }, +# id4: { +# name: "name" +# }, +# id5: { +# name: "naem" +# } +# } +# } + +# puts testHash +# puts testHash.length +# puts testHash[:team1].length +# i = 1 +# puts testHash[:"team#{i}"].keys.length +# def sum(testHash) +# i = 0 +# sum_clients = 0 +# while i < testHash.length +# i += 1 +# sum_clients += testHash[:"team#{i}"].keys.length +# end +# return sum_clients +# end + +# puts sum(testHash) + +#全てのチームを虱潰しに探して、削除したいkeyを見つけたらそれをハッシュから削除するコード +# def delete_hash(testHash, delete_key) +# i = 0 +# j = 0 +# while i < testHash.length +# i += 1 +# while j < testHash[:"team#{i}"].keys.length +# if testHash[:"team#{i}"].keys[j] == delete_key +# testHash[:"team#{i}"].delete(testHash[:"team#{i}"].keys[j]) +# end +# j += 1 +# end +# j = 0 +# end +# return testHash +# end + +# def sum_clients(clients) +# i = 0 +# sum = 0 +# while i < clients.length +# i += 1 +# sum += clients[:"team#{i}"].keys.length +# end +# return sum +# end + +# puts sum_clients(testHash) +# puts delete_hash(testHash, :id3) + +# puts hash + +# hash[:user3] = {id: nil, team: 2} +# pp hash + +# # 絞り込んで出力 +# puts hash[:user2] +# puts hash[:user2][:team] + +# # jsonにする +# json_hash = hash.to_json +# puts json_hash + +# # 一番最初のuserの部分を変更する +# hash[:user4] = hash.delete(:user1) + +# # 違うhashに追加する +# puts hash +# clients = clients.merge(hash) +# puts clients + +# puts clients.keys.length +# ------------------------------------ + +hayaoshi_hash = {} + +# hash の追加 + +p hayaoshi_hash + +def push(hayaoshi_hash, push_data) + flag = false + hayaoshi_hash.each do |key, value| + if push_data.keys[0] == key + flag = true + end + end + puts flag + if flag == false + hayaoshi_hash[push_data.keys[0]] = push_data.values[0] + end + return hayaoshi_hash +end + +push(hayaoshi_hash, {"team2": "tututu"}) +p hayaoshi_hash +push(hayaoshi_hash, {"team1": "bababa"}) +p hayaoshi_hash +push(hayaoshi_hash, {"team2": "fasfafa"}) +p hayaoshi_hash \ No newline at end of file diff --git "a/system/websocket_test/em-ws-web\050intro\051/test/operate_str.rb" "b/system/websocket_test/em-ws-web\050intro\051/test/operate_str.rb" new file mode 100755 index 0000000..84d3965 --- /dev/null +++ "b/system/websocket_test/em-ws-web\050intro\051/test/operate_str.rb" @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby + +str = "#"0.0.0.0", :port=>8293}, @debug=false, @secure=false, @secure_proxy=false, @tls_options={}, @close_timeout=nil, @outbound_limit=0, @handler=nil>" +match = str.match(/0x[0-9a-f]+/) +puts match[0] \ No newline at end of file diff --git a/system/websocket_test/node_modules/.bin/node-gyp-build b/system/websocket_test/node_modules/.bin/node-gyp-build deleted file mode 120000 index 671c6eb..0000000 --- a/system/websocket_test/node_modules/.bin/node-gyp-build +++ /dev/null @@ -1 +0,0 @@ -../node-gyp-build/bin.js \ No newline at end of file diff --git a/system/websocket_test/node_modules/.bin/node-gyp-build-optional b/system/websocket_test/node_modules/.bin/node-gyp-build-optional deleted file mode 120000 index 46d347e..0000000 --- a/system/websocket_test/node_modules/.bin/node-gyp-build-optional +++ /dev/null @@ -1 +0,0 @@ -../node-gyp-build/optional.js \ No newline at end of file diff --git a/system/websocket_test/node_modules/.bin/node-gyp-build-test b/system/websocket_test/node_modules/.bin/node-gyp-build-test deleted file mode 120000 index d11de1b..0000000 --- a/system/websocket_test/node_modules/.bin/node-gyp-build-test +++ /dev/null @@ -1 +0,0 @@ -../node-gyp-build/build-test.js \ No newline at end of file diff --git a/system/websocket_test/node_modules/.package-lock.json b/system/websocket_test/node_modules/.package-lock.json deleted file mode 100644 index 3401f1a..0000000 --- a/system/websocket_test/node_modules/.package-lock.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "name": "websocket_test", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "node_modules/bufferutil": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", - "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", - "hasInstallScript": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, - "node_modules/d": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", - "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", - "dependencies": { - "es5-ext": "^0.10.64", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/es5-ext": { - "version": "0.10.64", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", - "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", - "hasInstallScript": true, - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "esniff": "^2.0.1", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/es6-symbol": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", - "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", - "dependencies": { - "d": "^1.0.2", - "ext": "^1.7.0" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/esniff": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", - "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.62", - "event-emitter": "^0.3.5", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "dependencies": { - "type": "^2.7.2" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - }, - "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" - }, - "node_modules/node-gyp-build": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", - "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", - "hasInstallScript": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, - "node_modules/websocket": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", - "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", - "dependencies": { - "bufferutil": "^4.0.1", - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "typedarray-to-buffer": "^3.1.5", - "utf-8-validate": "^5.0.2", - "yaeti": "^0.0.6" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", - "engines": { - "node": ">=0.10.32" - } - } - } -} diff --git a/system/websocket_test/node_modules/bufferutil/LICENSE b/system/websocket_test/node_modules/bufferutil/LICENSE deleted file mode 100644 index 1da5b96..0000000 --- a/system/websocket_test/node_modules/bufferutil/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2011 Einar Otto Stangvik -Copyright (c) 2013 Arnout Kazemier and contributors -Copyright (c) 2016 Luigi Pinca and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/system/websocket_test/node_modules/bufferutil/README.md b/system/websocket_test/node_modules/bufferutil/README.md deleted file mode 100644 index 6dc056e..0000000 --- a/system/websocket_test/node_modules/bufferutil/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# bufferutil - -[![Version npm](https://img.shields.io/npm/v/bufferutil.svg?logo=npm)](https://www.npmjs.com/package/bufferutil) -[![Linux/macOS/Windows Build](https://img.shields.io/github/actions/workflow/status/websockets/bufferutil/ci.yml?branch=master&label=build&logo=github)](https://github.com/websockets/bufferutil/actions?query=workflow%3ACI+branch%3Amaster) - -`bufferutil` is what makes `ws` fast. It provides some utilities to efficiently -perform some operations such as masking and unmasking the data payload of -WebSocket frames. - -## Installation - -``` -npm install bufferutil --save-optional -``` - -The `--save-optional` flag tells npm to save the package in your package.json -under the -[`optionalDependencies`](https://docs.npmjs.com/files/package.json#optionaldependencies) -key. - -## API - -The module exports two functions. - -### `bufferUtil.mask(source, mask, output, offset, length)` - -Masks a buffer using the given masking-key as specified by the WebSocket -protocol. - -#### Arguments - -- `source` - The buffer to mask. -- `mask` - A buffer representing the masking-key. -- `output` - The buffer where to store the result. -- `offset` - The offset at which to start writing. -- `length` - The number of bytes to mask. - -#### Example - -```js -'use strict'; - -const bufferUtil = require('bufferutil'); -const crypto = require('crypto'); - -const source = crypto.randomBytes(10); -const mask = crypto.randomBytes(4); - -bufferUtil.mask(source, mask, source, 0, source.length); -``` - -### `bufferUtil.unmask(buffer, mask)` - -Unmasks a buffer using the given masking-key as specified by the WebSocket -protocol. - -#### Arguments - -- `buffer` - The buffer to unmask. -- `mask` - A buffer representing the masking-key. - -#### Example - -```js -'use strict'; - -const bufferUtil = require('bufferutil'); -const crypto = require('crypto'); - -const buffer = crypto.randomBytes(10); -const mask = crypto.randomBytes(4); - -bufferUtil.unmask(buffer, mask); -``` - -## License - -[MIT](LICENSE) diff --git a/system/websocket_test/node_modules/bufferutil/binding.gyp b/system/websocket_test/node_modules/bufferutil/binding.gyp deleted file mode 100644 index 168b58a..0000000 --- a/system/websocket_test/node_modules/bufferutil/binding.gyp +++ /dev/null @@ -1,29 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'bufferutil', - 'sources': ['src/bufferutil.c'], - 'cflags': ['-std=c99'], - 'conditions': [ - ["OS=='mac'", { - 'variables': { - 'clang_version': - '&1 | perl -ne \'print $1 if /clang version ([0-9]+(\.[0-9]+){2,})/\')' - }, - 'xcode_settings': { - 'MACOSX_DEPLOYMENT_TARGET': '10.7' - }, - 'conditions': [ - # Use Perl v-strings to compare versions. - ['clang_version and { - for (var i = 0; i < length; i++) { - output[offset + i] = source[i] ^ mask[i & 3]; - } -}; - -/** - * Unmasks a buffer using the given mask. - * - * @param {Buffer} buffer The buffer to unmask - * @param {Buffer} mask The mask to use - * @public - */ -const unmask = (buffer, mask) => { - // Required until https://github.com/nodejs/node/issues/9006 is resolved. - const length = buffer.length; - for (var i = 0; i < length; i++) { - buffer[i] ^= mask[i & 3]; - } -}; - -module.exports = { mask, unmask }; diff --git a/system/websocket_test/node_modules/bufferutil/index.js b/system/websocket_test/node_modules/bufferutil/index.js deleted file mode 100644 index 8c30561..0000000 --- a/system/websocket_test/node_modules/bufferutil/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -try { - module.exports = require('node-gyp-build')(__dirname); -} catch (e) { - module.exports = require('./fallback'); -} diff --git a/system/websocket_test/node_modules/bufferutil/package.json b/system/websocket_test/node_modules/bufferutil/package.json deleted file mode 100644 index 8518951..0000000 --- a/system/websocket_test/node_modules/bufferutil/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "bufferutil", - "version": "4.0.8", - "description": "WebSocket buffer utils", - "main": "index.js", - "engines": { - "node": ">=6.14.2" - }, - "scripts": { - "install": "node-gyp-build", - "prebuild": "prebuildify --napi --strip --target=14.0.0", - "prebuild-darwin-x64+arm64": "prebuildify --arch x64+arm64 --napi --strip --target=14.0.0", - "test": "mocha" - }, - "repository": { - "type": "git", - "url": "https://github.com/websockets/bufferutil" - }, - "keywords": [ - "bufferutil" - ], - "author": "Einar Otto Stangvik (http://2x.io)", - "license": "MIT", - "bugs": { - "url": "https://github.com/websockets/bufferutil/issues" - }, - "homepage": "https://github.com/websockets/bufferutil", - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "devDependencies": { - "mocha": "^10.0.0", - "node-gyp": "^9.1.0", - "prebuildify": "^5.0.0" - } -} diff --git a/system/websocket_test/node_modules/bufferutil/prebuilds/darwin-x64+arm64/node.napi.node b/system/websocket_test/node_modules/bufferutil/prebuilds/darwin-x64+arm64/node.napi.node deleted file mode 100644 index 0840a8b..0000000 --- a/system/websocket_test/node_modules/bufferutil/prebuilds/darwin-x64+arm64/node.napi.node +++ /dev/null Binary files differ diff --git a/system/websocket_test/node_modules/bufferutil/prebuilds/linux-x64/node.napi.node b/system/websocket_test/node_modules/bufferutil/prebuilds/linux-x64/node.napi.node deleted file mode 100644 index b30f827..0000000 --- a/system/websocket_test/node_modules/bufferutil/prebuilds/linux-x64/node.napi.node +++ /dev/null Binary files differ diff --git a/system/websocket_test/node_modules/bufferutil/prebuilds/win32-ia32/node.napi.node b/system/websocket_test/node_modules/bufferutil/prebuilds/win32-ia32/node.napi.node deleted file mode 100644 index 0af1011..0000000 --- a/system/websocket_test/node_modules/bufferutil/prebuilds/win32-ia32/node.napi.node +++ /dev/null Binary files differ diff --git a/system/websocket_test/node_modules/bufferutil/prebuilds/win32-x64/node.napi.node b/system/websocket_test/node_modules/bufferutil/prebuilds/win32-x64/node.napi.node deleted file mode 100644 index f4ba07f..0000000 --- a/system/websocket_test/node_modules/bufferutil/prebuilds/win32-x64/node.napi.node +++ /dev/null Binary files differ diff --git a/system/websocket_test/node_modules/bufferutil/src/bufferutil.c b/system/websocket_test/node_modules/bufferutil/src/bufferutil.c deleted file mode 100644 index b89f8dd..0000000 --- a/system/websocket_test/node_modules/bufferutil/src/bufferutil.c +++ /dev/null @@ -1,171 +0,0 @@ -#define NAPI_VERSION 1 -#include -#include - -napi_value Mask(napi_env env, napi_callback_info info) { - napi_status status; - size_t argc = 5; - napi_value argv[5]; - - status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); - assert(status == napi_ok); - - uint8_t *source; - uint8_t *mask; - uint8_t *destination; - uint32_t offset; - uint32_t length; - - status = napi_get_buffer_info(env, argv[0], (void **)&source, NULL); - assert(status == napi_ok); - - status = napi_get_buffer_info(env, argv[1], (void **)&mask, NULL); - assert(status == napi_ok); - - status = napi_get_buffer_info(env, argv[2], (void **)&destination, NULL); - assert(status == napi_ok); - - status = napi_get_value_uint32(env, argv[3], &offset); - assert(status == napi_ok); - - status = napi_get_value_uint32(env, argv[4], &length); - assert(status == napi_ok); - - destination += offset; - uint32_t index = 0; - - // - // Alignment preamble. - // - while (index < length && ((size_t)source % 8)) { - *destination++ = *source++ ^ mask[index % 4]; - index++; - } - - length -= index; - if (!length) - return NULL; - - // - // Realign mask and convert to 64 bit. - // - uint8_t maskAlignedArray[8]; - - for (uint8_t i = 0; i < 8; i++, index++) { - maskAlignedArray[i] = mask[index % 4]; - } - - // - // Apply 64 bit mask in 8 byte chunks. - // - uint32_t loop = length / 8; - uint64_t *pMask8 = (uint64_t *)maskAlignedArray; - - while (loop--) { - uint64_t *pFrom8 = (uint64_t *)source; - uint64_t *pTo8 = (uint64_t *)destination; - *pTo8 = *pFrom8 ^ *pMask8; - source += 8; - destination += 8; - } - - // - // Apply mask to remaining data. - // - uint8_t *pmaskAlignedArray = maskAlignedArray; - - length %= 8; - while (length--) { - *destination++ = *source++ ^ *pmaskAlignedArray++; - } - - return NULL; -} - -napi_value Unmask(napi_env env, napi_callback_info info) { - napi_status status; - size_t argc = 2; - napi_value argv[2]; - - status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); - assert(status == napi_ok); - - uint8_t *source; - size_t length; - uint8_t *mask; - - status = napi_get_buffer_info(env, argv[0], (void **)&source, &length); - assert(status == napi_ok); - - status = napi_get_buffer_info(env, argv[1], (void **)&mask, NULL); - assert(status == napi_ok); - - uint32_t index = 0; - - // - // Alignment preamble. - // - while (index < length && ((size_t)source % 8)) { - *source++ ^= mask[index % 4]; - index++; - } - - length -= index; - if (!length) - return NULL; - - // - // Realign mask and convert to 64 bit. - // - uint8_t maskAlignedArray[8]; - - for (uint8_t i = 0; i < 8; i++, index++) { - maskAlignedArray[i] = mask[index % 4]; - } - - // - // Apply 64 bit mask in 8 byte chunks. - // - uint32_t loop = length / 8; - uint64_t *pMask8 = (uint64_t *)maskAlignedArray; - - while (loop--) { - uint64_t *pSource8 = (uint64_t *)source; - *pSource8 ^= *pMask8; - source += 8; - } - - // - // Apply mask to remaining data. - // - uint8_t *pmaskAlignedArray = maskAlignedArray; - - length %= 8; - while (length--) { - *source++ ^= *pmaskAlignedArray++; - } - - return NULL; -} - -napi_value Init(napi_env env, napi_value exports) { - napi_status status; - napi_value mask; - napi_value unmask; - - status = napi_create_function(env, NULL, 0, Mask, NULL, &mask); - assert(status == napi_ok); - - status = napi_create_function(env, NULL, 0, Unmask, NULL, &unmask); - assert(status == napi_ok); - - status = napi_set_named_property(env, exports, "mask", mask); - assert(status == napi_ok); - - status = napi_set_named_property(env, exports, "unmask", unmask); - assert(status == napi_ok); - - return exports; -} - -NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/system/websocket_test/node_modules/d/CHANGELOG.md b/system/websocket_test/node_modules/d/CHANGELOG.md deleted file mode 100644 index 52e8617..0000000 --- a/system/websocket_test/node_modules/d/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [1.0.2](https://github.com/medikoo/d/compare/v1.0.1...v1.0.2) (2024-03-01) - -### Maintenance Improvements - -- Upgrade `type` to v2 ([43b0eb8](https://github.com/medikoo/d/commit/43b0eb845d9efad3450e0e641ea1a827a5ba1966)) - -### [1.0.1](https://github.com/medikoo/d/compare/v0.1.1...v1.0.1) (2019-06-14) - -## Changelog for previous versions - -See `CHANGES` file diff --git a/system/websocket_test/node_modules/d/CHANGES b/system/websocket_test/node_modules/d/CHANGES deleted file mode 100644 index 73234d5..0000000 --- a/system/websocket_test/node_modules/d/CHANGES +++ /dev/null @@ -1,17 +0,0 @@ -For recent changelog see CHANGELOG.md - ------ - -v1.0.0 -- 2015.12.04 -- autoBind changes: - - replace `bindTo` argument with options and `resolveContext` option - - Add support `overwriteDefinition` -- Introduce IE11 bug workaround in `lazy` handler - -v0.1.1 -- 2014.04.24 -- Add `autoBind` and `lazy` utilities -- Allow to pass other options to be merged onto created descriptor. - Useful when used with other custom utilties - -v0.1.0 -- 2013.06.20 -Initial (derived from es5-ext project) diff --git a/system/websocket_test/node_modules/d/LICENSE b/system/websocket_test/node_modules/d/LICENSE deleted file mode 100644 index 38d8a75..0000000 --- a/system/websocket_test/node_modules/d/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2013-2024, Mariusz Nowak, @medikoo, medikoo.com - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/system/websocket_test/node_modules/d/README.md b/system/websocket_test/node_modules/d/README.md deleted file mode 100644 index c28508f..0000000 --- a/system/websocket_test/node_modules/d/README.md +++ /dev/null @@ -1,129 +0,0 @@ -[![Build status][build-image]][build-url] -[![Tests coverage][cov-image]][cov-url] -[![npm version][npm-image]][npm-url] - -# d - -## Property descriptor factory - -_Originally derived from [d](https://github.com/medikoo/d) package._ - -Defining properties with descriptors is very verbose: - -```javascript -var Account = function () {}; -Object.defineProperties(Account.prototype, { - deposit: { - value: function () { /* ... */ }, - configurable: true, - enumerable: false, - writable: true - }, - withdraw: { - value: function () { /* ... */ }, - configurable: true, - enumerable: false, - writable: true - }, - balance: { get: function () { /* ... */ }, configurable: true, enumerable: false } -}); -``` - -D cuts that to: - -```javascript -var d = require("d"); - -var Account = function () {}; -Object.defineProperties(Account.prototype, { - deposit: d(function () { /* ... */ }), - withdraw: d(function () { /* ... */ }), - balance: d.gs(function () { /* ... */ }) -}); -``` - -By default, created descriptor follow characteristics of native ES5 properties, and defines values as: - -```javascript -{ configurable: true, enumerable: false, writable: true } -``` - -You can overwrite it by preceding _value_ argument with instruction: - -```javascript -d("c", value); // { configurable: true, enumerable: false, writable: false } -d("ce", value); // { configurable: true, enumerable: true, writable: false } -d("e", value); // { configurable: false, enumerable: true, writable: false } - -// Same way for get/set: -d.gs("e", value); // { configurable: false, enumerable: true } -``` - -### Installation - - $ npm install d - -To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) - -### Other utilities - -#### autoBind(obj, props) _(d/auto-bind)_ - -Define methods which will be automatically bound to its instances - -```javascript -var d = require('d'); -var autoBind = require('d/auto-bind'); - -var Foo = function () { this._count = 0; }; -Object.defineProperties(Foo.prototype, autoBind({ - increment: d(function () { ++this._count; }); -})); - -var foo = new Foo(); - -// Increment foo counter on each domEl click -domEl.addEventListener('click', foo.increment, false); -``` - -#### lazy(obj, props) _(d/lazy)_ - -Define lazy properties, which will be resolved on first access - -```javascript -var d = require("d"); -var lazy = require("d/lazy"); - -var Foo = function () {}; -Object.defineProperties(Foo.prototype, lazy({ items: d(function () { return []; }) })); - -var foo = new Foo(); -foo.items.push(1, 2); // foo.items array created and defined directly on foo -``` - -## Tests - - $ npm test - -## Security contact information - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - ---- - -
- - Get professional support for d with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- -[build-image]: https://github.com/medikoo/d/workflows/Integrate/badge.svg -[build-url]: https://github.com/medikoo/d/actions?query=workflow%3AIntegrate -[cov-image]: https://img.shields.io/codecov/c/github/medikoo/d.svg -[cov-url]: https://codecov.io/gh/medikoo/d -[npm-image]: https://img.shields.io/npm/v/d.svg -[npm-url]: https://www.npmjs.com/package/d diff --git a/system/websocket_test/node_modules/d/auto-bind.js b/system/websocket_test/node_modules/d/auto-bind.js deleted file mode 100644 index a0037fa..0000000 --- a/system/websocket_test/node_modules/d/auto-bind.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -var isValue = require("type/value/is") - , ensureValue = require("type/value/ensure") - , ensurePlainFunction = require("type/plain-function/ensure") - , copy = require("es5-ext/object/copy") - , normalizeOptions = require("es5-ext/object/normalize-options") - , map = require("es5-ext/object/map"); - -var bind = Function.prototype.bind - , defineProperty = Object.defineProperty - , hasOwnProperty = Object.prototype.hasOwnProperty - , define; - -define = function (name, desc, options) { - var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs; - dgs = copy(desc); - delete dgs.writable; - delete dgs.value; - dgs.get = function () { - if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value; - desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this); - defineProperty(this, name, desc); - return this[name]; - }; - return dgs; -}; - -module.exports = function (props/*, options*/) { - var options = normalizeOptions(arguments[1]); - if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext); - return map(props, function (desc, name) { return define(name, desc, options); }); -}; diff --git a/system/websocket_test/node_modules/d/index.js b/system/websocket_test/node_modules/d/index.js deleted file mode 100644 index b05448b..0000000 --- a/system/websocket_test/node_modules/d/index.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; - -var isValue = require("type/value/is") - , isPlainFunction = require("type/plain-function/is") - , assign = require("es5-ext/object/assign") - , normalizeOpts = require("es5-ext/object/normalize-options") - , contains = require("es5-ext/string/#/contains"); - -var d = (module.exports = function (dscr, value/*, options*/) { - var c, e, w, options, desc; - if (arguments.length < 2 || typeof dscr !== "string") { - options = value; - value = dscr; - dscr = null; - } else { - options = arguments[2]; - } - if (isValue(dscr)) { - c = contains.call(dscr, "c"); - e = contains.call(dscr, "e"); - w = contains.call(dscr, "w"); - } else { - c = w = true; - e = false; - } - - desc = { value: value, configurable: c, enumerable: e, writable: w }; - return !options ? desc : assign(normalizeOpts(options), desc); -}); - -d.gs = function (dscr, get, set/*, options*/) { - var c, e, options, desc; - if (typeof dscr !== "string") { - options = set; - set = get; - get = dscr; - dscr = null; - } else { - options = arguments[3]; - } - if (!isValue(get)) { - get = undefined; - } else if (!isPlainFunction(get)) { - options = get; - get = set = undefined; - } else if (!isValue(set)) { - set = undefined; - } else if (!isPlainFunction(set)) { - options = set; - set = undefined; - } - if (isValue(dscr)) { - c = contains.call(dscr, "c"); - e = contains.call(dscr, "e"); - } else { - c = true; - e = false; - } - - desc = { get: get, set: set, configurable: c, enumerable: e }; - return !options ? desc : assign(normalizeOpts(options), desc); -}; diff --git a/system/websocket_test/node_modules/d/lazy.js b/system/websocket_test/node_modules/d/lazy.js deleted file mode 100644 index bae0d6a..0000000 --- a/system/websocket_test/node_modules/d/lazy.js +++ /dev/null @@ -1,115 +0,0 @@ -"use strict"; - -var isPlainFunction = require("type/plain-function/is") - , ensureValue = require("type/value/ensure") - , isValue = require("type/value/is") - , map = require("es5-ext/object/map") - , contains = require("es5-ext/string/#/contains"); - -var call = Function.prototype.call - , defineProperty = Object.defineProperty - , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor - , getPrototypeOf = Object.getPrototypeOf - , hasOwnProperty = Object.prototype.hasOwnProperty - , cacheDesc = { configurable: false, enumerable: false, writable: false, value: null } - , define; - -define = function (name, options) { - var value, dgs, cacheName, desc, writable = false, resolvable, flat; - options = Object(ensureValue(options)); - cacheName = options.cacheName; - flat = options.flat; - if (!isValue(cacheName)) cacheName = name; - delete options.cacheName; - value = options.value; - resolvable = isPlainFunction(value); - delete options.value; - dgs = { configurable: Boolean(options.configurable), enumerable: Boolean(options.enumerable) }; - if (name !== cacheName) { - dgs.get = function () { - if (hasOwnProperty.call(this, cacheName)) return this[cacheName]; - cacheDesc.value = resolvable ? call.call(value, this, options) : value; - cacheDesc.writable = writable; - defineProperty(this, cacheName, cacheDesc); - cacheDesc.value = null; - if (desc) defineProperty(this, name, desc); - return this[cacheName]; - }; - } else if (!flat) { - dgs.get = function self() { - var ownDesc; - if (hasOwnProperty.call(this, name)) { - ownDesc = getOwnPropertyDescriptor(this, name); - // It happens in Safari, that getter is still called after property - // was defined with a value, following workarounds that - // While in IE11 it may happen that here ownDesc is undefined (go figure) - if (ownDesc) { - if (ownDesc.hasOwnProperty("value")) return ownDesc.value; - if (typeof ownDesc.get === "function" && ownDesc.get !== self) { - return ownDesc.get.call(this); - } - return value; - } - } - desc.value = resolvable ? call.call(value, this, options) : value; - defineProperty(this, name, desc); - desc.value = null; - return this[name]; - }; - } else { - dgs.get = function self() { - var base = this, ownDesc; - if (hasOwnProperty.call(this, name)) { - // It happens in Safari, that getter is still called after property - // was defined with a value, following workarounds that - ownDesc = getOwnPropertyDescriptor(this, name); - if (ownDesc.hasOwnProperty("value")) return ownDesc.value; - if (typeof ownDesc.get === "function" && ownDesc.get !== self) { - return ownDesc.get.call(this); - } - } - while (!hasOwnProperty.call(base, name)) base = getPrototypeOf(base); - desc.value = resolvable ? call.call(value, base, options) : value; - defineProperty(base, name, desc); - desc.value = null; - return base[name]; - }; - } - dgs.set = function (value) { - if (hasOwnProperty.call(this, name)) { - throw new TypeError("Cannot assign to lazy defined '" + name + "' property of " + this); - } - dgs.get.call(this); - this[cacheName] = value; - }; - if (options.desc) { - desc = { - configurable: contains.call(options.desc, "c"), - enumerable: contains.call(options.desc, "e") - }; - if (cacheName === name) { - desc.writable = contains.call(options.desc, "w"); - desc.value = null; - } else { - writable = contains.call(options.desc, "w"); - desc.get = dgs.get; - desc.set = dgs.set; - } - delete options.desc; - } else if (cacheName === name) { - desc = { - configurable: Boolean(options.configurable), - enumerable: Boolean(options.enumerable), - writable: Boolean(options.writable), - value: null - }; - } - delete options.configurable; - delete options.enumerable; - delete options.writable; - return dgs; -}; - -module.exports = function (props) { - return map(props, function (desc, name) { return define(name, desc); }); -}; diff --git a/system/websocket_test/node_modules/d/package.json b/system/websocket_test/node_modules/d/package.json deleted file mode 100644 index 154de02..0000000 --- a/system/websocket_test/node_modules/d/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "d", - "version": "1.0.2", - "description": "Property descriptor factory", - "author": "Mariusz Nowak (http://www.medikoo.com/)", - "keywords": [ - "descriptor", - "es", - "ecmascript", - "ecma", - "property", - "descriptors", - "meta", - "properties" - ], - "repository": "medikoo/d", - "dependencies": { - "es5-ext": "^0.10.64", - "type": "^2.7.2" - }, - "devDependencies": { - "eslint": "^8.57.0", - "eslint-config-medikoo": "^4.2.0", - "git-list-updated": "^1.2.1", - "github-release-from-cc-changelog": "^2.3.0", - "husky": "^4.3.8", - "lint-staged": "~13.2.3", - "nyc": "^15.1.0", - "prettier-elastic": "^2.8.8", - "tad": "^3.1.1" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.js": [ - "eslint" - ], - "*.{css,html,js,json,md,yaml,yml}": [ - "prettier -c" - ] - }, - "eslintConfig": { - "extends": "medikoo/es5", - "root": true - }, - "prettier": { - "printWidth": 100, - "tabWidth": 4, - "overrides": [ - { - "files": [ - "*.md", - "*.yml" - ], - "options": { - "tabWidth": 2 - } - } - ] - }, - "nyc": { - "all": true, - "exclude": [ - ".github", - "coverage/**", - "test/**", - "*.config.js" - ], - "reporter": [ - "lcov", - "html", - "text-summary" - ] - }, - "scripts": { - "coverage": "nyc npm test", - "lint": "eslint --ignore-path=.gitignore .", - "lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'", - "prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettier-check:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", - "prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettify:updated": "pipe-git-updated ---base=main -ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write", - "test": "tad" - }, - "license": "ISC", - "engines": { - "node": ">=0.12" - } -} diff --git a/system/websocket_test/node_modules/debug/.coveralls.yml b/system/websocket_test/node_modules/debug/.coveralls.yml deleted file mode 100644 index 20a7068..0000000 --- a/system/websocket_test/node_modules/debug/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/system/websocket_test/node_modules/debug/.eslintrc b/system/websocket_test/node_modules/debug/.eslintrc deleted file mode 100644 index 8a37ae2..0000000 --- a/system/websocket_test/node_modules/debug/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "env": { - "browser": true, - "node": true - }, - "rules": { - "no-console": 0, - "no-empty": [1, { "allowEmptyCatch": true }] - }, - "extends": "eslint:recommended" -} diff --git a/system/websocket_test/node_modules/debug/.npmignore b/system/websocket_test/node_modules/debug/.npmignore deleted file mode 100644 index 5f60eec..0000000 --- a/system/websocket_test/node_modules/debug/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -support -test -examples -example -*.sock -dist -yarn.lock -coverage -bower.json diff --git a/system/websocket_test/node_modules/debug/.travis.yml b/system/websocket_test/node_modules/debug/.travis.yml deleted file mode 100644 index 6c6090c..0000000 --- a/system/websocket_test/node_modules/debug/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ - -language: node_js -node_js: - - "6" - - "5" - - "4" - -install: - - make node_modules - -script: - - make lint - - make test - - make coveralls diff --git a/system/websocket_test/node_modules/debug/CHANGELOG.md b/system/websocket_test/node_modules/debug/CHANGELOG.md deleted file mode 100644 index eadaa18..0000000 --- a/system/websocket_test/node_modules/debug/CHANGELOG.md +++ /dev/null @@ -1,362 +0,0 @@ - -2.6.9 / 2017-09-22 -================== - - * remove ReDoS regexp in %o formatter (#504) - -2.6.8 / 2017-05-18 -================== - - * Fix: Check for undefined on browser globals (#462, @marbemac) - -2.6.7 / 2017-05-16 -================== - - * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) - * Fix: Inline extend function in node implementation (#452, @dougwilson) - * Docs: Fix typo (#455, @msasad) - -2.6.5 / 2017-04-27 -================== - - * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) - * Misc: clean up browser reference checks (#447, @thebigredgeek) - * Misc: add npm-debug.log to .gitignore (@thebigredgeek) - - -2.6.4 / 2017-04-20 -================== - - * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) - * Chore: ignore bower.json in npm installations. (#437, @joaovieira) - * Misc: update "ms" to v0.7.3 (@tootallnate) - -2.6.3 / 2017-03-13 -================== - - * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) - * Docs: Changelog fix (@thebigredgeek) - -2.6.2 / 2017-03-10 -================== - - * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) - * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) - * Docs: Add Slackin invite badge (@tootallnate) - -2.6.1 / 2017-02-10 -================== - - * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error - * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) - * Fix: IE8 "Expected identifier" error (#414, @vgoma) - * Fix: Namespaces would not disable once enabled (#409, @musikov) - -2.6.0 / 2016-12-28 -================== - - * Fix: added better null pointer checks for browser useColors (@thebigredgeek) - * Improvement: removed explicit `window.debug` export (#404, @tootallnate) - * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) - -2.5.2 / 2016-12-25 -================== - - * Fix: reference error on window within webworkers (#393, @KlausTrainer) - * Docs: fixed README typo (#391, @lurch) - * Docs: added notice about v3 api discussion (@thebigredgeek) - -2.5.1 / 2016-12-20 -================== - - * Fix: babel-core compatibility - -2.5.0 / 2016-12-20 -================== - - * Fix: wrong reference in bower file (@thebigredgeek) - * Fix: webworker compatibility (@thebigredgeek) - * Fix: output formatting issue (#388, @kribblo) - * Fix: babel-loader compatibility (#383, @escwald) - * Misc: removed built asset from repo and publications (@thebigredgeek) - * Misc: moved source files to /src (#378, @yamikuronue) - * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) - * Test: coveralls integration (#378, @yamikuronue) - * Docs: simplified language in the opening paragraph (#373, @yamikuronue) - -2.4.5 / 2016-12-17 -================== - - * Fix: `navigator` undefined in Rhino (#376, @jochenberger) - * Fix: custom log function (#379, @hsiliev) - * Improvement: bit of cleanup + linting fixes (@thebigredgeek) - * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) - * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) - -2.4.4 / 2016-12-14 -================== - - * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) - -2.4.3 / 2016-12-14 -================== - - * Fix: navigation.userAgent error for react native (#364, @escwald) - -2.4.2 / 2016-12-14 -================== - - * Fix: browser colors (#367, @tootallnate) - * Misc: travis ci integration (@thebigredgeek) - * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) - -2.4.1 / 2016-12-13 -================== - - * Fix: typo that broke the package (#356) - -2.4.0 / 2016-12-13 -================== - - * Fix: bower.json references unbuilt src entry point (#342, @justmatt) - * Fix: revert "handle regex special characters" (@tootallnate) - * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) - * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) - * Improvement: allow colors in workers (#335, @botverse) - * Improvement: use same color for same namespace. (#338, @lchenay) - -2.3.3 / 2016-11-09 -================== - - * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) - * Fix: Returning `localStorage` saved values (#331, Levi Thomason) - * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) - -2.3.2 / 2016-11-09 -================== - - * Fix: be super-safe in index.js as well (@TooTallNate) - * Fix: should check whether process exists (Tom Newby) - -2.3.1 / 2016-11-09 -================== - - * Fix: Added electron compatibility (#324, @paulcbetts) - * Improvement: Added performance optimizations (@tootallnate) - * Readme: Corrected PowerShell environment variable example (#252, @gimre) - * Misc: Removed yarn lock file from source control (#321, @fengmk2) - -2.3.0 / 2016-11-07 -================== - - * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) - * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) - * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) - * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) - * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) - * Package: Update "ms" to 0.7.2 (#315, @DevSide) - * Package: removed superfluous version property from bower.json (#207 @kkirsche) - * Readme: fix USE_COLORS to DEBUG_COLORS - * Readme: Doc fixes for format string sugar (#269, @mlucool) - * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) - * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) - * Readme: better docs for browser support (#224, @matthewmueller) - * Tooling: Added yarn integration for development (#317, @thebigredgeek) - * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) - * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) - * Misc: Updated contributors (@thebigredgeek) - -2.2.0 / 2015-05-09 -================== - - * package: update "ms" to v0.7.1 (#202, @dougwilson) - * README: add logging to file example (#193, @DanielOchoa) - * README: fixed a typo (#191, @amir-s) - * browser: expose `storage` (#190, @stephenmathieson) - * Makefile: add a `distclean` target (#189, @stephenmathieson) - -2.1.3 / 2015-03-13 -================== - - * Updated stdout/stderr example (#186) - * Updated example/stdout.js to match debug current behaviour - * Renamed example/stderr.js to stdout.js - * Update Readme.md (#184) - * replace high intensity foreground color for bold (#182, #183) - -2.1.2 / 2015-03-01 -================== - - * dist: recompile - * update "ms" to v0.7.0 - * package: update "browserify" to v9.0.3 - * component: fix "ms.js" repo location - * changed bower package name - * updated documentation about using debug in a browser - * fix: security error on safari (#167, #168, @yields) - -2.1.1 / 2014-12-29 -================== - - * browser: use `typeof` to check for `console` existence - * browser: check for `console.log` truthiness (fix IE 8/9) - * browser: add support for Chrome apps - * Readme: added Windows usage remarks - * Add `bower.json` to properly support bower install - -2.1.0 / 2014-10-15 -================== - - * node: implement `DEBUG_FD` env variable support - * package: update "browserify" to v6.1.0 - * package: add "license" field to package.json (#135, @panuhorsmalahti) - -2.0.0 / 2014-09-01 -================== - - * package: update "browserify" to v5.11.0 - * node: use stderr rather than stdout for logging (#29, @stephenmathieson) - -1.0.4 / 2014-07-15 -================== - - * dist: recompile - * example: remove `console.info()` log usage - * example: add "Content-Type" UTF-8 header to browser example - * browser: place %c marker after the space character - * browser: reset the "content" color via `color: inherit` - * browser: add colors support for Firefox >= v31 - * debug: prefer an instance `log()` function over the global one (#119) - * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) - -1.0.3 / 2014-07-09 -================== - - * Add support for multiple wildcards in namespaces (#122, @seegno) - * browser: fix lint - -1.0.2 / 2014-06-10 -================== - - * browser: update color palette (#113, @gscottolson) - * common: make console logging function configurable (#108, @timoxley) - * node: fix %o colors on old node <= 0.8.x - * Makefile: find node path using shell/which (#109, @timoxley) - -1.0.1 / 2014-06-06 -================== - - * browser: use `removeItem()` to clear localStorage - * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) - * package: add "contributors" section - * node: fix comment typo - * README: list authors - -1.0.0 / 2014-06-04 -================== - - * make ms diff be global, not be scope - * debug: ignore empty strings in enable() - * node: make DEBUG_COLORS able to disable coloring - * *: export the `colors` array - * npmignore: don't publish the `dist` dir - * Makefile: refactor to use browserify - * package: add "browserify" as a dev dependency - * Readme: add Web Inspector Colors section - * node: reset terminal color for the debug content - * node: map "%o" to `util.inspect()` - * browser: map "%j" to `JSON.stringify()` - * debug: add custom "formatters" - * debug: use "ms" module for humanizing the diff - * Readme: add "bash" syntax highlighting - * browser: add Firebug color support - * browser: add colors for WebKit browsers - * node: apply log to `console` - * rewrite: abstract common logic for Node & browsers - * add .jshintrc file - -0.8.1 / 2014-04-14 -================== - - * package: re-add the "component" section - -0.8.0 / 2014-03-30 -================== - - * add `enable()` method for nodejs. Closes #27 - * change from stderr to stdout - * remove unnecessary index.js file - -0.7.4 / 2013-11-13 -================== - - * remove "browserify" key from package.json (fixes something in browserify) - -0.7.3 / 2013-10-30 -================== - - * fix: catch localStorage security error when cookies are blocked (Chrome) - * add debug(err) support. Closes #46 - * add .browser prop to package.json. Closes #42 - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/system/websocket_test/node_modules/debug/LICENSE b/system/websocket_test/node_modules/debug/LICENSE deleted file mode 100644 index 658c933..0000000 --- a/system/websocket_test/node_modules/debug/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/system/websocket_test/node_modules/debug/Makefile b/system/websocket_test/node_modules/debug/Makefile deleted file mode 100644 index 584da8b..0000000 --- a/system/websocket_test/node_modules/debug/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 -THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) - -# BIN directory -BIN := $(THIS_DIR)/node_modules/.bin - -# Path -PATH := node_modules/.bin:$(PATH) -SHELL := /bin/bash - -# applications -NODE ?= $(shell which node) -YARN ?= $(shell which yarn) -PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) -BROWSERIFY ?= $(NODE) $(BIN)/browserify - -.FORCE: - -install: node_modules - -node_modules: package.json - @NODE_ENV= $(PKG) install - @touch node_modules - -lint: .FORCE - eslint browser.js debug.js index.js node.js - -test-node: .FORCE - istanbul cover node_modules/mocha/bin/_mocha -- test/**.js - -test-browser: .FORCE - mkdir -p dist - - @$(BROWSERIFY) \ - --standalone debug \ - . > dist/debug.js - - karma start --single-run - rimraf dist - -test: .FORCE - concurrently \ - "make test-node" \ - "make test-browser" - -coveralls: - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js - -.PHONY: all install clean distclean diff --git a/system/websocket_test/node_modules/debug/README.md b/system/websocket_test/node_modules/debug/README.md deleted file mode 100644 index f67be6b..0000000 --- a/system/websocket_test/node_modules/debug/README.md +++ /dev/null @@ -1,312 +0,0 @@ -# debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny node.js debugging utility modelled after node core's debugging technique. - -**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)** - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example _app.js_: - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example _worker.js_: - -```js -var debug = require('debug')('worker'); - -setInterval(function(){ - debug('doing some work'); -}, 1000); -``` - - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: - - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) - - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) - -#### Windows note - - On Windows the environment variable is set using the `set` command. - - ```cmd - set DEBUG=*,-not_this - ``` - - Note that PowerShell uses different syntax to set environment variables. - - ```cmd - $env:DEBUG = "*,-not_this" - ``` - -Then, run the program to be debugged as usual. - -## Millisecond diff - - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - - When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: - - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) - -## Conventions - - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". - -## Wildcards - - The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". - -## Environment Variables - - When running through Node.js, you can set a few environment variables that will - change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - - __Note:__ The environment variables beginning with `DEBUG_` end up being - converted into an Options object that gets used with `%o`/`%O` formatters. - See the Node.js documentation for - [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) - for the complete list. - -## Formatters - - - Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - -### Custom formatters - - You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - -## Browser support - You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), - or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), - if you don't want to build it yourself. - - Debug's enable state is currently persisted by `localStorage`. - Consider the situation shown below where you have `worker:a` and `worker:b`, - and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -#### Web Inspector Colors - - Colors are also enabled on "Web Inspectors" that understand the `%c` formatting - option. These are WebKit web inspectors, Firefox ([since version - 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) - and the Firebug plugin for Firefox (any version). - - Colored output looks something like: - - ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example _stdout.js_: - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/system/websocket_test/node_modules/debug/component.json b/system/websocket_test/node_modules/debug/component.json deleted file mode 100644 index 9de2641..0000000 --- a/system/websocket_test/node_modules/debug/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "debug", - "repo": "visionmedia/debug", - "description": "small debugging utility", - "version": "2.6.9", - "keywords": [ - "debug", - "log", - "debugger" - ], - "main": "src/browser.js", - "scripts": [ - "src/browser.js", - "src/debug.js" - ], - "dependencies": { - "rauchg/ms.js": "0.7.1" - } -} diff --git a/system/websocket_test/node_modules/debug/karma.conf.js b/system/websocket_test/node_modules/debug/karma.conf.js deleted file mode 100644 index 103a82d..0000000 --- a/system/websocket_test/node_modules/debug/karma.conf.js +++ /dev/null @@ -1,70 +0,0 @@ -// Karma configuration -// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) - -module.exports = function(config) { - config.set({ - - // base path that will be used to resolve all patterns (eg. files, exclude) - basePath: '', - - - // frameworks to use - // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ['mocha', 'chai', 'sinon'], - - - // list of files / patterns to load in the browser - files: [ - 'dist/debug.js', - 'test/*spec.js' - ], - - - // list of files to exclude - exclude: [ - 'src/node.js' - ], - - - // preprocess matching files before serving them to the browser - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: { - }, - - // test results reporter to use - // possible values: 'dots', 'progress' - // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress'], - - - // web server port - port: 9876, - - - // enable / disable colors in the output (reporters and logs) - colors: true, - - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO, - - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, - - - // start these browsers - // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['PhantomJS'], - - - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: false, - - // Concurrency level - // how many browser should be started simultaneous - concurrency: Infinity - }) -} diff --git a/system/websocket_test/node_modules/debug/node.js b/system/websocket_test/node_modules/debug/node.js deleted file mode 100644 index 7fc36fe..0000000 --- a/system/websocket_test/node_modules/debug/node.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./src/node'); diff --git a/system/websocket_test/node_modules/debug/package.json b/system/websocket_test/node_modules/debug/package.json deleted file mode 100644 index dc787ba..0000000 --- a/system/websocket_test/node_modules/debug/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "debug", - "version": "2.6.9", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "author": "TJ Holowaychuk ", - "contributors": [ - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " - ], - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - }, - "devDependencies": { - "browserify": "9.0.3", - "chai": "^3.5.0", - "concurrently": "^3.1.0", - "coveralls": "^2.11.15", - "eslint": "^3.12.1", - "istanbul": "^0.4.5", - "karma": "^1.3.0", - "karma-chai": "^0.1.0", - "karma-mocha": "^1.3.0", - "karma-phantomjs-launcher": "^1.0.2", - "karma-sinon": "^1.0.5", - "mocha": "^3.2.0", - "mocha-lcov-reporter": "^1.2.0", - "rimraf": "^2.5.4", - "sinon": "^1.17.6", - "sinon-chai": "^2.8.0" - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "component": { - "scripts": { - "debug/index.js": "browser.js", - "debug/debug.js": "debug.js" - } - } -} diff --git a/system/websocket_test/node_modules/debug/src/browser.js b/system/websocket_test/node_modules/debug/src/browser.js deleted file mode 100644 index 7106924..0000000 --- a/system/websocket_test/node_modules/debug/src/browser.js +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This is the web browser implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = 'undefined' != typeof chrome - && 'undefined' != typeof chrome.storage - ? chrome.storage.local - : localstorage(); - -/** - * Colors. - */ - -exports.colors = [ - 'lightseagreen', - 'forestgreen', - 'goldenrod', - 'dodgerblue', - 'darkorchid', - 'crimson' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { - return true; - } - - // is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -exports.formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (err) { - return '[UnexpectedJSONParseError]: ' + err.message; - } -}; - - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - var useColors = this.useColors; - - args[0] = (useColors ? '%c' : '') - + this.namespace - + (useColors ? ' %c' : ' ') - + args[0] - + (useColors ? '%c ' : ' ') - + '+' + exports.humanize(this.diff); - - if (!useColors) return; - - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit') - - // the final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function(match) { - if ('%%' === match) return; - index++; - if ('%c' === match) { - // we only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - -function log() { - // this hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return 'object' === typeof console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - try { - if (null == namespaces) { - exports.storage.removeItem('debug'); - } else { - exports.storage.debug = namespaces; - } - } catch(e) {} -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - var r; - try { - r = exports.storage.debug; - } catch(e) {} - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Enable namespaces listed in `localStorage.debug` initially. - */ - -exports.enable(load()); - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - return window.localStorage; - } catch (e) {} -} diff --git a/system/websocket_test/node_modules/debug/src/debug.js b/system/websocket_test/node_modules/debug/src/debug.js deleted file mode 100644 index 6a5e3fc..0000000 --- a/system/websocket_test/node_modules/debug/src/debug.js +++ /dev/null @@ -1,202 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; -exports.coerce = coerce; -exports.disable = disable; -exports.enable = enable; -exports.enabled = enabled; -exports.humanize = require('ms'); - -/** - * The currently active debug mode names, and names to skip. - */ - -exports.names = []; -exports.skips = []; - -/** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - -exports.formatters = {}; - -/** - * Previous log timestamp. - */ - -var prevTime; - -/** - * Select a color. - * @param {String} namespace - * @return {Number} - * @api private - */ - -function selectColor(namespace) { - var hash = 0, i; - - for (i in namespace) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return exports.colors[Math.abs(hash) % exports.colors.length]; -} - -/** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - -function createDebug(namespace) { - - function debug() { - // disabled? - if (!debug.enabled) return; - - var self = debug; - - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - // turn the `arguments` into a proper Array - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - - args[0] = exports.coerce(args[0]); - - if ('string' !== typeof args[0]) { - // anything else let's inspect with %O - args.unshift('%O'); - } - - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); - - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // apply env-specific formatting (colors, etc.) - exports.formatArgs.call(self, args); - - var logFn = debug.log || exports.log || console.log.bind(console); - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = exports.enabled(namespace); - debug.useColors = exports.useColors(); - debug.color = selectColor(namespace); - - // env-specific initialization logic for debug instances - if ('function' === typeof exports.init) { - exports.init(debug); - } - - return debug; -} - -/** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - -function enable(namespaces) { - exports.save(namespaces); - - exports.names = []; - exports.skips = []; - - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (var i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } - } -} - -/** - * Disable debug output. - * - * @api public - */ - -function disable() { - exports.enable(''); -} - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -function enabled(name) { - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } - } - return false; -} - -/** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/system/websocket_test/node_modules/debug/src/index.js b/system/websocket_test/node_modules/debug/src/index.js deleted file mode 100644 index e12cf4d..0000000 --- a/system/websocket_test/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer process, which is node, but we should - * treat as a browser. - */ - -if (typeof process !== 'undefined' && process.type === 'renderer') { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/system/websocket_test/node_modules/debug/src/inspector-log.js b/system/websocket_test/node_modules/debug/src/inspector-log.js deleted file mode 100644 index 60ea6c0..0000000 --- a/system/websocket_test/node_modules/debug/src/inspector-log.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = inspectorLog; - -// black hole -const nullStream = new (require('stream').Writable)(); -nullStream._write = () => {}; - -/** - * Outputs a `console.log()` to the Node.js Inspector console *only*. - */ -function inspectorLog() { - const stdout = console._stdout; - console._stdout = nullStream; - console.log.apply(console, arguments); - console._stdout = stdout; -} diff --git a/system/websocket_test/node_modules/debug/src/node.js b/system/websocket_test/node_modules/debug/src/node.js deleted file mode 100644 index b15109c..0000000 --- a/system/websocket_test/node_modules/debug/src/node.js +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Module dependencies. - */ - -var tty = require('tty'); -var util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(function (key) { - return /^debug_/i.test(key); -}).reduce(function (obj, key) { - // camel-case - var prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); - - // coerce string value into JS value - var val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) val = true; - else if (/^(no|off|false|disabled)$/i.test(val)) val = false; - else if (val === 'null') val = null; - else val = Number(val); - - obj[prop] = val; - return obj; -}, {}); - -/** - * The file descriptor to write the `debug()` calls to. - * Set the `DEBUG_FD` env variable to override with another value. i.e.: - * - * $ DEBUG_FD=3 node script.js 3>debug.log - */ - -var fd = parseInt(process.env.DEBUG_FD, 10) || 2; - -if (1 !== fd && 2 !== fd) { - util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() -} - -var stream = 1 === fd ? process.stdout : - 2 === fd ? process.stderr : - createWritableStdioStream(fd); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts - ? Boolean(exports.inspectOpts.colors) - : tty.isatty(fd); -} - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -exports.formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n').map(function(str) { - return str.trim() - }).join(' '); -}; - -/** - * Map %o to `util.inspect()`, allowing multiple lines if needed. - */ - -exports.formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - var name = this.namespace; - var useColors = this.useColors; - - if (useColors) { - var c = this.color; - var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); - } else { - args[0] = new Date().toUTCString() - + ' ' + name + ' ' + args[0]; - } -} - -/** - * Invokes `util.format()` with the specified arguments and writes to `stream`. - */ - -function log() { - return stream.write(util.format.apply(util, arguments) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Copied from `node/src/node.js`. - * - * XXX: It's lame that node doesn't expose this API out-of-the-box. It also - * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. - */ - -function createWritableStdioStream (fd) { - var stream; - var tty_wrap = process.binding('tty_wrap'); - - // Note stream._type is used for test-module-load-list.js - - switch (tty_wrap.guessHandleType(fd)) { - case 'TTY': - stream = new tty.WriteStream(fd); - stream._type = 'tty'; - - // Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - case 'FILE': - var fs = require('fs'); - stream = new fs.SyncWriteStream(fd, { autoClose: false }); - stream._type = 'fs'; - break; - - case 'PIPE': - case 'TCP': - var net = require('net'); - stream = new net.Socket({ - fd: fd, - readable: false, - writable: true - }); - - // FIXME Should probably have an option in net.Socket to create a - // stream from an existing fd which is writable only. But for now - // we'll just add this hack and set the `readable` member to false. - // Test: ./node test/fixtures/echo.js < /etc/passwd - stream.readable = false; - stream.read = null; - stream._type = 'pipe'; - - // FIXME Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - default: - // Probably an error on in uv_guess_handle() - throw new Error('Implement me. Unknown stream file type!'); - } - - // For supporting legacy API we put the FD here. - stream.fd = fd; - - stream._isStdio = true; - - return stream; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init (debug) { - debug.inspectOpts = {}; - - var keys = Object.keys(exports.inspectOpts); - for (var i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -/** - * Enable namespaces listed in `process.env.DEBUG` initially. - */ - -exports.enable(load()); diff --git a/system/websocket_test/node_modules/es5-ext/CHANGELOG.md b/system/websocket_test/node_modules/es5-ext/CHANGELOG.md deleted file mode 100644 index ab65ec5..0000000 --- a/system/websocket_test/node_modules/es5-ext/CHANGELOG.md +++ /dev/null @@ -1,407 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [0.10.64](https://github.com/medikoo/es5-ext/compare/v0.10.63...v0.10.64) (2024-02-27) - -### Bug Fixes - -- Revert update to postinstall script meant to fix Powershell issue, as it's a regression for some Linux terminals ([c2e2bb9](https://github.com/medikoo/es5-ext/commit/c2e2bb90c295c4c582445a6f03b2a3ad0b22550a)) - -### [0.10.63](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.63) (2024-02-23) - -### Bug Fixes - -- Do not rely on problematic regex ([3551cdd](https://github.com/medikoo/es5-ext/commit/3551cdd7b2db08b1632841f819d008757d28e8e2)), addresses [#201](https://github.com/medikoo/es5-ext/issues/201) -- Support ES2015+ function definitions in `function#toStringTokens()` ([a52e957](https://github.com/medikoo/es5-ext/commit/a52e95736690ad1d465ebcd9791d54570e294602)), addresses [#021](https://github.com/medikoo/es5-ext/issues/021) -- Ensure postinstall script does not crash on Windows, fixes [#181](https://github.com/medikoo/es5-ext/issues/181) ([bf8ed79](https://github.com/medikoo/es5-ext/commit/bf8ed799d57df53096da9d908ff577f305e1366f)) - -### Maintenance Improvements - -- Simplify the manifest message ([7855319](https://github.com/medikoo/es5-ext/commit/7855319f41b9736639cf4555bd2c419f17addf55)) - -### [0.10.62](https://github.com/medikoo/es5-ext/compare/v0.10.61...v0.10.62) (2022-08-02) - -### Maintenance Improvements - -- **Manifest improvements:** - - ([#190](https://github.com/medikoo/es5-ext/issues/190)) ([b8dc53f](https://github.com/medikoo/es5-ext/commit/b8dc53fa439b98541644c64c1275f25d9f2e2235)) - - ([c51d552](https://github.com/medikoo/es5-ext/commit/c51d552c03967858b8f14a4afa305338ba648cce)) - -### [0.10.61](https://github.com/medikoo/es5-ext/compare/v0.10.60...v0.10.61) (2022-04-20) - -### Bug Fixes - -- Ensure postinstall script does not error ([a0be4fd](https://github.com/medikoo/es5-ext/commit/a0be4fdacdbc3aefd6f2952b7b9215827d362bbb)) - -### Maintenance Improvements - -- Bump dependencies ([d7e0a61](https://github.com/medikoo/es5-ext/commit/d7e0a612b7d895c1c7238c779feae1e39d4634c4)) - -### [0.10.60](https://github.com/medikoo/es5-ext/compare/v0.10.59...v0.10.60) (2022-04-07) - -### Maintenance Improvements - -- Improve `postinstall` script configuration ([ab6b121](https://github.com/medikoo/es5-ext/commit/ab6b121f0ca4f033bba9b6f400b24d07869bd716)) - -### [0.10.59](https://github.com/medikoo/es5-ext/compare/v0.10.58...v0.10.59) (2022-03-17) - -### Maintenance Improvements - -- Improve manifest wording ([#122](https://github.com/medikoo/es5-ext/issues/122)) ([eb7ae59](https://github.com/medikoo/es5-ext/commit/eb7ae59966774a8c26f1717415c627d90bb3d954)) -- Update data in manifest ([3d2935a](https://github.com/medikoo/es5-ext/commit/3d2935ac6f1a0969c7569840d5b3bdeed6940e56)) - -### [0.10.58](https://github.com/medikoo/es5-ext/compare/v0.10.57...v0.10.58) (2022-03-11) - -### Maintenance Improvements - -- Improve "call for peace" manifest ([3beace4](https://github.com/medikoo/es5-ext/commit/3beace4b3d00f02da61b72dd328f90cf069d46de)) - -### [0.10.57](https://github.com/medikoo/es5-ext/compare/v0.10.56...v0.10.57) (2022-03-08) - -### Bug Fixes - -- Workaround `postinstall` script prevent npx error ([#110](https://github.com/medikoo/es5-ext/issues/110)) ([e212d5a](https://github.com/medikoo/es5-ext/commit/e212d5a0adf186f1fadf85fdc07aab25085ee097)) ([martindrq](https://github.com/martindrq)) - -### [0.10.56](https://github.com/medikoo/es5-ext/compare/v0.10.55...v0.10.56) (2022-03-07) - -### Maintenance Improvements - -- Add missing shebang to postinstall script ([e423fd7](https://github.com/medikoo/es5-ext/commit/e423fd7264c4f145921e461037d571b35b6a9833)) - -### [0.10.55](https://github.com/medikoo/es5-ext/compare/v0.10.54...v0.10.55) (2022-03-07) - -### Maintenance Improvements - -- Configure `.npmignore` file (exclude tests from publication) ([d3ed4b6](https://github.com/medikoo/es5-ext/commit/d3ed4b6a873900a2abf3957bbebdcf18c4e564e0)) - -### [0.10.54](https://github.com/medikoo/es5-ext/compare/v0.10.53...v0.10.54) (2022-03-07) - -### Maintenance Improvements - -- Convert dependency ranges ([765eb8e](https://github.com/medikoo/es5-ext/commit/765eb8e897cabc76f0351443d84b4843a1187b27)) -- Give Peace a Chance ([28de285](https://github.com/medikoo/es5-ext/commit/28de285ed433b45113f01e4ce7c74e9a356b2af2)) - -### [0.10.53](https://github.com/medikoo/es5-ext/compare/v0.10.52...v0.10.53) (2019-11-21) - -_Maintenance improvements_ - -### [0.10.52](https://github.com/medikoo/es5-ext/compare/v0.10.51...v0.10.52) (2019-10-29) - -### Bug Fixes - -- Fix global resolution for Safari ([00731d2](https://github.com/medikoo/es5-ext/commit/00731d2)) -- Keep support for old Node.js versions ([2fa2a11](https://github.com/medikoo/es5-ext/commit/2fa2a11)) - -### [0.10.51](https://github.com/medikoo/es5-ext/compare/v0.10.50...v0.10.51) (2019-08-30) - -### Bug Fixes - -- Ensure Function.isFunction recognizes async functions ([6f06e66](https://github.com/medikoo/es5-ext/commit/6f06e66)) - -### Tests - -- Fix after prettification changes ([dd6fc3f](https://github.com/medikoo/es5-ext/commit/dd6fc3f)) - -## [0.10.50](https://github.com/medikoo/es5-ext/compare/v0.10.49...v0.10.50) (2019-04-30) - -### Bug Fixes - -- maximum time value reference ([708202d](https://github.com/medikoo/es5-ext/commit/708202d)) - -### Features - -- ensure global resolves in strict mode ([c6a19d7](https://github.com/medikoo/es5-ext/commit/c6a19d7)), closes [#86](https://github.com/medikoo/es5-ext/issues/86) - -## [0.10.49](https://github.com/medikoo/es5-ext/compare/v0.10.48...v0.10.49) (2019-03-11) - -### Features - -- allow plain function usage of fn.compose ([2bafef7](https://github.com/medikoo/es5-ext/commit/2bafef7)) - -## [0.10.48](https://github.com/medikoo/es5-ext/compare/v0.10.47...v0.10.48) (2019-02-22) - -### Features - -- Object.ensurePlainObject util ([f48fbcf](https://github.com/medikoo/es5-ext/commit/f48fbcf)) - - - -## [0.10.47](https://github.com/medikoo/es5-ext/compare/v0.10.46...v0.10.47) (2019-01-16) - -### Features - -- Promise.prototype.finally shim ([4dadbc7](https://github.com/medikoo/es5-ext/commit/4dadbc7)) - - - -## [0.10.46](https://github.com/medikoo/es5-ext/compare/v0.10.45...v0.10.46) (2018-08-13) - -### Bug Fixes - -- assign-deep to not modify following arguments ([bf43d57](https://github.com/medikoo/es5-ext/commit/bf43d57)) - - - -## [0.10.45](https://github.com/medikoo/es5-ext/compare/v0.10.44...v0.10.45) (2018-06-01) - -### Bug Fixes - -- improve error message readbility ([adc91b9](https://github.com/medikoo/es5-ext/commit/adc91b9)) - - - -## [0.10.44](https://github.com/medikoo/es5-ext/compare/v0.10.43...v0.10.44) (2018-05-30) - -### Features - -- add Object.entries ([51d2f43](https://github.com/medikoo/es5-ext/commit/51d2f43)) - - - -## [0.10.43](https://github.com/medikoo/es5-ext/compare/v0.10.42...v0.10.43) (2018-05-28) - -### Features - -- improve patch string ([6a25b10](https://github.com/medikoo/es5-ext/commit/6a25b10)) - - - -## [0.10.42](https://github.com/medikoo/es5-ext/compare/v0.10.41...v0.10.42) (2018-03-28) - -### Bug Fixes - -- Date.isDate to exclude NaN dates ([3b61bc6](https://github.com/medikoo/es5-ext/commit/3b61bc6)) - -### Features - -- improve non-coercible string representation ([20bfb78](https://github.com/medikoo/es5-ext/commit/20bfb78)) -- improve non-stringifiable string representation ([2e4512d](https://github.com/medikoo/es5-ext/commit/2e4512d)) - - - -## [0.10.41](https://github.com/medikoo/es5-ext/compare/v0.10.40...v0.10.41) (2018-03-16) - -### Features - -- Add function.microtaskDelay method ([66481c0](https://github.com/medikoo/es5-ext/commit/66481c0)) -- Add Object.isThenable ([8d5a45c](https://github.com/medikoo/es5-ext/commit/8d5a45c)) -- Add promise.asCallback method ([dcc1451](https://github.com/medikoo/es5-ext/commit/dcc1451)) -- Object.ensurePlainFunction ([2682be6](https://github.com/medikoo/es5-ext/commit/2682be6)) - - - -## [0.10.40](https://github.com/medikoo/es5-ext/compare/v0.10.39...v0.10.40) (2018-03-09) - -### Features - -- **math:** decimal round, floor and ceil ([39290c6](https://github.com/medikoo/es5-ext/commit/39290c6)) -- **object:** isInteger and ensureInteger ([a5f7d04](https://github.com/medikoo/es5-ext/commit/a5f7d04)) - - - -## [0.10.39](https://github.com/medikoo/es5-ext/compare/v0.10.38...v0.10.39) (2018-02-16) - -### Features - -- Promise.lazy ([7a30a78](https://github.com/medikoo/es5-ext/commit/7a30a78)) - - - -## [0.10.38](https://github.com/medikoo/es5-ext/compare/v0.10.37...v0.10.38) (2018-01-16) - -### Features - -- Object.isNaturalNumber an Object.isNaturalNumberValue ([66a40af](https://github.com/medikoo/es5-ext/commit/66a40af)) - - - -## [0.10.37](https://github.com/medikoo/es5-ext/compare/v0.10.36...v0.10.37) (2017-11-23) - -### Features - -- String.random util ([7c28739](https://github.com/medikoo/es5-ext/commit/7c28739)) - - - -## [0.10.36](https://github.com/medikoo/es5-ext/compare/v0.10.35...v0.10.36) (2017-11-23) - -### Features - -- **date:** isTimeValue and ensureTimeValue utils ([7659dc5](https://github.com/medikoo/es5-ext/commit/7659dc5)) - - - -## [0.10.35](https://github.com/medikoo/es5-ext/compare/v0.10.34...v0.10.35) (2017-10-13) - -### Bug Fixes - -- **Object.copy:** do not upgrade primitives to objects ([dd4d88f](https://github.com/medikoo/es5-ext/commit/dd4d88f)) - - - -## [0.10.34](https://github.com/medikoo/es5-ext/compare/v0.10.33...v0.10.34) (2017-10-13) - -### Features - -- **copyDeep:** duplicate only recursive instances ([bba529a](https://github.com/medikoo/es5-ext/commit/bba529a)) - - - -## [0.10.33](https://github.com/medikoo/es5-ext/compare/v0.10.32...v0.10.33) (2017-10-13) - -### Bug Fixes - -- **Object.assignDeep:** relax input validation ([1baf57d](https://github.com/medikoo/es5-ext/commit/1baf57d)) - - - -## [0.10.32](https://github.com/medikoo/es5-ext/compare/v0.10.31...v0.10.32) (2017-10-13) - -### Features - -- Object.assignDeep ([2345e0b](https://github.com/medikoo/es5-ext/commit/2345e0b)) - - - -## [0.10.31](https://github.com/medikoo/es5-ext/compare/v0.10.30...v0.10.31) (2017-10-09) - -### Features - -- Object.isPlainFunction utility ([031be0a](https://github.com/medikoo/es5-ext/commit/031be0a)) - - - -## [0.10.30](https://github.com/medikoo/es5-ext/compare/v0.10.29...v0.10.30) (2017-08-25) - -### Bug Fixes - -- value stringification for error message ([37bb96b](https://github.com/medikoo/es5-ext/commit/37bb96b)) - - - -## [0.10.29](https://github.com/medikoo/es5-ext/compare/v0.10.28...v0.10.29) (2017-08-18) - -### Bug Fixes - -- string.repeat after recent regression ([b02fab4](https://github.com/medikoo/es5-ext/commit/b02fab4)) - - - -## [0.10.28](https://github.com/medikoo/es5-ext/compare/v0.10.27...v0.10.28) (2017-08-18) - -### Features - -- array.isEmpty method ([b0cfbdd](https://github.com/medikoo/es5-ext/commit/b0cfbdd)) -- improve new lines representation ([860fe8b](https://github.com/medikoo/es5-ext/commit/860fe8b)) -- Object.ensureArray util ([595c341](https://github.com/medikoo/es5-ext/commit/595c341)) -- toShortStringRepresentation util ([6842d06](https://github.com/medikoo/es5-ext/commit/6842d06)) - - - -## [0.10.27](https://github.com/medikoo/es5-ext/compare/v0.10.26...v0.10.27) (2017-08-11) - -### Bug Fixes - -- isNumberValue should not crash on non-coercible values ([0db765e](https://github.com/medikoo/es5-ext/commit/0db765e)) - -### Features - -- add Object.ensureFiniteNumber util ([11c67f5](https://github.com/medikoo/es5-ext/commit/11c67f5)) -- add Object.isFiniteNumber util ([fe5b55a](https://github.com/medikoo/es5-ext/commit/fe5b55a)) - - - -## [0.10.26](https://github.com/medikoo/es5-ext/compare/v0.10.25...v0.10.26) (2017-08-02) - -### Bug Fixes - -- **general:** ensure optionalChaining in index ([3df879a](https://github.com/medikoo/es5-ext/commit/3df879a)) - - - -## [0.10.25](https://github.com/medikoo/es5-ext/compare/v0.10.24...v0.10.25) (2017-08-02) - -### Features - -- **general:** optionalChaining utility ([26332b5](https://github.com/medikoo/es5-ext/commit/26332b5)) - - - -## [0.10.24](https://github.com/medikoo/es5-ext/compare/v0.10.23...v0.10.24) (2017-07-10) - -### Features - -- resolve global with CSP safe method ([d386449](https://github.com/medikoo/es5-ext/commit/d386449)) - - - -## [0.10.23](https://github.com/medikoo/es5-ext/compare/v0.10.22...v0.10.23) (2017-06-05) - -### Bug Fixes - -- **Error.custom:** allow non-string code ([e8db3a0](https://github.com/medikoo/es5-ext/commit/e8db3a0)) -- **Error.custom:** improve `ext` argument detection ([0edbfbc](https://github.com/medikoo/es5-ext/commit/0edbfbc)) - - - -## [0.10.22](https://github.com/medikoo/es5-ext/compare/v0.10.21...v0.10.22) (2017-05-31) - -### Bug Fixes - -- ensure proper symbols stringification in early implementations ([ce51900](https://github.com/medikoo/es5-ext/commit/ce51900)) - - - -## [0.10.21](https://github.com/medikoo/es5-ext/compare/v0.10.20...v0.10.21) (2017-05-22) - -### Features - -- support arrow functions in Function/#/to-tring-tokens.js ([ad3de1e](https://github.com/medikoo/es5-ext/commit/ad3de1e)) - - - -## [0.10.20](https://github.com/medikoo/es5-ext/compare/v0.10.19...v0.10.20) (2017-05-17) - -### Features - -- if listed copy not only if own property ([d7e7cef](https://github.com/medikoo/es5-ext/commit/d7e7cef)) -- support `ensure` option in Object.copy ([295326f](https://github.com/medikoo/es5-ext/commit/295326f)) - - - -## [0.10.19](https://github.com/medikoo/es5-ext/compare/v0.10.18...v0.10.19) (2017-05-17) - -### Features - -- support propertyNames option in Object.copy ([5442279](https://github.com/medikoo/es5-ext/commit/5442279)) - - - -## [0.10.18](https://github.com/medikoo/es5-ext/compare/v0.10.17...v0.10.18) (2017-05-15) - -### Bug Fixes - -- take all changes in safeToString ([3c5cd12](https://github.com/medikoo/es5-ext/commit/3c5cd12)) - - - -## [0.10.17](https://github.com/medikoo/es5-ext/compare/v0.10.16...v0.10.17) (2017-05-15) - -### Features - -- introduce Object.ensurePromise ([46a2f45](https://github.com/medikoo/es5-ext/commit/46a2f45)) -- introduce Object.isPromise ([27aecc8](https://github.com/medikoo/es5-ext/commit/27aecc8)) -- introduce safeToString ([0cc6a7b](https://github.com/medikoo/es5-ext/commit/0cc6a7b)) - - - -## [0.10.16](https://github.com/medikoo/es5-ext/compare/v0.10.15...v0.10.16) (2017-05-09) - -### Features - -- add String.prototype.count ([2e53241](https://github.com/medikoo/es5-ext/commit/2e53241)) - -## Changelog for previous versions - -See `CHANGES` file diff --git a/system/websocket_test/node_modules/es5-ext/LICENSE b/system/websocket_test/node_modules/es5-ext/LICENSE deleted file mode 100644 index d5a4d13..0000000 --- a/system/websocket_test/node_modules/es5-ext/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2011-2024, Mariusz Nowak, @medikoo, medikoo.com - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/system/websocket_test/node_modules/es5-ext/README.md b/system/websocket_test/node_modules/es5-ext/README.md deleted file mode 100644 index 56918cf..0000000 --- a/system/websocket_test/node_modules/es5-ext/README.md +++ /dev/null @@ -1,1039 +0,0 @@ -[![Build status][build-image]][build-url] -[![Tests coverage][cov-image]][cov-url] -[![npm version][npm-image]][npm-url] - -# es5-ext - -## ECMAScript 5 extensions - -### (with respect to ECMAScript 6 standard) - -Shims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind. - -It's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board. - -When used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims. - -### Installation - -```bash -npm install es5-ext -``` - -To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) - -### Usage - -#### ECMAScript 6 features - -You can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already). - -```javascript -require("es5-ext/array/from/implement"); -Array.from("foo"); // ['f', 'o', 'o'] -``` - -You can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not. - -```javascript -var aFrom = require("es5-ext/array/from"); -aFrom("foo"); // ['f', 'o', 'o'] -``` - -If you want to use shim unconditionally (even if native implementation exists) do: - -```javascript -var aFrom = require("es5-ext/array/from/shim"); -aFrom("foo"); // ['f', 'o', 'o'] -``` - -##### List of ES6 shims - -It's about properties introduced with ES6 and those that have been updated in new spec. - -- `Array.from` -> `require('es5-ext/array/from')` -- `Array.of` -> `require('es5-ext/array/of')` -- `Array.prototype.concat` -> `require('es5-ext/array/#/concat')` -- `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')` -- `Array.prototype.entries` -> `require('es5-ext/array/#/entries')` -- `Array.prototype.fill` -> `require('es5-ext/array/#/fill')` -- `Array.prototype.filter` -> `require('es5-ext/array/#/filter')` -- `Array.prototype.find` -> `require('es5-ext/array/#/find')` -- `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')` -- `Array.prototype.keys` -> `require('es5-ext/array/#/keys')` -- `Array.prototype.map` -> `require('es5-ext/array/#/map')` -- `Array.prototype.slice` -> `require('es5-ext/array/#/slice')` -- `Array.prototype.splice` -> `require('es5-ext/array/#/splice')` -- `Array.prototype.values` -> `require('es5-ext/array/#/values')` -- `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')` -- `Math.acosh` -> `require('es5-ext/math/acosh')` -- `Math.asinh` -> `require('es5-ext/math/asinh')` -- `Math.atanh` -> `require('es5-ext/math/atanh')` -- `Math.cbrt` -> `require('es5-ext/math/cbrt')` -- `Math.clz32` -> `require('es5-ext/math/clz32')` -- `Math.cosh` -> `require('es5-ext/math/cosh')` -- `Math.exmp1` -> `require('es5-ext/math/expm1')` -- `Math.fround` -> `require('es5-ext/math/fround')` -- `Math.hypot` -> `require('es5-ext/math/hypot')` -- `Math.imul` -> `require('es5-ext/math/imul')` -- `Math.log1p` -> `require('es5-ext/math/log1p')` -- `Math.log2` -> `require('es5-ext/math/log2')` -- `Math.log10` -> `require('es5-ext/math/log10')` -- `Math.sign` -> `require('es5-ext/math/sign')` -- `Math.signh` -> `require('es5-ext/math/signh')` -- `Math.tanh` -> `require('es5-ext/math/tanh')` -- `Math.trunc` -> `require('es5-ext/math/trunc')` -- `Number.EPSILON` -> `require('es5-ext/number/epsilon')` -- `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')` -- `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')` -- `Number.isFinite` -> `require('es5-ext/number/is-finite')` -- `Number.isInteger` -> `require('es5-ext/number/is-integer')` -- `Number.isNaN` -> `require('es5-ext/number/is-nan')` -- `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')` -- `Object.assign` -> `require('es5-ext/object/assign')` -- `Object.keys` -> `require('es5-ext/object/keys')` -- `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')` -- `Promise.prototype.finally` -> `require('es5-ext/promise/#/finally')` -- `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')` -- `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')` -- `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')` -- `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')` -- `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')` -- `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')` -- `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')` -- `String.raw` -> `require('es5-ext/string/raw')` -- `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')` -- `String.prototype.contains` -> `require('es5-ext/string/#/contains')` -- `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')` -- `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')` -- `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')` -- `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')` -- `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')` - -#### Non ECMAScript standard features - -**es5-ext** provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes: - -```javascript -Object.defineProperty(Function.prototype, "partial", { - value: require("es5-ext/function/#/partial"), - configurable: true, - enumerable: false, - writable: true -}); -Object.defineProperty(Array.prototype, "flatten", { - value: require("es5-ext/array/#/flatten"), - configurable: true, - enumerable: false, - writable: true -}); -Object.defineProperty(String.prototype, "capitalize", { - value: require("es5-ext/string/#/capitalize"), - configurable: true, - enumerable: false, - writable: true -}); -``` - -See [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you. - -**Important:** Remember to **not** extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine **only** if you're the _owner_ of the global scope, so e.g. in final project you lead development of. - -When you're in situation when native extensions are not good idea, then you should use methods indirectly: - -```javascript -var flatten = require("es5-ext/array/#/flatten"); - -flatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4] -``` - -for better convenience you can turn methods into functions: - -```javascript -var call = Function.prototype.call; -var flatten = call.bind(require("es5-ext/array/#/flatten")); - -flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4] -``` - -You can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application - -```javascript -var util = {}; -util.partial = call.bind(require("es5-ext/function/#/partial")); -util.flatten = call.bind(require("es5-ext/array/#/flatten")); -util.startsWith = call.bind(require("es5-ext/string/#/starts-with")); - -util.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4] -``` - -As with native ones most methods are generic and can be run on any type of object. - -## API - -### Global extensions - -#### global _(es5-ext/global)_ - -Object that represents global scope - -### Array Constructor extensions - -#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from). -Returns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned. - -#### generate([length[, …fill]]) _(es5-ext/array/generate)_ - -Generate an array of pre-given _length_ built of repeated arguments. - -#### isPlainArray(x) _(es5-ext/array/is-plain-array)_ - -Returns true if object is plain array (not instance of one of the Array's extensions). - -#### of([…items]) _(es5-ext/array/of)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of). -Create an array from given arguments. - -#### toArray(obj) _(es5-ext/array/to-array)_ - -Returns array representation of `obj`. If `obj` is already an array, `obj` is returned back. - -#### validArray(obj) _(es5-ext/array/valid-array)_ - -Returns `obj` if it's an array, otherwise throws `TypeError` - -### Array Prototype extensions - -#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_ - -In **sorted** list search for index of item for which _compareFn_ returns value closest to _0_. -It's variant of binary search algorithm - -#### arr.clear() _(es5-ext/array/#/clear)_ - -Clears the array - -#### arr.compact() _(es5-ext/array/#/compact)_ - -Returns a copy of the context with all non-values (`null` or `undefined`) removed. - -#### arr.concat() _(es5-ext/array/#/concat)_ - -[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat). -ES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context. - -#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_ - -Whether list contains the given value. - -#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin). - -#### arr.diff(other) _(es5-ext/array/#/diff)_ - -Returns the array of elements that are present in context list but not present in other list. - -#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_ - -_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision - -#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_ - -_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision - -#### arr.entries() _(es5-ext/array/#/entries)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries). -Returns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value. - -#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_ - -Returns the array of elements that are found only in one of the lists (either context list or list provided in arguments). - -#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill). - -#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_ - -[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter). -ES6's version of `filter`, returns array of same type as the context. - -#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find). -Return first element for which given function returns true - -#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex). -Return first index for which given function returns true - -#### arr.first() _(es5-ext/array/#/first)_ - -Returns value for first defined index - -#### arr.firstIndex() _(es5-ext/array/#/first-index)_ - -Returns first declared index of the array - -#### arr.flatten() _(es5-ext/array/#/flatten)_ - -Returns flattened version of the array - -#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_ - -`forEach` starting from last element - -#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_ - -Group list elements by value returned by _cb_ function - -#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_ - -Returns array of all indexes of given value - -#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_ - -Computes the array of values that are the intersection of all lists (context list and lists given in arguments) - -#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_ - -Returns true if both context and _other_ lists have same content - -#### arr.isUniq() _(es5-ext/array/#/is-uniq)_ - -Returns true if all values in array are unique - -#### arr.keys() _(es5-ext/array/#/keys)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys). -Returns iterator object, which traverses all array indexes. - -#### arr.last() _(es5-ext/array/#/last)_ - -Returns value of last defined index - -#### arr.lastIndex() _(es5-ext/array/#/last)_ - -Returns last defined index of the array - -#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_ - -[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map). -ES6's version of `map`, returns array of same type as the context. - -#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_ - -Remove values from the array - -#### arr.separate(sep) _(es5-ext/array/#/separate)_ - -Returns array with items separated with `sep` value - -#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_ - -[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice). -ES6's version of `slice`, returns array of same type as the context. - -#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_ - -`some` starting from last element - -#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_ - -[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice). -ES6's version of `splice`, returns array of same type as the context. - -#### arr.uniq() _(es5-ext/array/#/uniq)_ - -Returns duplicate-free version of the array - -#### arr.values() _(es5-ext/array/#/values)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values). -Returns iterator object which traverses all array values. - -#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator). -Returns iterator object which traverses all array values. - -### Boolean Constructor extensions - -#### isBoolean(x) _(es5-ext/boolean/is-boolean)_ - -Whether value is boolean - -### Date Constructor extensions - -#### isDate(x) _(es5-ext/date/is-date)_ - -Whether value is date instance - -#### validDate(x) _(es5-ext/date/valid-date)_ - -If given object is not date throw TypeError in other case return it. - -### Date Prototype extensions - -#### date.copy(date) _(es5-ext/date/#/copy)_ - -Returns a copy of the date object - -#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_ - -Returns number of days of date's month - -#### date.floorDay() _(es5-ext/date/#/floor-day)_ - -Sets the date time to 00:00:00.000 - -#### date.floorMonth() _(es5-ext/date/#/floor-month)_ - -Sets date day to 1 and date time to 00:00:00.000 - -#### date.floorYear() _(es5-ext/date/#/floor-year)_ - -Sets date month to 0, day to 1 and date time to 00:00:00.000 - -#### date.format(pattern) _(es5-ext/date/#/format)_ - -Formats date up to given string. Supported patterns: - -- `%Y` - Year with century, 1999, 2003 -- `%y` - Year without century, 99, 03 -- `%m` - Month, 01..12 -- `%d` - Day of the month 01..31 -- `%H` - Hour (24-hour clock), 00..23 -- `%M` - Minute, 00..59 -- `%S` - Second, 00..59 -- `%L` - Milliseconds, 000..999 - -### Error Constructor extensions - -#### custom(message/_, code, ext_/) _(es5-ext/error/custom)_ - -Creates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object) - -#### isError(x) _(es5-ext/error/is-error)_ - -Whether value is an error (instance of `Error`). - -#### validError(x) _(es5-ext/error/valid-error)_ - -If given object is not error throw TypeError in other case return it. - -### Error Prototype extensions - -#### err.throw() _(es5-ext/error/#/throw)_ - -Throws error - -### Function Constructor extensions - -Some of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele - -#### constant(x) _(es5-ext/function/constant)_ - -Returns a constant function that returns pregiven argument - -_k(x)(y) =def x_ - -#### identity(x) _(es5-ext/function/identity)_ - -Identity function. Returns first argument - -_i(x) =def x_ - -#### invoke(name[, …args]) _(es5-ext/function/invoke)_ - -Returns a function that takes an object as an argument, and applies object's -_name_ method to arguments. -_name_ can be name of the method or method itself. - -_invoke(name, …args)(object, …args2) =def object\[name\]\(…args, …args2\)_ - -#### isArguments(x) _(es5-ext/function/is-arguments)_ - -Whether value is arguments object - -#### isFunction(arg) _(es5-ext/function/is-function)_ - -Whether value is instance of function - -#### noop() _(es5-ext/function/noop)_ - -No operation function - -#### pluck(name) _(es5-ext/function/pluck)_ - -Returns a function that takes an object, and returns the value of its _name_ -property - -_pluck(name)(obj) =def obj[name]_ - -#### validFunction(arg) _(es5-ext/function/valid-function)_ - -If given object is not function throw TypeError in other case return it. - -### Function Prototype extensions - -Some of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele - -#### fn.compose([…fns]) _(es5-ext/function/#/compose)_ - -Applies the functions in reverse argument-list order. - -_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_ - -`compose` can also be used in plain function form as: - -_compose(f1, f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_ - -#### fn.copy() _(es5-ext/function/#/copy)_ - -Produces copy of given function - -#### fn.curry([n]) _(es5-ext/function/#/curry)_ - -Invoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function. -If _n_ is not provided then it defaults to context function length - -_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_ - -#### fn.lock([…args]) _(es5-ext/function/#/lock)_ - -Returns a function that applies the underlying function to _args_, and ignores its own arguments. - -_f.lock(…args)(…args2) =def f(…args)_ - -_Named after it's counterpart in Google Closure_ - -#### fn.not() _(es5-ext/function/#/not)_ - -Returns a function that returns boolean negation of value returned by underlying function. - -_f.not()(…args) =def !f(…args)_ - -#### fn.partial([…args]) _(es5-ext/function/#/partial)_ - -Returns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args. - -_f.partial(…args1)(…args2) =def f(…args1, …args2)_ - -#### fn.spread() _(es5-ext/function/#/spread)_ - -Returns a function that applies underlying function with first list argument - -_f.match()(args) =def f.apply(null, args)_ - -#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_ - -Serializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties. - -### Math extensions - -#### acosh(x) _(es5-ext/math/acosh)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh). - -#### asinh(x) _(es5-ext/math/asinh)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh). - -#### atanh(x) _(es5-ext/math/atanh)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh). - -#### cbrt(x) _(es5-ext/math/cbrt)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt). - -#### clz32(x) _(es5-ext/math/clz32)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32). - -#### cosh(x) _(es5-ext/math/cosh)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh). - -#### expm1(x) _(es5-ext/math/expm1)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1). - -#### fround(x) _(es5-ext/math/fround)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround). - -#### hypot([…values]) _(es5-ext/math/hypot)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot). - -#### imul(x, y) _(es5-ext/math/imul)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul). - -#### log1p(x) _(es5-ext/math/log1p)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p). - -#### log2(x) _(es5-ext/math/log2)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2). - -#### log10(x) _(es5-ext/math/log10)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10). - -#### sign(x) _(es5-ext/math/sign)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign). - -#### sinh(x) _(es5-ext/math/sinh)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh). - -#### tanh(x) _(es5-ext/math/tanh)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh). - -#### trunc(x) _(es5-ext/math/trunc)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc). - -### Number Constructor extensions - -#### EPSILON _(es5-ext/number/epsilon)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon). - -The difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16. - -#### isFinite(x) _(es5-ext/number/is-finite)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). -Whether value is finite. Differs from global isNaN that it doesn't do type coercion. - -#### isInteger(x) _(es5-ext/number/is-integer)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger). -Whether value is integer. - -#### isNaN(x) _(es5-ext/number/is-nan)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan). -Whether value is NaN. Differs from global isNaN that it doesn't do type coercion. - -#### isNumber(x) _(es5-ext/number/is-number)_ - -Whether given value is number - -#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger). - -#### MAX*SAFE_INTEGER *(es5-ext/number/max-safe-integer)\_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger). -The value of Number.MAX_SAFE_INTEGER is 9007199254740991. - -#### MIN*SAFE_INTEGER *(es5-ext/number/min-safe-integer)\_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger). -The value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1). - -#### toInteger(x) _(es5-ext/number/to-integer)_ - -Converts value to integer - -#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_ - -Converts value to positive integer. If provided value is less than 0, then 0 is returned - -#### toUint32(x) _(es5-ext/number/to-uint32)_ - -Converts value to unsigned 32 bit integer. This type is used for array lengths. -See: http://www.2ality.com/2012/02/js-integers.html - -### Number Prototype extensions - -#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_ - -Pad given number with zeros. Returns string - -### Object Constructor extensions - -#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). -Extend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten. - -#### clear(obj) _(es5-ext/object/clear)_ - -Remove all enumerable own properties of the object - -#### compact(obj) _(es5-ext/object/compact)_ - -Returns copy of the object with all enumerable properties that have no falsy values - -#### compare(obj1, obj2) _(es5-ext/object/compare)_ - -Universal cross-type compare function. To be used for e.g. array sort. - -#### copy(obj) _(es5-ext/object/copy)_ - -Returns copy of the object with all enumerable properties. - -#### copyDeep(obj) _(es5-ext/object/copy-deep)_ - -Returns deep copy of the object with all enumerable properties. - -#### count(obj) _(es5-ext/object/count)_ - -Counts number of enumerable own properties on object - -#### create(obj[, properties]) _(es5-ext/object/create)_ - -`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804). - -When `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined. - -It's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype. - -Use only for objects that you plan to switch prototypes of and be aware of limitations of this workaround. - -#### eq(x, y) _(es5-ext/object/eq)_ - -Whether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm. - -#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_ - -Analogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function. -Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). - -#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_ - -Analogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value. - -#### firstKey(obj) _(es5-ext/object/first-key)_ - -Returns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object. - -#### flatten(obj) _(es5-ext/object/flatten)_ - -Returns new object, with flatten properties of input object - -_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_ - -#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_ - -Analogous to Array.prototype.forEach. Calls a function for each key-value pair found in object -Optionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). - -#### getPropertyNames() _(es5-ext/object/get-property-names)_ - -Get all (not just own) property names of the object - -#### is(x, y) _(es5-ext/object/is)_ - -Whether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm. - -#### isArrayLike(x) _(es5-ext/object/is-array-like)_ - -Whether object is array-like object - -#### isCopy(x, y) _(es5-ext/object/is-copy)_ - -Two values are considered a copy of same value when all of their own enumerable properties have same values. - -#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_ - -Deep comparision of objects - -#### isEmpty(obj) _(es5-ext/object/is-empty)_ - -True if object doesn't have any own enumerable property - -#### isObject(arg) _(es5-ext/object/is-object)_ - -Whether value is not primitive - -#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_ - -Whether object is plain object, its protototype should be Object.prototype and it cannot be host object. - -#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_ - -Search object for value - -#### keys(obj) _(es5-ext/object/keys)_ - -[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys). -ES6's version of `keys`, doesn't throw on primitive input - -#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_ - -Analogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object. - -#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_ - -Create new object with same values, but remapped keys - -#### mixin(target, source) _(es5-ext/object/mixin)_ - -Extend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten). -_It was for a moment part of ECMAScript 6 draft._ - -#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_ - -Extends _target_, with all source and source's prototype properties. -Useful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support). - -#### normalizeOptions(options) _(es5-ext/object/normalize-options)_ - -Normalizes options object into flat plain object. - -Useful for functions in which we either need to keep options object for future reference or need to modify it for internal use. - -- It never returns input `options` object back (always a copy is created) -- `options` can be undefined in such case empty plain object is returned. -- Copies all enumerable properties found down prototype chain. - -#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_ - -Creates `null` prototype based plain object, and sets on it all property names provided in arguments to true. - -#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_ - -Safe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator - -#### serialize(value) _(es5-ext/object/serialize)_ - -Serialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions. - -#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof). -If native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed. - -#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_ - -Analogous to Array.prototype.some Returns true if any key-value pair satisfies the provided -testing function. -Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). - -#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_ - -Creates an array of results of calling a provided function on every key-value pair in this object. -Optionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). - -#### unserialize(str) _(es5-ext/object/unserialize)_ - -Userializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize) - -#### validCallable(x) _(es5-ext/object/valid-callable)_ - -If given object is not callable throw TypeError in other case return it. - -#### validObject(x) _(es5-ext/object/valid-object)_ - -Throws error if given value is not an object, otherwise it is returned. - -#### validValue(x) _(es5-ext/object/valid-value)_ - -Throws error if given value is `null` or `undefined`, otherwise returns value. - -### Promise Prototype extensions - -#### promise.finally(onFinally) _(es5-ext/promise/#/finally)_ - -[_Introduced with ECMAScript 2018_](https://tc39.github.io/ecma262/#sec-promise.prototype.finally). - -### RegExp Constructor extensions - -#### escape(str) _(es5-ext/reg-exp/escape)_ - -Escapes string to be used in regular expression - -#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_ - -Whether object is regular expression - -#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_ - -If object is regular expression it is returned, otherwise TypeError is thrown. - -### RegExp Prototype extensions - -#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_ - -Whether regular expression has `sticky` flag. - -It's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented. - -#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_ - -Whether regular expression has `unicode` flag. - -It's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented. - -#### re.match(string) _(es5-ext/reg-exp/#/match)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match). - -#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace). - -#### re.search(string) _(es5-ext/reg-exp/#/search)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search). - -#### re.split(string) _(es5-ext/reg-exp/#/search)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split). - -#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky). -It's a getter, so only `implement` and `is-implemented` modules are provided. - -#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode). -It's a getter, so only `implement` and `is-implemented` modules are provided. - -### String Constructor extensions - -#### formatMethod(fMap) _(es5-ext/string/format-method)_ - -Creates format method. It's used e.g. to create `Date.prototype.format` method - -#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint) - -#### isString(x) _(es5-ext/string/is-string)_ - -Whether object is string - -#### randomUniq() _(es5-ext/string/random-uniq)_ - -Returns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice) - -#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw) - -### String Prototype extensions - -#### str.at(pos) _(es5-ext/string/#/at)_ - -_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_ - -Returns a string at given position in Unicode-safe manner. -Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at). - -#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_ - -Convert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree. -Useful when converting names from js property convention into filename convention. - -#### str.capitalize() _(es5-ext/string/#/capitalize)_ - -Capitalize first character of a string - -#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_ - -Case insensitive compare - -#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat) - -Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt). - -#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains) - -Whether string contains given string. - -#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith). -Whether strings ends with given string - -#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_ - -Convert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree. -Useful when converting names from filename convention to js property name convention. - -#### str.indent(str[, count]) _(es5-ext/string/#/indent)_ - -Indents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times). - -#### str.last() _(es5-ext/string/#/last)_ - -Return last character - -#### str.normalize([form]) _(es5-ext/string/#/normalize)_ - -[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). -Returns the Unicode Normalization Form of a given string. -Based on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js) - -#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_ - -Pad string with _fill_. -If _length_ si given than _fill_ is reapated _length_ times. -If _length_ is negative then pad is applied from right. - -#### str.repeat(n) _(es5-ext/string/#/repeat)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat). -Repeat given string _n_ times - -#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_ - -Simple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _\$_ characters escape in such case). - -#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_ - -Simple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _\$_ characters escape in such case). - -#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith). -Whether strings starts with given string - -#### str[@@iterator] _(es5-ext/string/#/@@iterator)_ - -[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator). -Returns iterator object which traverses all string characters (with respect to unicode symbols) - -### Tests - - $ npm test - -## Security contact information - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - -## es5-ext for enterprise - -Available as part of the Tidelift Subscription - -The maintainers of es5-ext and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-es5-ext?utm_source=npm-es5-ext&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - -[build-image]: https://github.com/medikoo/es5-ext/workflows/Integrate/badge.svg -[build-url]: https://github.com/medikoo/es5-ext/actions?query=workflow%3AIntegrate -[cov-image]: https://img.shields.io/codecov/c/github/medikoo/es5-ext.svg -[cov-url]: https://codecov.io/gh/medikoo/es5-ext -[npm-image]: https://img.shields.io/npm/v/es5-ext.svg -[npm-url]: https://www.npmjs.com/package/es5-ext diff --git a/system/websocket_test/node_modules/es5-ext/_postinstall.js b/system/websocket_test/node_modules/es5-ext/_postinstall.js deleted file mode 100755 index 9955564..0000000 --- a/system/websocket_test/node_modules/es5-ext/_postinstall.js +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env node - -// Broadcasts "Call for peace" message when package is installed in Russia, otherwise no-op - -"use strict"; - -try { - if ( - [ - "Asia/Anadyr", "Asia/Barnaul", "Asia/Chita", "Asia/Irkutsk", "Asia/Kamchatka", - "Asia/Khandyga", "Asia/Krasnoyarsk", "Asia/Magadan", "Asia/Novokuznetsk", - "Asia/Novosibirsk", "Asia/Omsk", "Asia/Sakhalin", "Asia/Srednekolymsk", "Asia/Tomsk", - "Asia/Ust-Nera", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yekaterinburg", - "Europe/Astrakhan", "Europe/Kaliningrad", "Europe/Kirov", "Europe/Moscow", - "Europe/Samara", "Europe/Saratov", "Europe/Simferopol", "Europe/Ulyanovsk", - "Europe/Volgograd", "W-SU" - ].indexOf(new Intl.DateTimeFormat().resolvedOptions().timeZone) === -1 - ) { - return; - } - - var bold = function (msg) { return "\x1b[97m\x1b[1m" + msg + "\x1b[22m\x1b[37m"; }; - - process._rawDebug( - [ - "", - "\x1b[37m24 февраля 2022 года " + - bold("Россия вторглась на Украину") + - ". Это вторжение стало крупнейшей атакой на европейскую страну со времен " + - "Второй мировой войны.", - "", - "Оценивается, что это привело к десяткам тысяч жертв среди гражданского " + - "населения Украины и сотням тысяч военных потерь.", - "", - "Российское правительство ограничивает доступ граждан к внешней информации, " + - "продвигая односторонние формулировки и версии происходящего. Другие соседние " + - "страны изображаются как угроза для России, создавая предлог для очередного " + - "неоправданного вторжения в ближайшие годы.", - "", - "Это необходимо остановить. Узнайте, как обойти цензуру и безопасно получить доступ " + - "к широкому спектру источников:", - "", - bold( - "https://forum.torproject.net/t/tor-blocked-in-russia-how-to-circumvent-censorship/982" - ), - "", - "Мы призываем изучать множество точек зрения для формирования всестороннего взгляда " + - "на ситуацию." - ].join("\n") - ); -} catch (error) { - // ignore -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/@@iterator/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/@@iterator/implement.js" deleted file mode 100644 index 8073f2b..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/@@iterator/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, require("es6-symbol").iterator, { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/@@iterator/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/@@iterator/index.js" deleted file mode 100644 index 1d0a389..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/@@iterator/index.js" +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() - ? Array.prototype[require("es6-symbol").iterator] - : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/@@iterator/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/@@iterator/is-implemented.js" deleted file mode 100644 index 6445c04..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/@@iterator/is-implemented.js" +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -var iteratorSymbol = require("es6-symbol").iterator; - -module.exports = function () { - var arr = ["foo", 1], iterator, result; - if (typeof arr[iteratorSymbol] !== "function") return false; - iterator = arr[iteratorSymbol](); - if (!iterator) return false; - if (typeof iterator.next !== "function") return false; - result = iterator.next(); - if (!result) return false; - if (result.value !== "foo") return false; - if (result.done !== false) return false; - return true; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/@@iterator/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/@@iterator/shim.js" deleted file mode 100644 index 307b1c0..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/@@iterator/shim.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("../values/shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/_compare-by-length.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/_compare-by-length.js" deleted file mode 100644 index db5a040..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/_compare-by-length.js" +++ /dev/null @@ -1,7 +0,0 @@ -// Used internally to sort array of lists by length - -"use strict"; - -var toPosInt = require("../../number/to-pos-integer"); - -module.exports = function (arr1, arr2) { return toPosInt(arr1.length) - toPosInt(arr2.length); }; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/binary-search.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/binary-search.js" deleted file mode 100644 index bdabe27..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/binary-search.js" +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -var toPosInt = require("../../number/to-pos-integer") - , callable = require("../../object/valid-callable") - , value = require("../../object/valid-value") - , floor = Math.floor; - -module.exports = function (compareFn) { - var length, low, high, middle; - - value(this); - callable(compareFn); - - length = toPosInt(this.length); - low = 0; - high = length - 1; - - while (low <= high) { - middle = floor((low + high) / 2); - if (compareFn(this[middle]) < 0) high = middle - 1; - else low = middle + 1; - } - - if (high < 0) return 0; - if (high >= length) return length - 1; - return high; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/clear.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/clear.js" deleted file mode 100644 index fd539c9..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/clear.js" +++ /dev/null @@ -1,12 +0,0 @@ -// Inspired by Google Closure: -// http://closure-library.googlecode.com/svn/docs/ -// closure_goog_array_array.js.html#goog.array.clear - -"use strict"; - -var value = require("../../object/valid-value"); - -module.exports = function () { - value(this).length = 0; - return this; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/compact.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/compact.js" deleted file mode 100644 index 462e100..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/compact.js" +++ /dev/null @@ -1,11 +0,0 @@ -// Inspired by: http://documentcloud.github.com/underscore/#compact - -"use strict"; - -var isValue = require("../../object/is-value"); - -var filter = Array.prototype.filter; - -module.exports = function () { - return filter.call(this, function (val) { return isValue(val); }); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/concat/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/concat/implement.js" deleted file mode 100644 index 714a3c1..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/concat/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, "concat", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/concat/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/concat/index.js" deleted file mode 100644 index deac0ee..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/concat/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.prototype.concat : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/concat/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/concat/is-implemented.js" deleted file mode 100644 index ba5a154..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/concat/is-implemented.js" +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var SubArray = require("../../_sub-array-dummy-safe"); - -module.exports = function () { return new SubArray().concat("foo") instanceof SubArray; }; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/concat/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/concat/shim.js" deleted file mode 100644 index e4cfacc..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/concat/shim.js" +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; - -var isPlainArray = require("../../is-plain-array") - , toPosInt = require("../../../number/to-pos-integer") - , isObject = require("../../../object/is-object") - , isConcatSpreadable = require("es6-symbol").isConcatSpreadable - , isArray = Array.isArray - , concat = Array.prototype.concat - , forEach = Array.prototype.forEach - , isSpreadable; - -isSpreadable = function (value) { - if (!value) return false; - if (!isObject(value)) return false; - if (value[isConcatSpreadable] !== undefined) { - return Boolean(value[isConcatSpreadable]); - } - return isArray(value); -}; - -// eslint-disable-next-line no-unused-vars -module.exports = function (item /*, …items*/) { - var result; - if (!this || !isArray(this) || isPlainArray(this)) { - return concat.apply(this, arguments); - } - result = new this.constructor(); - if (isSpreadable(this)) { - forEach.call(this, function (val, i) { result[i] = val; }); - } else { - result[0] = this; - } - forEach.call(arguments, function (arg) { - var base; - if (isSpreadable(arg)) { - base = result.length; - result.length += toPosInt(arg.length); - forEach.call(arg, function (val, i) { result[base + i] = val; }); - return; - } - result.push(arg); - }); - return result; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/contains.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/contains.js" deleted file mode 100644 index 6dda9c4..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/contains.js" +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var indexOf = require("./e-index-of"); - -module.exports = function (searchElement /*, position*/) { - return indexOf.call(this, searchElement, arguments[1]) > -1; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/copy-within/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/copy-within/implement.js" deleted file mode 100644 index 4658fcb..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/copy-within/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, "copyWithin", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/copy-within/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/copy-within/index.js" deleted file mode 100644 index 37db0ec..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/copy-within/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.prototype.copyWithin : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/copy-within/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/copy-within/is-implemented.js" deleted file mode 100644 index 40c499e..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/copy-within/is-implemented.js" +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var arr = [1, 2, 3, 4, 5]; - if (typeof arr.copyWithin !== "function") return false; - return String(arr.copyWithin(1, 3)) === "1,4,5,4,5"; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/copy-within/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/copy-within/shim.js" deleted file mode 100644 index aad220c..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/copy-within/shim.js" +++ /dev/null @@ -1,45 +0,0 @@ -// Taken from: https://github.com/paulmillr/es6-shim/ - -"use strict"; - -var toInteger = require("../../../number/to-integer") - , toPosInt = require("../../../number/to-pos-integer") - , validValue = require("../../../object/valid-value") - , objHasOwnProperty = Object.prototype.hasOwnProperty - , max = Math.max - , min = Math.min; - -module.exports = function (target, start /*, end*/) { - var arr = validValue(this) - , end = arguments[2] - , length = toPosInt(arr.length) - , to - , from - , fin - , count - , direction; - - target = toInteger(target); - start = toInteger(start); - end = end === undefined ? length : toInteger(end); - - to = target < 0 ? max(length + target, 0) : min(target, length); - from = start < 0 ? max(length + start, 0) : min(start, length); - fin = end < 0 ? max(length + end, 0) : min(end, length); - count = min(fin - from, length - to); - direction = 1; - - if (from < to && to < from + count) { - direction = -1; - from += count - 1; - to += count - 1; - } - while (count > 0) { - if (objHasOwnProperty.call(arr, from)) arr[to] = arr[from]; - else delete arr[from]; - from += direction; - to += direction; - count -= 1; - } - return arr; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/diff.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/diff.js" deleted file mode 100644 index 002e6a3..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/diff.js" +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var value = require("../../object/valid-value") - , contains = require("./contains") - , filter = Array.prototype.filter; - -module.exports = function (other) { - value(this); - value(other); - return filter.call(this, function (item) { return !contains.call(other, item); }); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/e-index-of.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/e-index-of.js" deleted file mode 100644 index 8b07011..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/e-index-of.js" +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -var numberIsNaN = require("../../number/is-nan") - , toPosInt = require("../../number/to-pos-integer") - , value = require("../../object/valid-value") - , indexOf = Array.prototype.indexOf - , objHasOwnProperty = Object.prototype.hasOwnProperty - , abs = Math.abs - , floor = Math.floor; - -module.exports = function (searchElement /*, fromIndex*/) { - var i, length, fromIndex, val; - if (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments); - - length = toPosInt(value(this).length); - fromIndex = arguments[1]; - if (isNaN(fromIndex)) fromIndex = 0; - else if (fromIndex >= 0) fromIndex = floor(fromIndex); - else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); - - for (i = fromIndex; i < length; ++i) { - if (objHasOwnProperty.call(this, i)) { - val = this[i]; - if (numberIsNaN(val)) return i; // Jslint: ignore - } - } - return -1; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/e-last-index-of.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/e-last-index-of.js" deleted file mode 100644 index 15dbe05..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/e-last-index-of.js" +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -var numberIsNaN = require("../../number/is-nan") - , toPosInt = require("../../number/to-pos-integer") - , value = require("../../object/valid-value") - , lastIndexOf = Array.prototype.lastIndexOf - , objHasOwnProperty = Object.prototype.hasOwnProperty - , abs = Math.abs - , floor = Math.floor; - -module.exports = function (searchElement /*, fromIndex*/) { - var i, fromIndex, val; - if (!numberIsNaN(searchElement)) { - // Jslint: ignore - return lastIndexOf.apply(this, arguments); - } - - value(this); - fromIndex = arguments[1]; - if (isNaN(fromIndex)) fromIndex = toPosInt(this.length) - 1; - else if (fromIndex >= 0) fromIndex = floor(fromIndex); - else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); - - for (i = fromIndex; i >= 0; --i) { - if (objHasOwnProperty.call(this, i)) { - val = this[i]; - if (numberIsNaN(val)) return i; // Jslint: ignore - } - } - return -1; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/entries/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/entries/implement.js" deleted file mode 100644 index b89ce44..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/entries/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, "entries", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/entries/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/entries/index.js" deleted file mode 100644 index e7588f7..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/entries/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.prototype.entries : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/entries/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/entries/is-implemented.js" deleted file mode 100644 index 335f1c2..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/entries/is-implemented.js" +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -module.exports = function () { - var arr = [1, "foo"], iterator, result; - if (typeof arr.entries !== "function") return false; - iterator = arr.entries(); - if (!iterator) return false; - if (typeof iterator.next !== "function") return false; - result = iterator.next(); - if (!result || !result.value) return false; - if (result.value[0] !== 0) return false; - if (result.value[1] !== 1) return false; - if (result.done !== false) return false; - return true; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/entries/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/entries/shim.js" deleted file mode 100644 index f47af86..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/entries/shim.js" +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; - -var ArrayIterator = require("es6-iterator/array"); -module.exports = function () { return new ArrayIterator(this, "key+value"); }; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/exclusion.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/exclusion.js" deleted file mode 100644 index 4e9e71d..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/exclusion.js" +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -var value = require("../../object/valid-value") - , aFrom = require("../from") - , toArray = require("../to-array") - , contains = require("./contains") - , byLength = require("./_compare-by-length") - , filter = Array.prototype.filter - , push = Array.prototype.push; - -module.exports = function (/* …lists*/) { - var lists, seen, result; - if (!arguments.length) return aFrom(this); - push.apply((lists = [this]), arguments); - lists.forEach(value); - seen = []; - result = []; - lists.sort(byLength).forEach(function (list) { - result = result - .filter(function (item) { return !contains.call(list, item); }) - .concat(filter.call(list, function (item) { return !contains.call(seen, item); })); - push.apply(seen, toArray(list)); - }); - return result; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/fill/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/fill/implement.js" deleted file mode 100644 index 0efad16..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/fill/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, "fill", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/fill/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/fill/index.js" deleted file mode 100644 index 6a66ae1..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/fill/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.prototype.fill : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/fill/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/fill/is-implemented.js" deleted file mode 100644 index 5d6d02e..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/fill/is-implemented.js" +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var arr = [1, 2, 3, 4, 5, 6]; - if (typeof arr.fill !== "function") return false; - return String(arr.fill(-1, -3)) === "1,2,3,-1,-1,-1"; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/fill/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/fill/shim.js" deleted file mode 100644 index 0040bf8..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/fill/shim.js" +++ /dev/null @@ -1,25 +0,0 @@ -// Taken from: https://github.com/paulmillr/es6-shim/ - -"use strict"; - -var toInteger = require("../../../number/to-integer") - , toPosInt = require("../../../number/to-pos-integer") - , validValue = require("../../../object/valid-value") - , max = Math.max - , min = Math.min; - -module.exports = function (value /*, start, end*/) { - var arr = validValue(this) - , start = arguments[1] - , end = arguments[2] - , length = toPosInt(arr.length) - , relativeStart - , i; - - start = start === undefined ? 0 : toInteger(start); - end = end === undefined ? length : toInteger(end); - - relativeStart = start < 0 ? max(length + start, 0) : min(start, length); - for (i = relativeStart; i < length && i < end; ++i) arr[i] = value; - return arr; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/filter/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/filter/implement.js" deleted file mode 100644 index 76f4a5e..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/filter/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, "filter", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/filter/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/filter/index.js" deleted file mode 100644 index 9a25c9b..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/filter/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.prototype.filter : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/filter/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/filter/is-implemented.js" deleted file mode 100644 index 6082513..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/filter/is-implemented.js" +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var SubArray = require("../../_sub-array-dummy-safe") - , pass = function () { return true; }; - -module.exports = function () { return new SubArray().filter(pass) instanceof SubArray; }; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/filter/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/filter/shim.js" deleted file mode 100644 index 38304e4..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/filter/shim.js" +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var isPlainArray = require("../../is-plain-array") - , callable = require("../../../object/valid-callable") - , isArray = Array.isArray - , filter = Array.prototype.filter - , forEach = Array.prototype.forEach - , call = Function.prototype.call; - -module.exports = function (callbackFn /*, thisArg*/) { - var result, thisArg, i; - if (!this || !isArray(this) || isPlainArray(this)) { - return filter.apply(this, arguments); - } - callable(callbackFn); - thisArg = arguments[1]; - result = new this.constructor(); - i = 0; - forEach.call(this, function (val, j, self) { - if (call.call(callbackFn, thisArg, val, j, self)) result[i++] = val; - }); - return result; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/find-index/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/find-index/implement.js" deleted file mode 100644 index 4e14e29..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/find-index/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, "findIndex", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/find-index/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/find-index/index.js" deleted file mode 100644 index 5e07d8d..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/find-index/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.prototype.findIndex : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/find-index/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/find-index/is-implemented.js" deleted file mode 100644 index 72aa28f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/find-index/is-implemented.js" +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var fn = function (value) { return value > 3; }; - -module.exports = function () { - var arr = [1, 2, 3, 4, 5, 6]; - if (typeof arr.findIndex !== "function") return false; - return arr.findIndex(fn) === 3; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/find-index/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/find-index/shim.js" deleted file mode 100644 index bc82827..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/find-index/shim.js" +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -var callable = require("../../../object/valid-callable") - , ensureValue = require("../../../object/valid-value") - , some = Array.prototype.some - , apply = Function.prototype.apply; - -module.exports = function (predicate /*, thisArg*/) { - var k, self; - self = Object(ensureValue(this)); - callable(predicate); - - return some.call( - self, - function (value, index) { - if (apply.call(predicate, this, arguments)) { - k = index; - return true; - } - return false; - }, - arguments[1] - ) - ? k - : -1; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/find/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/find/implement.js" deleted file mode 100644 index 66035a5..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/find/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, "find", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/find/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/find/index.js" deleted file mode 100644 index 2f9d0d6..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/find/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.prototype.find : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/find/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/find/is-implemented.js" deleted file mode 100644 index 8fdacb1..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/find/is-implemented.js" +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var fn = function (value) { return value > 3; }; - -module.exports = function () { - var arr = [1, 2, 3, 4, 5, 6]; - if (typeof arr.find !== "function") return false; - return arr.find(fn) === 4; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/find/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/find/shim.js" deleted file mode 100644 index c45a938..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/find/shim.js" +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var findIndex = require("../find-index/shim"); - -// eslint-disable-next-line no-unused-vars -module.exports = function (predicate /*, thisArg*/) { - var index = findIndex.apply(this, arguments); - return index === -1 ? undefined : this[index]; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/first-index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/first-index.js" deleted file mode 100644 index 19bff54..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/first-index.js" +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var toPosInt = require("../../number/to-pos-integer") - , value = require("../../object/valid-value") - , objHasOwnProperty = Object.prototype.hasOwnProperty; - -module.exports = function () { - var i, length; - if (!(length = toPosInt(value(this).length))) return null; - i = 0; - while (!objHasOwnProperty.call(this, i)) { - if (++i === length) return null; - } - return i; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/first.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/first.js" deleted file mode 100644 index ca76833..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/first.js" +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var firstIndex = require("./first-index"); - -module.exports = function () { - var i; - if ((i = firstIndex.call(this)) !== null) return this[i]; - return undefined; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/flatten.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/flatten.js" deleted file mode 100644 index 4016727..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/flatten.js" +++ /dev/null @@ -1,40 +0,0 @@ -// Stack grow safe implementation - -"use strict"; - -var ensureValue = require("../../object/valid-value") - , isArray = Array.isArray - , objHasOwnProperty = Object.prototype.hasOwnProperty; - -module.exports = function () { - var input = ensureValue(this), index = 0, remaining, remainingIndexes, length, i, result = []; - // Jslint: ignore - main: while (input) { - length = input.length; - for (i = index; i < length; ++i) { - if (!objHasOwnProperty.call(input, i)) continue; - if (isArray(input[i])) { - if (i < length - 1) { - // eslint-disable-next-line max-depth - if (!remaining) { - remaining = []; - remainingIndexes = []; - } - remaining.push(input); - remainingIndexes.push(i + 1); - } - input = input[i]; - index = 0; - continue main; - } - result.push(input[i]); - } - if (remaining) { - input = remaining.pop(); - index = remainingIndexes.pop(); - } else { - input = null; - } - } - return result; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/for-each-right.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/for-each-right.js" deleted file mode 100644 index ebf076b..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/for-each-right.js" +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -var toPosInt = require("../../number/to-pos-integer") - , callable = require("../../object/valid-callable") - , value = require("../../object/valid-value") - , objHasOwnProperty = Object.prototype.hasOwnProperty - , call = Function.prototype.call; - -module.exports = function (cb /*, thisArg*/) { - var i, self, thisArg; - - self = Object(value(this)); - callable(cb); - thisArg = arguments[1]; - - for (i = toPosInt(self.length) - 1; i >= 0; --i) { - if (objHasOwnProperty.call(self, i)) call.call(cb, thisArg, self[i], i, self); - } -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/group.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/group.js" deleted file mode 100644 index 711eb58..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/group.js" +++ /dev/null @@ -1,28 +0,0 @@ -// Inspired by Underscore's groupBy: -// http://documentcloud.github.com/underscore/#groupBy - -"use strict"; - -var callable = require("../../object/valid-callable") - , value = require("../../object/valid-value") - , forEach = Array.prototype.forEach - , apply = Function.prototype.apply; - -module.exports = function (cb /*, thisArg*/) { - var result; - - value(this); - callable(cb); - - result = Object.create(null); - forEach.call( - this, - function (item) { - var key = apply.call(cb, this, arguments); - if (!result[key]) result[key] = []; - result[key].push(item); - }, - arguments[1] - ); - return result; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/index.js" deleted file mode 100644 index 596e83b..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/index.js" +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; - -module.exports = { - "@@iterator": require("./@@iterator"), - "binarySearch": require("./binary-search"), - "clear": require("./clear"), - "compact": require("./compact"), - "concat": require("./concat"), - "contains": require("./contains"), - "copyWithin": require("./copy-within"), - "diff": require("./diff"), - "eIndexOf": require("./e-index-of"), - "eLastIndexOf": require("./e-last-index-of"), - "entries": require("./entries"), - "exclusion": require("./exclusion"), - "fill": require("./fill"), - "filter": require("./filter"), - "find": require("./find"), - "findIndex": require("./find-index"), - "first": require("./first"), - "firstIndex": require("./first-index"), - "flatten": require("./flatten"), - "forEachRight": require("./for-each-right"), - "keys": require("./keys"), - "group": require("./group"), - "indexesOf": require("./indexes-of"), - "intersection": require("./intersection"), - "isCopy": require("./is-copy"), - "isEmpty": require("./is-empty"), - "isUniq": require("./is-uniq"), - "last": require("./last"), - "lastIndex": require("./last-index"), - "map": require("./map"), - "remove": require("./remove"), - "separate": require("./separate"), - "slice": require("./slice"), - "someRight": require("./some-right"), - "splice": require("./splice"), - "uniq": require("./uniq"), - "values": require("./values") -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/indexes-of.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/indexes-of.js" deleted file mode 100644 index 6c39cd9..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/indexes-of.js" +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var indexOf = require("./e-index-of"); - -module.exports = function (value /*, fromIndex*/) { - var result = [], i, fromIndex = arguments[1]; - while ((i = indexOf.call(this, value, fromIndex)) !== -1) { - result.push(i); - fromIndex = i + 1; - } - return result; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/intersection.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/intersection.js" deleted file mode 100644 index 7dca9dc..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/intersection.js" +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -var value = require("../../object/valid-value") - , contains = require("./contains") - , byLength = require("./_compare-by-length") - , filter = Array.prototype.filter - , push = Array.prototype.push - , slice = Array.prototype.slice; - -module.exports = function (/* …list*/) { - var lists; - if (!arguments.length) slice.call(this); - push.apply((lists = [this]), arguments); - lists.forEach(value); - lists.sort(byLength); - return lists.reduce(function (list1, list2) { - return filter.call(list1, function (item) { return contains.call(list2, item); }); - }); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/is-copy.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/is-copy.js" deleted file mode 100644 index 1413b95..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/is-copy.js" +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -var toPosInt = require("../../number/to-pos-integer") - , eq = require("../../object/eq") - , value = require("../../object/valid-value") - , objHasOwnProperty = Object.prototype.hasOwnProperty; - -module.exports = function (other) { - var i, length; - value(this); - value(other); - length = toPosInt(this.length); - if (length !== toPosInt(other.length)) return false; - for (i = 0; i < length; ++i) { - if (objHasOwnProperty.call(this, i) !== objHasOwnProperty.call(other, i)) { - return false; - } - if (!eq(this[i], other[i])) return false; - } - return true; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/is-empty.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/is-empty.js" deleted file mode 100644 index 9b336fe..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/is-empty.js" +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var ensureArray = require("../../object/ensure-array") - , firstIndex = require("./first-index"); - -module.exports = function () { return firstIndex.call(ensureArray(this)) === null; }; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/is-uniq.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/is-uniq.js" deleted file mode 100644 index 75f7734..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/is-uniq.js" +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var indexOf = require("./e-index-of") - , every = Array.prototype.every - , isFirst; - -isFirst = function (value, index) { return indexOf.call(this, value) === index; }; - -module.exports = function () { return every.call(this, isFirst, this); }; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/keys/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/keys/implement.js" deleted file mode 100644 index 101a5e3..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/keys/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, "keys", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/keys/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/keys/index.js" deleted file mode 100644 index c8753e5..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/keys/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.prototype.keys : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/keys/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/keys/is-implemented.js" deleted file mode 100644 index 70a171f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/keys/is-implemented.js" +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -module.exports = function () { - var arr = [1, "foo"], iterator, result; - if (typeof arr.keys !== "function") return false; - iterator = arr.keys(); - if (!iterator) return false; - if (typeof iterator.next !== "function") return false; - result = iterator.next(); - if (!result) return false; - if (result.value !== 0) return false; - if (result.done !== false) return false; - return true; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/keys/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/keys/shim.js" deleted file mode 100644 index 8136cdc..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/keys/shim.js" +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; - -var ArrayIterator = require("es6-iterator/array"); -module.exports = function () { return new ArrayIterator(this, "key"); }; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/last-index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/last-index.js" deleted file mode 100644 index 74aaba4..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/last-index.js" +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var toPosInt = require("../../number/to-pos-integer") - , value = require("../../object/valid-value") - , objHasOwnProperty = Object.prototype.hasOwnProperty; - -module.exports = function () { - var i, length; - if (!(length = toPosInt(value(this).length))) return null; - i = length - 1; - while (!objHasOwnProperty.call(this, i)) { - if (--i === -1) return null; - } - return i; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/last.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/last.js" deleted file mode 100644 index 38bb359..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/last.js" +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var lastIndex = require("./last-index"); - -module.exports = function () { - var i; - if ((i = lastIndex.call(this)) !== null) return this[i]; - return undefined; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/map/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/map/implement.js" deleted file mode 100644 index 42e0b47..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/map/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, "map", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/map/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/map/index.js" deleted file mode 100644 index 49e0267..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/map/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.prototype.map : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/map/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/map/is-implemented.js" deleted file mode 100644 index f09bd7d..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/map/is-implemented.js" +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var identity = require("../../../function/identity") - , SubArray = require("../../_sub-array-dummy-safe"); - -module.exports = function () { return new SubArray().map(identity) instanceof SubArray; }; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/map/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/map/shim.js" deleted file mode 100644 index 6e935d3..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/map/shim.js" +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -var isPlainArray = require("../../is-plain-array") - , callable = require("../../../object/valid-callable") - , isArray = Array.isArray - , map = Array.prototype.map - , forEach = Array.prototype.forEach - , call = Function.prototype.call; - -module.exports = function (callbackFn /*, thisArg*/) { - var result, thisArg; - if (!this || !isArray(this) || isPlainArray(this)) { - return map.apply(this, arguments); - } - callable(callbackFn); - thisArg = arguments[1]; - result = new this.constructor(this.length); - forEach.call(this, function (val, i, self) { - result[i] = call.call(callbackFn, thisArg, val, i, self); - }); - return result; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/remove.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/remove.js" deleted file mode 100644 index 6a8a086..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/remove.js" +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -var indexOf = require("./e-index-of") - , forEach = Array.prototype.forEach - , splice = Array.prototype.splice; - -// eslint-disable-next-line no-unused-vars -module.exports = function (itemToRemove /*, …item*/) { - forEach.call( - arguments, - function (item) { - var index = indexOf.call(this, item); - if (index !== -1) splice.call(this, index, 1); - }, - this - ); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/separate.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/separate.js" deleted file mode 100644 index 248662f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/separate.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var forEach = Array.prototype.forEach; - -module.exports = function (sep) { - var result = []; - forEach.call(this, function (val) { result.push(val, sep); }); - result.pop(); - return result; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/slice/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/slice/implement.js" deleted file mode 100644 index 113d34d..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/slice/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, "slice", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/slice/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/slice/index.js" deleted file mode 100644 index 716b7e0..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/slice/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.prototype.slice : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/slice/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/slice/is-implemented.js" deleted file mode 100644 index 4c83bfa..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/slice/is-implemented.js" +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var SubArray = require("../../_sub-array-dummy-safe"); - -module.exports = function () { return new SubArray().slice() instanceof SubArray; }; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/slice/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/slice/shim.js" deleted file mode 100644 index ff13085..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/slice/shim.js" +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -var toInteger = require("../../../number/to-integer") - , toPosInt = require("../../../number/to-pos-integer") - , isPlainArray = require("../../is-plain-array") - , isArray = Array.isArray - , slice = Array.prototype.slice - , objHasOwnProperty = Object.prototype.hasOwnProperty - , max = Math.max; - -module.exports = function (start, end) { - var length, result, i; - if (!this || !isArray(this) || isPlainArray(this)) { - return slice.apply(this, arguments); - } - length = toPosInt(this.length); - start = toInteger(start); - if (start < 0) start = max(length + start, 0); - else if (start > length) start = length; - if (end === undefined) { - end = length; - } else { - end = toInteger(end); - if (end < 0) end = max(length + end, 0); - else if (end > length) end = length; - } - if (start > end) start = end; - result = new this.constructor(end - start); - i = 0; - while (start !== end) { - if (objHasOwnProperty.call(this, start)) result[i] = this[start]; - ++i; - ++start; - } - return result; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/some-right.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/some-right.js" deleted file mode 100644 index d9a665f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/some-right.js" +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -var toPosInt = require("../../number/to-pos-integer") - , callable = require("../../object/valid-callable") - , value = require("../../object/valid-value") - , objHasOwnProperty = Object.prototype.hasOwnProperty - , call = Function.prototype.call; - -module.exports = function (cb /*, thisArg*/) { - var i, self, thisArg; - self = Object(value(this)); - callable(cb); - thisArg = arguments[1]; - - for (i = toPosInt(self.length) - 1; i >= 0; --i) { - if (objHasOwnProperty.call(self, i) && call.call(cb, thisArg, self[i], i, self)) { - return true; - } - } - return false; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/splice/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/splice/implement.js" deleted file mode 100644 index 236b1cb..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/splice/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, "splice", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/splice/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/splice/index.js" deleted file mode 100644 index cd5c3ec..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/splice/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.prototype.splice : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/splice/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/splice/is-implemented.js" deleted file mode 100644 index 085cba5..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/splice/is-implemented.js" +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var SubArray = require("../../_sub-array-dummy-safe"); - -module.exports = function () { return new SubArray().splice(0) instanceof SubArray; }; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/splice/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/splice/shim.js" deleted file mode 100644 index fe1f8c2..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/splice/shim.js" +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var isPlainArray = require("../../is-plain-array") - , isArray = Array.isArray - , splice = Array.prototype.splice - , forEach = Array.prototype.forEach; - -// eslint-disable-next-line no-unused-vars -module.exports = function (start, deleteCount /*, …items*/) { - var arr = splice.apply(this, arguments), result; - if (!this || !isArray(this) || isPlainArray(this)) return arr; - result = new this.constructor(arr.length); - forEach.call(arr, function (val, i) { result[i] = val; }); - return result; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/uniq.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/uniq.js" deleted file mode 100644 index 2d28bf5..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/uniq.js" +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var indexOf = require("./e-index-of") - , filter = Array.prototype.filter - , isFirst; - -isFirst = function (value, index) { return indexOf.call(this, value) === index; }; - -module.exports = function () { return filter.call(this, isFirst, this); }; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/values/implement.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/values/implement.js" deleted file mode 100644 index dce17ac..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/values/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array.prototype, "values", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/values/index.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/values/index.js" deleted file mode 100644 index 30a50ba..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/values/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.prototype.values : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/values/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/values/is-implemented.js" deleted file mode 100644 index 8b72568..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/values/is-implemented.js" +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -module.exports = function () { - var arr = ["foo", 1], iterator, result; - if (typeof arr.values !== "function") return false; - iterator = arr.values(); - if (!iterator) return false; - if (typeof iterator.next !== "function") return false; - result = iterator.next(); - if (!result) return false; - if (result.value !== "foo") return false; - if (result.done !== false) return false; - return true; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/array/\043/values/shim.js" "b/system/websocket_test/node_modules/es5-ext/array/\043/values/shim.js" deleted file mode 100644 index 5d013ab..0000000 --- "a/system/websocket_test/node_modules/es5-ext/array/\043/values/shim.js" +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; - -var ArrayIterator = require("es6-iterator/array"); -module.exports = function () { return new ArrayIterator(this, "value"); }; diff --git a/system/websocket_test/node_modules/es5-ext/array/_is-extensible.js b/system/websocket_test/node_modules/es5-ext/array/_is-extensible.js deleted file mode 100644 index c475711..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/_is-extensible.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -module.exports = (function () { - var SubArray = require("./_sub-array-dummy") - , arr; - - if (!SubArray) return false; - arr = new SubArray(); - if (!Array.isArray(arr)) return false; - if (!(arr instanceof SubArray)) return false; - - arr[34] = "foo"; - return arr.length === 35; -})(); diff --git a/system/websocket_test/node_modules/es5-ext/array/_sub-array-dummy-safe.js b/system/websocket_test/node_modules/es5-ext/array/_sub-array-dummy-safe.js deleted file mode 100644 index bef50be..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/_sub-array-dummy-safe.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -var setPrototypeOf = require("../object/set-prototype-of") - , isExtensible = require("./_is-extensible"); - -module.exports = (function () { - var SubArray; - - if (isExtensible) return require("./_sub-array-dummy"); - - if (!setPrototypeOf) return null; - SubArray = function () { - var arr = Array.apply(this, arguments); - setPrototypeOf(arr, SubArray.prototype); - return arr; - }; - setPrototypeOf(SubArray, Array); - SubArray.prototype = Object.create(Array.prototype, { - constructor: { value: SubArray, enumerable: false, writable: true, configurable: true } - }); - return SubArray; -})(); diff --git a/system/websocket_test/node_modules/es5-ext/array/_sub-array-dummy.js b/system/websocket_test/node_modules/es5-ext/array/_sub-array-dummy.js deleted file mode 100644 index 5969309..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/_sub-array-dummy.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var setPrototypeOf = require("../object/set-prototype-of"); - -module.exports = (function () { - var SubArray; - - if (!setPrototypeOf) return null; - SubArray = function () { Array.apply(this, arguments); }; - setPrototypeOf(SubArray, Array); - SubArray.prototype = Object.create(Array.prototype, { - constructor: { value: SubArray, enumerable: false, writable: true, configurable: true } - }); - return SubArray; -})(); diff --git a/system/websocket_test/node_modules/es5-ext/array/from/implement.js b/system/websocket_test/node_modules/es5-ext/array/from/implement.js deleted file mode 100644 index c08d407..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/from/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array, "from", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/array/from/index.js b/system/websocket_test/node_modules/es5-ext/array/from/index.js deleted file mode 100644 index 81cf8d9..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/from/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.from : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/array/from/is-implemented.js b/system/websocket_test/node_modules/es5-ext/array/from/is-implemented.js deleted file mode 100644 index a786c76..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/from/is-implemented.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -module.exports = function () { - var from = Array.from, arr, result; - if (typeof from !== "function") return false; - arr = ["raz", "dwa"]; - result = from(arr); - return Boolean(result && result !== arr && result[1] === "dwa"); -}; diff --git a/system/websocket_test/node_modules/es5-ext/array/from/shim.js b/system/websocket_test/node_modules/es5-ext/array/from/shim.js deleted file mode 100644 index bf660b6..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/from/shim.js +++ /dev/null @@ -1,119 +0,0 @@ -"use strict"; - -var iteratorSymbol = require("es6-symbol").iterator - , isArguments = require("../../function/is-arguments") - , isFunction = require("../../function/is-function") - , toPosInt = require("../../number/to-pos-integer") - , callable = require("../../object/valid-callable") - , validValue = require("../../object/valid-value") - , isValue = require("../../object/is-value") - , isString = require("../../string/is-string") - , isArray = Array.isArray - , call = Function.prototype.call - , desc = { configurable: true, enumerable: true, writable: true, value: null } - , defineProperty = Object.defineProperty; - -// eslint-disable-next-line complexity, max-lines-per-function -module.exports = function (arrayLike /*, mapFn, thisArg*/) { - var mapFn = arguments[1] - , thisArg = arguments[2] - , Context - , i - , j - , arr - , length - , code - , iterator - , result - , getIterator - , value; - - arrayLike = Object(validValue(arrayLike)); - - if (isValue(mapFn)) callable(mapFn); - if (!this || this === Array || !isFunction(this)) { - // Result: Plain array - if (!mapFn) { - if (isArguments(arrayLike)) { - // Source: Arguments - length = arrayLike.length; - if (length !== 1) return Array.apply(null, arrayLike); - arr = new Array(1); - arr[0] = arrayLike[0]; - return arr; - } - if (isArray(arrayLike)) { - // Source: Array - arr = new Array((length = arrayLike.length)); - for (i = 0; i < length; ++i) arr[i] = arrayLike[i]; - return arr; - } - } - arr = []; - } else { - // Result: Non plain array - Context = this; - } - - if (!isArray(arrayLike)) { - if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) { - // Source: Iterator - iterator = callable(getIterator).call(arrayLike); - if (Context) arr = new Context(); - result = iterator.next(); - i = 0; - while (!result.done) { - value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value; - if (Context) { - desc.value = value; - defineProperty(arr, i, desc); - } else { - arr[i] = value; - } - result = iterator.next(); - ++i; - } - length = i; - } else if (isString(arrayLike)) { - // Source: String - length = arrayLike.length; - if (Context) arr = new Context(); - for (i = 0, j = 0; i < length; ++i) { - value = arrayLike[i]; - if (i + 1 < length) { - code = value.charCodeAt(0); - // eslint-disable-next-line max-depth - if (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i]; - } - value = mapFn ? call.call(mapFn, thisArg, value, j) : value; - if (Context) { - desc.value = value; - defineProperty(arr, j, desc); - } else { - arr[j] = value; - } - ++j; - } - length = j; - } - } - if (length === undefined) { - // Source: array or array-like - length = toPosInt(arrayLike.length); - if (Context) arr = new Context(length); - for (i = 0; i < length; ++i) { - value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i]; - if (Context) { - desc.value = value; - defineProperty(arr, i, desc); - } else { - arr[i] = value; - } - } - } - if (Context) { - desc.value = null; - arr.length = length; - } - return arr; -}; diff --git a/system/websocket_test/node_modules/es5-ext/array/generate.js b/system/websocket_test/node_modules/es5-ext/array/generate.js deleted file mode 100644 index 42b6930..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/generate.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -var toPosInt = require("../number/to-pos-integer") - , value = require("../object/valid-value") - , slice = Array.prototype.slice; - -module.exports = function (length /*, …fill*/) { - var arr, currentLength; - length = toPosInt(value(length)); - if (length === 0) return []; - - arr = arguments.length < 2 ? [undefined] : slice.call(arguments, 1, 1 + length); - - while ((currentLength = arr.length) < length) { - arr = arr.concat(arr.slice(0, length - currentLength)); - } - return arr; -}; diff --git a/system/websocket_test/node_modules/es5-ext/array/index.js b/system/websocket_test/node_modules/es5-ext/array/index.js deleted file mode 100644 index 49ff58e..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/index.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -module.exports = { - "#": require("./#"), - "from": require("./from"), - "generate": require("./generate"), - "isPlainArray": require("./is-plain-array"), - "of": require("./of"), - "toArray": require("./to-array"), - "validArray": require("./valid-array") -}; diff --git a/system/websocket_test/node_modules/es5-ext/array/is-plain-array.js b/system/websocket_test/node_modules/es5-ext/array/is-plain-array.js deleted file mode 100644 index ca3d25b..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/is-plain-array.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var isArray = Array.isArray, getPrototypeOf = Object.getPrototypeOf; - -module.exports = function (obj) { - var proto; - if (!obj || !isArray(obj)) return false; - proto = getPrototypeOf(obj); - if (!isArray(proto)) return false; - return !isArray(getPrototypeOf(proto)); -}; diff --git a/system/websocket_test/node_modules/es5-ext/array/of/implement.js b/system/websocket_test/node_modules/es5-ext/array/of/implement.js deleted file mode 100644 index 6665c77..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/of/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Array, "of", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/array/of/index.js b/system/websocket_test/node_modules/es5-ext/array/of/index.js deleted file mode 100644 index 503c749..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/of/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Array.of : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/array/of/is-implemented.js b/system/websocket_test/node_modules/es5-ext/array/of/is-implemented.js deleted file mode 100644 index 3f232ca..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/of/is-implemented.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -module.exports = function () { - var of = Array.of, result; - if (typeof of !== "function") return false; - result = of("foo", "bar"); - return Boolean(result && result[1] === "bar"); -}; diff --git a/system/websocket_test/node_modules/es5-ext/array/of/shim.js b/system/websocket_test/node_modules/es5-ext/array/of/shim.js deleted file mode 100644 index 0202a8a..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/of/shim.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -var isFunction = require("../../function/is-function") - , slice = Array.prototype.slice - , defineProperty = Object.defineProperty - , desc = { configurable: true, enumerable: true, writable: true, value: null }; - -module.exports = function (/* …items*/) { - var result, i, length; - if (!this || this === Array || !isFunction(this)) return slice.call(arguments); - result = new this((length = arguments.length)); - for (i = 0; i < length; ++i) { - desc.value = arguments[i]; - defineProperty(result, i, desc); - } - desc.value = null; - result.length = length; - return result; -}; diff --git a/system/websocket_test/node_modules/es5-ext/array/to-array.js b/system/websocket_test/node_modules/es5-ext/array/to-array.js deleted file mode 100644 index 2515e02..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/to-array.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var from = require("./from") - , isArray = Array.isArray; - -module.exports = function (arrayLike) { return isArray(arrayLike) ? arrayLike : from(arrayLike); }; diff --git a/system/websocket_test/node_modules/es5-ext/array/valid-array.js b/system/websocket_test/node_modules/es5-ext/array/valid-array.js deleted file mode 100644 index 1e58c39..0000000 --- a/system/websocket_test/node_modules/es5-ext/array/valid-array.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var isArray = Array.isArray; - -module.exports = function (value) { - if (isArray(value)) return value; - throw new TypeError(value + " is not an array"); -}; diff --git a/system/websocket_test/node_modules/es5-ext/boolean/index.js b/system/websocket_test/node_modules/es5-ext/boolean/index.js deleted file mode 100644 index 3513642..0000000 --- a/system/websocket_test/node_modules/es5-ext/boolean/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = { isBoolean: require("./is-boolean") }; diff --git a/system/websocket_test/node_modules/es5-ext/boolean/is-boolean.js b/system/websocket_test/node_modules/es5-ext/boolean/is-boolean.js deleted file mode 100644 index 394845f..0000000 --- a/system/websocket_test/node_modules/es5-ext/boolean/is-boolean.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var objToString = Object.prototype.toString, id = objToString.call(true); - -module.exports = function (value) { - return ( - typeof value === "boolean" || - (typeof value === "object" && (value instanceof Boolean || objToString.call(value) === id)) - ); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/date/\043/copy.js" "b/system/websocket_test/node_modules/es5-ext/date/\043/copy.js" deleted file mode 100644 index 1262ae0..0000000 --- "a/system/websocket_test/node_modules/es5-ext/date/\043/copy.js" +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var getTime = Date.prototype.getTime; - -module.exports = function () { return new Date(getTime.call(this)); }; diff --git "a/system/websocket_test/node_modules/es5-ext/date/\043/days-in-month.js" "b/system/websocket_test/node_modules/es5-ext/date/\043/days-in-month.js" deleted file mode 100644 index 731d4d5..0000000 --- "a/system/websocket_test/node_modules/es5-ext/date/\043/days-in-month.js" +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -var getMonth = Date.prototype.getMonth; - -module.exports = function () { - switch (getMonth.call(this)) { - case 1: - return this.getFullYear() % 4 ? 28 : 29; - case 3: - case 5: - case 8: - case 10: - return 30; - default: - return 31; - } -}; diff --git "a/system/websocket_test/node_modules/es5-ext/date/\043/floor-day.js" "b/system/websocket_test/node_modules/es5-ext/date/\043/floor-day.js" deleted file mode 100644 index db696d3..0000000 --- "a/system/websocket_test/node_modules/es5-ext/date/\043/floor-day.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var setHours = Date.prototype.setHours; - -module.exports = function () { - setHours.call(this, 0, 0, 0, 0); - return this; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/date/\043/floor-month.js" "b/system/websocket_test/node_modules/es5-ext/date/\043/floor-month.js" deleted file mode 100644 index c9c0460..0000000 --- "a/system/websocket_test/node_modules/es5-ext/date/\043/floor-month.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var floorDay = require("./floor-day"); - -module.exports = function () { - floorDay.call(this).setDate(1); - return this; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/date/\043/floor-year.js" "b/system/websocket_test/node_modules/es5-ext/date/\043/floor-year.js" deleted file mode 100644 index e9b6f0f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/date/\043/floor-year.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var floorMonth = require("./floor-month"); - -module.exports = function () { - floorMonth.call(this).setMonth(0); - return this; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/date/\043/format.js" "b/system/websocket_test/node_modules/es5-ext/date/\043/format.js" deleted file mode 100644 index 8474dbb..0000000 --- "a/system/websocket_test/node_modules/es5-ext/date/\043/format.js" +++ /dev/null @@ -1,20 +0,0 @@ -/* eslint id-length: "off" */ - -"use strict"; - -var pad = require("../../number/#/pad") - , date = require("../valid-date") - , format; - -format = require("../../string/format-method")({ - Y: function () { return String(this.getFullYear()); }, - y: function () { return String(this.getFullYear()).slice(-2); }, - m: function () { return pad.call(this.getMonth() + 1, 2); }, - d: function () { return pad.call(this.getDate(), 2); }, - H: function () { return pad.call(this.getHours(), 2); }, - M: function () { return pad.call(this.getMinutes(), 2); }, - S: function () { return pad.call(this.getSeconds(), 2); }, - L: function () { return pad.call(this.getMilliseconds(), 3); } -}); - -module.exports = function (pattern) { return format.call(date(this), pattern); }; diff --git "a/system/websocket_test/node_modules/es5-ext/date/\043/index.js" "b/system/websocket_test/node_modules/es5-ext/date/\043/index.js" deleted file mode 100644 index 1781e21..0000000 --- "a/system/websocket_test/node_modules/es5-ext/date/\043/index.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -module.exports = { - copy: require("./copy"), - daysInMonth: require("./days-in-month"), - floorDay: require("./floor-day"), - floorMonth: require("./floor-month"), - floorYear: require("./floor-year"), - format: require("./format") -}; diff --git a/system/websocket_test/node_modules/es5-ext/date/ensure-time-value.js b/system/websocket_test/node_modules/es5-ext/date/ensure-time-value.js deleted file mode 100644 index 09f5afc..0000000 --- a/system/websocket_test/node_modules/es5-ext/date/ensure-time-value.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var safeToString = require("../safe-to-string") - , toInteger = require("../number/to-integer") - , isTimeValue = require("./is-time-value"); - -module.exports = function (value) { - if (isTimeValue(value)) return toInteger(value); - throw new TypeError(safeToString(value) + " is not a valid time value"); -}; diff --git a/system/websocket_test/node_modules/es5-ext/date/index.js b/system/websocket_test/node_modules/es5-ext/date/index.js deleted file mode 100644 index c143149..0000000 --- a/system/websocket_test/node_modules/es5-ext/date/index.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -module.exports = { - "#": require("./#"), - "ensureTimeValue": require("./ensure-time-value"), - "isDate": require("./is-date"), - "isTimeValue": require("./is-time-value"), - "validDate": require("./valid-date") -}; diff --git a/system/websocket_test/node_modules/es5-ext/date/is-date.js b/system/websocket_test/node_modules/es5-ext/date/is-date.js deleted file mode 100644 index f45bde4..0000000 --- a/system/websocket_test/node_modules/es5-ext/date/is-date.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var objToString = Object.prototype.toString, id = objToString.call(new Date()); - -module.exports = function (value) { - return ( - (value && !isNaN(value) && (value instanceof Date || objToString.call(value) === id)) || - false - ); -}; diff --git a/system/websocket_test/node_modules/es5-ext/date/is-time-value.js b/system/websocket_test/node_modules/es5-ext/date/is-time-value.js deleted file mode 100644 index 0deb0b9..0000000 --- a/system/websocket_test/node_modules/es5-ext/date/is-time-value.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -module.exports = function (value) { - try { value = Number(value); } - catch (e) { return false; } - if (isNaN(value)) return false; - if (Math.abs(value) > 8.64e15) return false; - return true; -}; diff --git a/system/websocket_test/node_modules/es5-ext/date/valid-date.js b/system/websocket_test/node_modules/es5-ext/date/valid-date.js deleted file mode 100644 index 0c73dc5..0000000 --- a/system/websocket_test/node_modules/es5-ext/date/valid-date.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var isDate = require("./is-date"); - -module.exports = function (value) { - if (!isDate(value)) throw new TypeError(value + " is not valid Date object"); - return value; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/error/\043/index.js" "b/system/websocket_test/node_modules/es5-ext/error/\043/index.js" deleted file mode 100644 index 973a9d4..0000000 --- "a/system/websocket_test/node_modules/es5-ext/error/\043/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = { throw: require("./throw") }; diff --git "a/system/websocket_test/node_modules/es5-ext/error/\043/throw.js" "b/system/websocket_test/node_modules/es5-ext/error/\043/throw.js" deleted file mode 100644 index 3eb196d..0000000 --- "a/system/websocket_test/node_modules/es5-ext/error/\043/throw.js" +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var error = require("../valid-error"); - -module.exports = function () { throw error(this); }; diff --git a/system/websocket_test/node_modules/es5-ext/error/custom.js b/system/websocket_test/node_modules/es5-ext/error/custom.js deleted file mode 100644 index 22ea5d8..0000000 --- a/system/websocket_test/node_modules/es5-ext/error/custom.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -var assign = require("../object/assign") - , isObject = require("../object/is-object") - , isValue = require("../object/is-value") - , captureStackTrace = Error.captureStackTrace; - -module.exports = function (message /*, code, ext*/) { - var err = new Error(message), code = arguments[1], ext = arguments[2]; - if (!isValue(ext)) { - if (isObject(code)) { - ext = code; - code = null; - } - } - if (isValue(ext)) assign(err, ext); - if (isValue(code)) err.code = code; - if (captureStackTrace) captureStackTrace(err, module.exports); - return err; -}; diff --git a/system/websocket_test/node_modules/es5-ext/error/index.js b/system/websocket_test/node_modules/es5-ext/error/index.js deleted file mode 100644 index cb7054a..0000000 --- a/system/websocket_test/node_modules/es5-ext/error/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -module.exports = { - "#": require("./#"), - "custom": require("./custom"), - "isError": require("./is-error"), - "validError": require("./valid-error") -}; diff --git a/system/websocket_test/node_modules/es5-ext/error/is-error.js b/system/websocket_test/node_modules/es5-ext/error/is-error.js deleted file mode 100644 index aad67ed..0000000 --- a/system/websocket_test/node_modules/es5-ext/error/is-error.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var objToString = Object.prototype.toString, id = objToString.call(new Error()); - -module.exports = function (value) { - return (value && (value instanceof Error || objToString.call(value) === id)) || false; -}; diff --git a/system/websocket_test/node_modules/es5-ext/error/valid-error.js b/system/websocket_test/node_modules/es5-ext/error/valid-error.js deleted file mode 100644 index 432f7ba..0000000 --- a/system/websocket_test/node_modules/es5-ext/error/valid-error.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var isError = require("./is-error"); - -module.exports = function (value) { - if (!isError(value)) throw new TypeError(value + " is not an Error object"); - return value; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/function/\043/compose.js" "b/system/websocket_test/node_modules/es5-ext/function/\043/compose.js" deleted file mode 100644 index d16b2b1..0000000 --- "a/system/websocket_test/node_modules/es5-ext/function/\043/compose.js" +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -var isValue = require("../../object/is-value") - , callable = require("../../object/valid-callable") - , aFrom = require("../../array/from"); - -var apply = Function.prototype.apply - , call = Function.prototype.call - , callFn = function (arg, fn) { return call.call(fn, this, arg); }; - -module.exports = function (fnIgnored /*, …fnn*/) { - var fns, first; - var args = aFrom(arguments); - fns = isValue(this) ? [this].concat(args) : args; - fns.forEach(callable); - fns = fns.reverse(); - first = fns[0]; - fns = fns.slice(1); - return function (argIgnored) { return fns.reduce(callFn, apply.call(first, this, arguments)); }; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/function/\043/copy.js" "b/system/websocket_test/node_modules/es5-ext/function/\043/copy.js" deleted file mode 100644 index 897207b..0000000 --- "a/system/websocket_test/node_modules/es5-ext/function/\043/copy.js" +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var mixin = require("../../object/mixin") - , validFunction = require("../valid-function"); - -module.exports = function () { - validFunction(this); - - var args = []; - for (var i = 0; i < this.length; ++i) args.push("arg" + (i + 1)); - // eslint-disable-next-line no-new-func - var fn = new Function( - "fn", - "return function " + - (this.name || "") + - "(" + - args.join(", ") + - ") { return fn.apply(this, arguments); };" - )(this); - try { mixin(fn, this); } - catch (ignore) {} - return fn; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/function/\043/curry.js" "b/system/websocket_test/node_modules/es5-ext/function/\043/curry.js" deleted file mode 100644 index 9296458..0000000 --- "a/system/websocket_test/node_modules/es5-ext/function/\043/curry.js" +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -var toPosInt = require("../../number/to-pos-integer") - , callable = require("../../object/valid-callable") - , defineLength = require("../_define-length") - , slice = Array.prototype.slice - , apply = Function.prototype.apply - , curry; - -curry = function self(fn, length, preArgs) { - return defineLength( - function () { - var args = preArgs - ? preArgs.concat(slice.call(arguments, 0, length - preArgs.length)) - : slice.call(arguments, 0, length); - return args.length === length ? apply.call(fn, this, args) : self(fn, length, args); - }, - preArgs ? length - preArgs.length : length - ); -}; - -module.exports = function (/* Length*/) { - var length = arguments[0]; - return curry(callable(this), isNaN(length) ? toPosInt(this.length) : toPosInt(length)); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/function/\043/index.js" "b/system/websocket_test/node_modules/es5-ext/function/\043/index.js" deleted file mode 100644 index 02ae9f4..0000000 --- "a/system/websocket_test/node_modules/es5-ext/function/\043/index.js" +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -module.exports = { - compose: require("./compose"), - copy: require("./copy"), - curry: require("./curry"), - lock: require("./lock"), - microtaskDelay: require("./microtask-delay"), - not: require("./not"), - partial: require("./partial"), - spread: require("./spread"), - toStringTokens: require("./to-string-tokens") -}; diff --git "a/system/websocket_test/node_modules/es5-ext/function/\043/lock.js" "b/system/websocket_test/node_modules/es5-ext/function/\043/lock.js" deleted file mode 100644 index afd83b9..0000000 --- "a/system/websocket_test/node_modules/es5-ext/function/\043/lock.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var callable = require("../../object/valid-callable") - , apply = Function.prototype.apply; - -module.exports = function (/* …args*/) { - var fn = callable(this), args = arguments; - - return function () { return apply.call(fn, this, args); }; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/function/\043/microtask-delay.js" "b/system/websocket_test/node_modules/es5-ext/function/\043/microtask-delay.js" deleted file mode 100644 index 3741ebe..0000000 --- "a/system/websocket_test/node_modules/es5-ext/function/\043/microtask-delay.js" +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var ensurePlainFunction = require("../../object/ensure-plain-function") - , defineLength = require("../_define-length") - , nextTick = require("next-tick"); - -var apply = Function.prototype.apply; - -module.exports = function () { - var src = ensurePlainFunction(this); - return defineLength(function () { nextTick(apply.bind(src, this, arguments)); }, this.length); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/function/\043/not.js" "b/system/websocket_test/node_modules/es5-ext/function/\043/not.js" deleted file mode 100644 index b3b7d62..0000000 --- "a/system/websocket_test/node_modules/es5-ext/function/\043/not.js" +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var callable = require("../../object/valid-callable") - , defineLength = require("../_define-length") - , apply = Function.prototype.apply; - -module.exports = function () { - var fn = callable(this); - - return defineLength(function () { return !apply.call(fn, this, arguments); }, fn.length); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/function/\043/partial.js" "b/system/websocket_test/node_modules/es5-ext/function/\043/partial.js" deleted file mode 100644 index 8f09c4f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/function/\043/partial.js" +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var callable = require("../../object/valid-callable") - , aFrom = require("../../array/from") - , defineLength = require("../_define-length") - , apply = Function.prototype.apply; - -module.exports = function (/* …args*/) { - var fn = callable(this), args = aFrom(arguments); - - return defineLength(function () { - return apply.call(fn, this, args.concat(aFrom(arguments))); - }, fn.length - args.length); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/function/\043/spread.js" "b/system/websocket_test/node_modules/es5-ext/function/\043/spread.js" deleted file mode 100644 index 555d991..0000000 --- "a/system/websocket_test/node_modules/es5-ext/function/\043/spread.js" +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var callable = require("../../object/valid-callable") - , apply = Function.prototype.apply; - -module.exports = function () { - var fn = callable(this); - return function (args) { return apply.call(fn, this, args); }; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/function/\043/to-string-tokens.js" "b/system/websocket_test/node_modules/es5-ext/function/\043/to-string-tokens.js" deleted file mode 100644 index b35f51d..0000000 --- "a/system/websocket_test/node_modules/es5-ext/function/\043/to-string-tokens.js" +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -var isValue = require("../../object/is-value") - , esniff = require("esniff") - , validFunction = require("../valid-function"); - -var classRe = /^\s*class[\s{/}]/; - -module.exports = function () { - var str = String(validFunction(this)); - if (classRe.test(str)) throw new Error("Class methods are not supported"); - - var argsStartIndex - , argsEndIndex - , bodyStartIndex - , bodyEndReverseIndex = -1 - , shouldTrimArgs = false; - - esniff(str, function (emitter, accessor) { - emitter.once("trigger:(", function () { argsStartIndex = accessor.index + 1; }); - emitter.once("trigger:=", function () { - if (isValue(argsStartIndex)) return; - argsStartIndex = 0; - argsEndIndex = accessor.index; - shouldTrimArgs = true; - if (!accessor.skipCodePart("=>")) { - throw new Error("Unexpected function string: " + str); - } - accessor.skipWhitespace(); - if (!accessor.skipCodePart("{")) bodyEndReverseIndex = Infinity; - bodyStartIndex = accessor.index; - }); - emitter.on("trigger:)", function () { - if (accessor.scopeDepth) return; - argsEndIndex = accessor.index; - accessor.skipCodePart(")"); - accessor.skipWhitespace(); - if (accessor.skipCodePart("=>")) { - accessor.skipWhitespace(); - if (!accessor.skipCodePart("{")) bodyEndReverseIndex = Infinity; - } else if (!accessor.skipCodePart("{")) { - throw new Error("Unexpected function string: " + str); - } - bodyStartIndex = accessor.index; - accessor.stop(); - }); - }); - - var argsString = str.slice(argsStartIndex, argsEndIndex); - if (shouldTrimArgs) argsString = argsString.trim(); - return { args: argsString, body: str.slice(bodyStartIndex, bodyEndReverseIndex) }; -}; diff --git a/system/websocket_test/node_modules/es5-ext/function/_define-length.js b/system/websocket_test/node_modules/es5-ext/function/_define-length.js deleted file mode 100644 index d77a433..0000000 --- a/system/websocket_test/node_modules/es5-ext/function/_define-length.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; - -var toPosInt = require("../number/to-pos-integer"); - -var test = function (arg1, arg2) { return arg2; }; - -var desc, defineProperty, generate, mixin; - -try { - Object.defineProperty(test, "length", { - configurable: true, - writable: false, - enumerable: false, - value: 1 - }); -} -catch (ignore) {} - -if (test.length === 1) { - // ES6 - desc = { configurable: true, writable: false, enumerable: false }; - defineProperty = Object.defineProperty; - module.exports = function (fn, length) { - length = toPosInt(length); - if (fn.length === length) return fn; - desc.value = length; - return defineProperty(fn, "length", desc); - }; -} else { - mixin = require("../object/mixin"); - generate = (function () { - var cache = []; - return function (length) { - var args, i = 0; - if (cache[length]) return cache[length]; - args = []; - while (length--) args.push("a" + (++i).toString(36)); - // eslint-disable-next-line no-new-func - return new Function( - "fn", - "return function (" + args.join(", ") + ") { return fn.apply(this, arguments); };" - ); - }; - })(); - module.exports = function (src, length) { - var target; - length = toPosInt(length); - if (src.length === length) return src; - target = generate(length)(src); - try { mixin(target, src); } - catch (ignore) {} - return target; - }; -} diff --git a/system/websocket_test/node_modules/es5-ext/function/constant.js b/system/websocket_test/node_modules/es5-ext/function/constant.js deleted file mode 100644 index 79d81e4..0000000 --- a/system/websocket_test/node_modules/es5-ext/function/constant.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -module.exports = function (value) { - return function () { return value; }; -}; diff --git a/system/websocket_test/node_modules/es5-ext/function/identity.js b/system/websocket_test/node_modules/es5-ext/function/identity.js deleted file mode 100644 index cde213f..0000000 --- a/system/websocket_test/node_modules/es5-ext/function/identity.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = function (value) { return value; }; diff --git a/system/websocket_test/node_modules/es5-ext/function/index.js b/system/websocket_test/node_modules/es5-ext/function/index.js deleted file mode 100644 index 1574fbb..0000000 --- a/system/websocket_test/node_modules/es5-ext/function/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// Export all modules. - -"use strict"; - -module.exports = { - "#": require("./#"), - "constant": require("./constant"), - "identity": require("./identity"), - "invoke": require("./invoke"), - "isArguments": require("./is-arguments"), - "isFunction": require("./is-function"), - "noop": require("./noop"), - "pluck": require("./pluck"), - "validFunction": require("./valid-function") -}; diff --git a/system/websocket_test/node_modules/es5-ext/function/invoke.js b/system/websocket_test/node_modules/es5-ext/function/invoke.js deleted file mode 100644 index 8fdb32b..0000000 --- a/system/websocket_test/node_modules/es5-ext/function/invoke.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var isCallable = require("../object/is-callable") - , value = require("../object/valid-value") - , slice = Array.prototype.slice - , apply = Function.prototype.apply; - -module.exports = function (name /*, …args*/) { - var args = slice.call(arguments, 1), isFn = isCallable(name); - return function (obj) { - value(obj); - return apply.call(isFn ? name : obj[name], obj, args.concat(slice.call(arguments, 1))); - }; -}; diff --git a/system/websocket_test/node_modules/es5-ext/function/is-arguments.js b/system/websocket_test/node_modules/es5-ext/function/is-arguments.js deleted file mode 100644 index 833a747..0000000 --- a/system/websocket_test/node_modules/es5-ext/function/is-arguments.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var objToString = Object.prototype.toString - , id = objToString.call((function () { return arguments; })()); - -module.exports = function (value) { return objToString.call(value) === id; }; diff --git a/system/websocket_test/node_modules/es5-ext/function/is-function.js b/system/websocket_test/node_modules/es5-ext/function/is-function.js deleted file mode 100644 index 0d7cab3..0000000 --- a/system/websocket_test/node_modules/es5-ext/function/is-function.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var objToString = Object.prototype.toString - , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/); - -module.exports = function (value) { - return typeof value === "function" && isFunctionStringTag(objToString.call(value)); -}; diff --git a/system/websocket_test/node_modules/es5-ext/function/noop.js b/system/websocket_test/node_modules/es5-ext/function/noop.js deleted file mode 100644 index 6174f03..0000000 --- a/system/websocket_test/node_modules/es5-ext/function/noop.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; - -// eslint-disable-next-line no-empty-function -module.exports = function () {}; diff --git a/system/websocket_test/node_modules/es5-ext/function/pluck.js b/system/websocket_test/node_modules/es5-ext/function/pluck.js deleted file mode 100644 index 432cd46..0000000 --- a/system/websocket_test/node_modules/es5-ext/function/pluck.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var value = require("../object/valid-value"); - -module.exports = function (name) { - return function (obj) { return value(obj)[name]; }; -}; diff --git a/system/websocket_test/node_modules/es5-ext/function/valid-function.js b/system/websocket_test/node_modules/es5-ext/function/valid-function.js deleted file mode 100644 index 060bd64..0000000 --- a/system/websocket_test/node_modules/es5-ext/function/valid-function.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var isFunction = require("./is-function"); - -module.exports = function (value) { - if (!isFunction(value)) throw new TypeError(value + " is not a function"); - return value; -}; diff --git a/system/websocket_test/node_modules/es5-ext/global.js b/system/websocket_test/node_modules/es5-ext/global.js deleted file mode 100644 index 61071e6..0000000 --- a/system/websocket_test/node_modules/es5-ext/global.js +++ /dev/null @@ -1,35 +0,0 @@ -var naiveFallback = function () { - if (typeof self === "object" && self) return self; - if (typeof window === "object" && window) return window; - throw new Error("Unable to resolve global `this`"); -}; - -module.exports = (function () { - if (this) return this; - - // Unexpected strict mode (may happen if e.g. bundled into ESM module) - - // Fallback to standard globalThis if available - if (typeof globalThis === "object" && globalThis) return globalThis; - - // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis - // In all ES5+ engines global object inherits from Object.prototype - // (if you approached one that doesn't please report) - try { - Object.defineProperty(Object.prototype, "__global__", { - get: function () { return this; }, - configurable: true - }); - } catch (error) { - // Unfortunate case of updates to Object.prototype being restricted - // via preventExtensions, seal or freeze - return naiveFallback(); - } - try { - // Safari case (window.__global__ works, but __global__ does not) - if (!__global__) return naiveFallback(); - return __global__; - } finally { - delete Object.prototype.__global__; - } -})(); diff --git a/system/websocket_test/node_modules/es5-ext/index.js b/system/websocket_test/node_modules/es5-ext/index.js deleted file mode 100644 index 0919764..0000000 --- a/system/websocket_test/node_modules/es5-ext/index.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -module.exports = { - global: require("./global"), - optionalChaining: require("./optional-chaining"), - safeToString: require("./safe-to-string"), - toShortStringRepresentation: require("./to-short-string-representation"), - - array: require("./array"), - boolean: require("./boolean"), - date: require("./date"), - error: require("./error"), - function: require("./function"), - iterable: require("./iterable"), - json: require("./json"), - math: require("./math"), - number: require("./number"), - object: require("./object"), - promise: require("./promise"), - regExp: require("./reg-exp"), - string: require("./string") -}; diff --git a/system/websocket_test/node_modules/es5-ext/iterable/for-each.js b/system/websocket_test/node_modules/es5-ext/iterable/for-each.js deleted file mode 100644 index 9157f65..0000000 --- a/system/websocket_test/node_modules/es5-ext/iterable/for-each.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var forOf = require("es6-iterator/for-of") - , isIterable = require("es6-iterator/is-iterable") - , iterable = require("./validate") - , forEach = Array.prototype.forEach; - -module.exports = function (target, cb /*, thisArg*/) { - if (isIterable(iterable(target))) forOf(target, cb, arguments[2]); - else forEach.call(target, cb, arguments[2]); -}; diff --git a/system/websocket_test/node_modules/es5-ext/iterable/index.js b/system/websocket_test/node_modules/es5-ext/iterable/index.js deleted file mode 100644 index 4b898fc..0000000 --- a/system/websocket_test/node_modules/es5-ext/iterable/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -module.exports = { - forEach: require("./for-each"), - is: require("./is"), - validate: require("./validate"), - validateObject: require("./validate-object") -}; diff --git a/system/websocket_test/node_modules/es5-ext/iterable/is.js b/system/websocket_test/node_modules/es5-ext/iterable/is.js deleted file mode 100644 index aa5a9b9..0000000 --- a/system/websocket_test/node_modules/es5-ext/iterable/is.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var iteratorSymbol = require("es6-symbol").iterator - , isValue = require("../object/is-value") - , isArrayLike = require("../object/is-array-like"); - -module.exports = function (value) { - if (!isValue(value)) return false; - if (typeof value[iteratorSymbol] === "function") return true; - return isArrayLike(value); -}; diff --git a/system/websocket_test/node_modules/es5-ext/iterable/validate-object.js b/system/websocket_test/node_modules/es5-ext/iterable/validate-object.js deleted file mode 100644 index 26e622b..0000000 --- a/system/websocket_test/node_modules/es5-ext/iterable/validate-object.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var isObject = require("../object/is-object") - , is = require("./is"); - -module.exports = function (value) { - if (is(value) && isObject(value)) return value; - throw new TypeError(value + " is not an iterable or array-like object"); -}; diff --git a/system/websocket_test/node_modules/es5-ext/iterable/validate.js b/system/websocket_test/node_modules/es5-ext/iterable/validate.js deleted file mode 100644 index 94a91c4..0000000 --- a/system/websocket_test/node_modules/es5-ext/iterable/validate.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var is = require("./is"); - -module.exports = function (value) { - if (is(value)) return value; - throw new TypeError(value + " is not an iterable or array-like"); -}; diff --git a/system/websocket_test/node_modules/es5-ext/json/index.js b/system/websocket_test/node_modules/es5-ext/json/index.js deleted file mode 100644 index d26ac56..0000000 --- a/system/websocket_test/node_modules/es5-ext/json/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = { safeStringify: require("./safe-stringify") }; diff --git a/system/websocket_test/node_modules/es5-ext/json/safe-stringify.js b/system/websocket_test/node_modules/es5-ext/json/safe-stringify.js deleted file mode 100644 index 28169f1..0000000 --- a/system/websocket_test/node_modules/es5-ext/json/safe-stringify.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; - -var compact = require("../array/#/compact") - , isObject = require("../object/is-object") - , toArray = require("../object/to-array") - , isArray = Array.isArray - , stringify = JSON.stringify; - -module.exports = function self(value /*, replacer, space*/) { - var replacer = arguments[1], space = arguments[2]; - try { - return stringify(value, replacer, space); - } catch (e) { - if (!isObject(value)) return null; - if (typeof value.toJSON === "function") return null; - if (isArray(value)) { - return ( - "[" + - compact.call(value.map(function (item) { return self(item, replacer, space); })) + - "]" - ); - } - return ( - "{" + - compact - .call( - toArray(value, function (item, key) { - item = self(item, replacer, space); - if (!item) return null; - return stringify(key) + ":" + item; - }) - ) - .join(",") + - "}" - ); - } -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/_decimal-adjust.js b/system/websocket_test/node_modules/es5-ext/math/_decimal-adjust.js deleted file mode 100644 index c6374d6..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/_decimal-adjust.js +++ /dev/null @@ -1,29 +0,0 @@ -// Credit: -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round -// #Decimal_rounding - -"use strict"; - -var isValue = require("../object/is-value") - , ensureInteger = require("../object/ensure-integer"); - -var split = String.prototype.split; - -module.exports = function (type) { - return function (value /*, exp*/) { - value = Number(value); - var exp = arguments[1]; - if (isValue(exp)) exp = ensureInteger(exp); - if (!value) return value; - if (!exp) return Math[type](value); - if (!isFinite(value)) return value; - - // Shift - var tokens = split.call(value, "e"); - value = Math[type](tokens[0] + "e" + ((tokens[1] || 0) - exp)); - - // Shift back - tokens = value.toString().split("e"); - return Number(tokens[0] + "e" + (Number(tokens[1] || 0) + exp)); - }; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/_pack-ieee754.js b/system/websocket_test/node_modules/es5-ext/math/_pack-ieee754.js deleted file mode 100644 index b3edf8d..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/_pack-ieee754.js +++ /dev/null @@ -1,88 +0,0 @@ -/* eslint no-bitwise: "off" */ -// Credit: https://github.com/paulmillr/es6-shim/ - -"use strict"; - -var abs = Math.abs - , floor = Math.floor - , log = Math.log - , min = Math.min - , pow = Math.pow - , LN2 = Math.LN2 - , roundToEven; - -roundToEven = function (num) { - var whole = floor(num), fraction = num - whole; - if (fraction < 0.5) return whole; - if (fraction > 0.5) return whole + 1; - return whole % 2 ? whole + 1 : whole; -}; - -// eslint-disable-next-line max-statements, max-lines-per-function -module.exports = function (value, ebits, fbits) { - var bias = (1 << (ebits - 1)) - 1, sign, e, fraction, i, bits, str, bytes; - - // Compute sign, exponent, fraction - if (isNaN(value)) { - // NaN - // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping - e = (1 << ebits) - 1; - fraction = pow(2, fbits - 1); - sign = 0; - } else if (value === Infinity || value === -Infinity) { - e = (1 << ebits) - 1; - fraction = 0; - sign = value < 0 ? 1 : 0; - } else if (value === 0) { - e = 0; - fraction = 0; - sign = 1 / value === -Infinity ? 1 : 0; - } else { - sign = value < 0; - value = abs(value); - - if (value >= pow(2, 1 - bias)) { - e = min(floor(log(value) / LN2), 1023); - fraction = roundToEven((value / pow(2, e)) * pow(2, fbits)); - if (fraction / pow(2, fbits) >= 2) { - e += 1; - fraction = 1; - } - if (e > bias) { - // Overflow - e = (1 << ebits) - 1; - fraction = 0; - } else { - // Normal - e += bias; - fraction -= pow(2, fbits); - } - } else { - // Subnormal - e = 0; - fraction = roundToEven(value / pow(2, 1 - bias - fbits)); - } - } - - // Pack sign, exponent, fraction - bits = []; - for (i = fbits; i; i -= 1) { - bits.push(fraction % 2 ? 1 : 0); - fraction = floor(fraction / 2); - } - for (i = ebits; i; i -= 1) { - bits.push(e % 2 ? 1 : 0); - e = floor(e / 2); - } - bits.push(sign ? 1 : 0); - bits.reverse(); - str = bits.join(""); - - // Bits to bytes - bytes = []; - while (str.length) { - bytes.push(parseInt(str.substring(0, 8), 2)); - str = str.substring(8); - } - return bytes; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/_unpack-ieee754.js b/system/websocket_test/node_modules/es5-ext/math/_unpack-ieee754.js deleted file mode 100644 index 83fa947..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/_unpack-ieee754.js +++ /dev/null @@ -1,33 +0,0 @@ -/* eslint no-bitwise: "off" */ -// Credit: https://github.com/paulmillr/es6-shim/ - -"use strict"; - -var pow = Math.pow; - -module.exports = function (bytes, ebits, fbits) { - // Bytes to bits - var bits = [], i, j, bit, str, bias, sign, e, fraction; - - for (i = bytes.length; i; i -= 1) { - bit = bytes[i - 1]; - for (j = 8; j; j -= 1) { - bits.push(bit % 2 ? 1 : 0); - bit >>= 1; - } - } - bits.reverse(); - str = bits.join(""); - - // Unpack sign, exponent, fraction - bias = (1 << (ebits - 1)) - 1; - sign = parseInt(str.substring(0, 1), 2) ? -1 : 1; - e = parseInt(str.substring(1, 1 + ebits), 2); - fraction = parseInt(str.substring(1 + ebits), 2); - - // Produce number - if (e === (1 << ebits) - 1) return fraction === 0 ? sign * Infinity : NaN; - if (e > 0) return sign * pow(2, e - bias) * (1 + fraction / pow(2, fbits)); - if (fraction !== 0) return sign * pow(2, -(bias - 1)) * (fraction / pow(2, fbits)); - return sign < 0 ? -0 : 0; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/acosh/implement.js b/system/websocket_test/node_modules/es5-ext/math/acosh/implement.js deleted file mode 100644 index 9e4582f..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/acosh/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "acosh", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/acosh/index.js b/system/websocket_test/node_modules/es5-ext/math/acosh/index.js deleted file mode 100644 index da176cb..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/acosh/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.acosh : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/acosh/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/acosh/is-implemented.js deleted file mode 100644 index 2e97301..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/acosh/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var acosh = Math.acosh; - if (typeof acosh !== "function") return false; - return acosh(2) === 1.3169578969248166; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/acosh/shim.js b/system/websocket_test/node_modules/es5-ext/math/acosh/shim.js deleted file mode 100644 index 3e632ff..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/acosh/shim.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var log = Math.log, sqrt = Math.sqrt; - -module.exports = function (value) { - if (isNaN(value)) return NaN; - value = Number(value); - if (value < 1) return NaN; - if (value === 1) return 0; - if (value === Infinity) return value; - return log(value + sqrt(value * value - 1)); -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/asinh/implement.js b/system/websocket_test/node_modules/es5-ext/math/asinh/implement.js deleted file mode 100644 index 1c0d7e4..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/asinh/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "asinh", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/asinh/index.js b/system/websocket_test/node_modules/es5-ext/math/asinh/index.js deleted file mode 100644 index 8ca3026..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/asinh/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.asinh : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/asinh/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/asinh/is-implemented.js deleted file mode 100644 index a7e0f20..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/asinh/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var asinh = Math.asinh; - if (typeof asinh !== "function") return false; - return asinh(2) === 1.4436354751788103; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/asinh/shim.js b/system/websocket_test/node_modules/es5-ext/math/asinh/shim.js deleted file mode 100644 index 30ce2e4..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/asinh/shim.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var log = Math.log, sqrt = Math.sqrt; - -module.exports = function (value) { - if (isNaN(value)) return NaN; - value = Number(value); - if (value === 0) return value; - if (!isFinite(value)) return value; - if (value < 0) { - value = -value; - return -log(value + sqrt(value * value + 1)); - } - return log(value + sqrt(value * value + 1)); -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/atanh/implement.js b/system/websocket_test/node_modules/es5-ext/math/atanh/implement.js deleted file mode 100644 index 53f5871..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/atanh/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "atanh", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/atanh/index.js b/system/websocket_test/node_modules/es5-ext/math/atanh/index.js deleted file mode 100644 index feff0a7..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/atanh/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.atanh : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/atanh/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/atanh/is-implemented.js deleted file mode 100644 index 4787c4f..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/atanh/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var atanh = Math.atanh; - if (typeof atanh !== "function") return false; - return Math.round(atanh(0.5) * 1e15) === 549306144334055; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/atanh/shim.js b/system/websocket_test/node_modules/es5-ext/math/atanh/shim.js deleted file mode 100644 index 9383e97..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/atanh/shim.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var log = Math.log; - -module.exports = function (value) { - if (isNaN(value)) return NaN; - value = Number(value); - if (value < -1) return NaN; - if (value > 1) return NaN; - if (value === -1) return -Infinity; - if (value === 1) return Infinity; - if (value === 0) return value; - return 0.5 * log((1 + value) / (1 - value)); -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/cbrt/implement.js b/system/websocket_test/node_modules/es5-ext/math/cbrt/implement.js deleted file mode 100644 index 826314c..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/cbrt/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "cbrt", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/cbrt/index.js b/system/websocket_test/node_modules/es5-ext/math/cbrt/index.js deleted file mode 100644 index a6c71c6..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/cbrt/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.cbrt : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/cbrt/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/cbrt/is-implemented.js deleted file mode 100644 index a8ac0db..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/cbrt/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var cbrt = Math.cbrt; - if (typeof cbrt !== "function") return false; - return cbrt(2) === 1.2599210498948732; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/cbrt/shim.js b/system/websocket_test/node_modules/es5-ext/math/cbrt/shim.js deleted file mode 100644 index 8871c55..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/cbrt/shim.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var pow = Math.pow; - -module.exports = function (value) { - if (isNaN(value)) return NaN; - value = Number(value); - if (value === 0) return value; - if (!isFinite(value)) return value; - if (value < 0) return -pow(-value, 1 / 3); - return pow(value, 1 / 3); -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/ceil-10.js b/system/websocket_test/node_modules/es5-ext/math/ceil-10.js deleted file mode 100644 index 351221f..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/ceil-10.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./_decimal-adjust")("ceil"); diff --git a/system/websocket_test/node_modules/es5-ext/math/clz32/implement.js b/system/websocket_test/node_modules/es5-ext/math/clz32/implement.js deleted file mode 100644 index 70562df..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/clz32/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "clz32", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/clz32/index.js b/system/websocket_test/node_modules/es5-ext/math/clz32/index.js deleted file mode 100644 index 2380335..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/clz32/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.clz32 : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/clz32/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/clz32/is-implemented.js deleted file mode 100644 index ee6d882..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/clz32/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var clz32 = Math.clz32; - if (typeof clz32 !== "function") return false; - return clz32(1000) === 22; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/clz32/shim.js b/system/websocket_test/node_modules/es5-ext/math/clz32/shim.js deleted file mode 100644 index 2b526c2..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/clz32/shim.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function (value) { - // eslint-disable-next-line no-bitwise - value >>>= 0; - return value ? 32 - value.toString(2).length : 32; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/cosh/implement.js b/system/websocket_test/node_modules/es5-ext/math/cosh/implement.js deleted file mode 100644 index 74e7eea..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/cosh/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "cosh", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/cosh/index.js b/system/websocket_test/node_modules/es5-ext/math/cosh/index.js deleted file mode 100644 index c7a7167..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/cosh/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.cosh : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/cosh/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/cosh/is-implemented.js deleted file mode 100644 index 7173054..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/cosh/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var cosh = Math.cosh; - if (typeof cosh !== "function") return false; - return cosh(1) === 1.5430806348152437; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/cosh/shim.js b/system/websocket_test/node_modules/es5-ext/math/cosh/shim.js deleted file mode 100644 index c762c84..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/cosh/shim.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var exp = Math.exp; - -module.exports = function (value) { - if (isNaN(value)) return NaN; - value = Number(value); - if (value === 0) return 1; - if (!isFinite(value)) return Infinity; - return (exp(value) + exp(-value)) / 2; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/expm1/implement.js b/system/websocket_test/node_modules/es5-ext/math/expm1/implement.js deleted file mode 100644 index 9739bf5..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/expm1/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "expm1", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/expm1/index.js b/system/websocket_test/node_modules/es5-ext/math/expm1/index.js deleted file mode 100644 index daf4395..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/expm1/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.expm1 : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/expm1/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/expm1/is-implemented.js deleted file mode 100644 index dfd056e..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/expm1/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var expm1 = Math.expm1; - if (typeof expm1 !== "function") return false; - return expm1(1).toFixed(15) === "1.718281828459045"; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/expm1/shim.js b/system/websocket_test/node_modules/es5-ext/math/expm1/shim.js deleted file mode 100644 index 6daf2bf..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/expm1/shim.js +++ /dev/null @@ -1,16 +0,0 @@ -// Thanks: https://github.com/monolithed/ECMAScript-6 - -"use strict"; - -var exp = Math.exp; - -module.exports = function (value) { - if (isNaN(value)) return NaN; - value = Number(value); - if (value === 0) return value; - if (value === Infinity) return Infinity; - if (value === -Infinity) return -1; - - if (value > -1.0e-6 && value < 1.0e-6) return value + (value * value) / 2; - return exp(value) - 1; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/floor-10.js b/system/websocket_test/node_modules/es5-ext/math/floor-10.js deleted file mode 100644 index 3cb0c11..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/floor-10.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./_decimal-adjust")("floor"); diff --git a/system/websocket_test/node_modules/es5-ext/math/fround/implement.js b/system/websocket_test/node_modules/es5-ext/math/fround/implement.js deleted file mode 100644 index 9ce9cf2..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/fround/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "fround", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/fround/index.js b/system/websocket_test/node_modules/es5-ext/math/fround/index.js deleted file mode 100644 index 9f0dbc0..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/fround/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.fround : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/fround/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/fround/is-implemented.js deleted file mode 100644 index ad2b705..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/fround/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var fround = Math.fround; - if (typeof fround !== "function") return false; - return fround(1.337) === 1.3370000123977661; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/fround/shim.js b/system/websocket_test/node_modules/es5-ext/math/fround/shim.js deleted file mode 100644 index b0dfaab..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/fround/shim.js +++ /dev/null @@ -1,33 +0,0 @@ -/* global Float32Array */ - -// Credit: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js - -"use strict"; - -var toFloat32; - -if (typeof Float32Array === "undefined") { - toFloat32 = (function () { - var pack = require("../_pack-ieee754") - , unpack = require("../_unpack-ieee754"); - - return function (value) { return unpack(pack(value, 8, 23), 8, 23); }; - })(); -} else { - toFloat32 = (function () { - var float32Array = new Float32Array(1); - return function (num) { - float32Array[0] = num; - return float32Array[0]; - }; - })(); -} - -module.exports = function (value) { - if (isNaN(value)) return NaN; - value = Number(value); - if (value === 0) return value; - if (!isFinite(value)) return value; - - return toFloat32(value); -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/hypot/implement.js b/system/websocket_test/node_modules/es5-ext/math/hypot/implement.js deleted file mode 100644 index e051add..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/hypot/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "hypot", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/hypot/index.js b/system/websocket_test/node_modules/es5-ext/math/hypot/index.js deleted file mode 100644 index f8de46b..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/hypot/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.hypot : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/hypot/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/hypot/is-implemented.js deleted file mode 100644 index d317bc7..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/hypot/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var hypot = Math.hypot; - if (typeof hypot !== "function") return false; - return hypot(3, 4) === 5; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/hypot/shim.js b/system/websocket_test/node_modules/es5-ext/math/hypot/shim.js deleted file mode 100644 index 2d0eec7..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/hypot/shim.js +++ /dev/null @@ -1,37 +0,0 @@ -// Thanks for hints: https://github.com/paulmillr/es6-shim - -"use strict"; - -var some = Array.prototype.some - , abs = Math.abs - , sqrt = Math.sqrt - , compare = function (val1, val2) { return val2 - val1; } - , divide = function (value) { return value / this; } - , add = function (sum, number) { return sum + number * number; }; - -// eslint-disable-next-line no-unused-vars -module.exports = function (val1, val2 /*, …valn*/) { - var result, numbers; - if (!arguments.length) return 0; - some.call(arguments, function (val) { - if (isNaN(val)) { - result = NaN; - return false; - } - if (!isFinite(val)) { - result = Infinity; - return true; - } - if (result !== undefined) return false; - val = Number(val); - if (val === 0) return false; - if (numbers) numbers.push(abs(val)); - else numbers = [abs(val)]; - return false; - }); - if (result !== undefined) return result; - if (!numbers) return 0; - - numbers.sort(compare); - return numbers[0] * sqrt(numbers.map(divide, numbers[0]).reduce(add, 0)); -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/imul/implement.js b/system/websocket_test/node_modules/es5-ext/math/imul/implement.js deleted file mode 100644 index 3aff479..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/imul/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "imul", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/imul/index.js b/system/websocket_test/node_modules/es5-ext/math/imul/index.js deleted file mode 100644 index 969124c..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/imul/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.imul : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/imul/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/imul/is-implemented.js deleted file mode 100644 index 0f32919..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/imul/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var imul = Math.imul; - if (typeof imul !== "function") return false; - return imul(-1, 8) === -8; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/imul/shim.js b/system/websocket_test/node_modules/es5-ext/math/imul/shim.js deleted file mode 100644 index 7511707..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/imul/shim.js +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint no-bitwise: "off" */ - -// Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference -// /Global_Objects/Math/imul - -"use strict"; - -module.exports = function (val1, val2) { - var xh = (val1 >>> 16) & 0xffff - , xl = val1 & 0xffff - , yh = (val2 >>> 16) & 0xffff - , yl = val2 & 0xffff; - - // The shift by 0 fixes the sign on the high part - // the final |0 converts the unsigned value into a signed value - return (xl * yl + (((xh * yl + xl * yh) << 16) >>> 0)) | 0; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/index.js b/system/websocket_test/node_modules/es5-ext/math/index.js deleted file mode 100644 index a59269c..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -module.exports = { - acosh: require("./acosh"), - asinh: require("./asinh"), - atanh: require("./atanh"), - cbrt: require("./cbrt"), - ceil10: require("./ceil-10"), - clz32: require("./clz32"), - cosh: require("./cosh"), - expm1: require("./expm1"), - floor10: require("./floor-10"), - fround: require("./fround"), - hypot: require("./hypot"), - imul: require("./imul"), - log10: require("./log10"), - log2: require("./log2"), - log1p: require("./log1p"), - round10: require("./round-10"), - sign: require("./sign"), - sinh: require("./sinh"), - tanh: require("./tanh"), - trunc: require("./trunc") -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/log10/implement.js b/system/websocket_test/node_modules/es5-ext/math/log10/implement.js deleted file mode 100644 index f6153c1..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/log10/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "log10", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/log10/index.js b/system/websocket_test/node_modules/es5-ext/math/log10/index.js deleted file mode 100644 index abda55b..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/log10/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.log10 : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/log10/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/log10/is-implemented.js deleted file mode 100644 index f221759..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/log10/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var log10 = Math.log10; - if (typeof log10 !== "function") return false; - return log10(2) === 0.3010299956639812; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/log10/shim.js b/system/websocket_test/node_modules/es5-ext/math/log10/shim.js deleted file mode 100644 index e8599a2..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/log10/shim.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var log = Math.log, LOG10E = Math.LOG10E; - -module.exports = function (value) { - if (isNaN(value)) return NaN; - value = Number(value); - if (value < 0) return NaN; - if (value === 0) return -Infinity; - if (value === 1) return 0; - if (value === Infinity) return Infinity; - - return log(value) * LOG10E; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/log1p/implement.js b/system/websocket_test/node_modules/es5-ext/math/log1p/implement.js deleted file mode 100644 index 21e94e6..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/log1p/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "log1p", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/log1p/index.js b/system/websocket_test/node_modules/es5-ext/math/log1p/index.js deleted file mode 100644 index 76eacc5..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/log1p/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.log1p : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/log1p/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/log1p/is-implemented.js deleted file mode 100644 index 7626ab4..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/log1p/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var log1p = Math.log1p; - if (typeof log1p !== "function") return false; - return log1p(1) === 0.6931471805599453; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/log1p/shim.js b/system/websocket_test/node_modules/es5-ext/math/log1p/shim.js deleted file mode 100644 index 15f1182..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/log1p/shim.js +++ /dev/null @@ -1,17 +0,0 @@ -// Thanks: https://github.com/monolithed/ECMAScript-6/blob/master/ES6.js - -"use strict"; - -var log = Math.log; - -module.exports = function (value) { - if (isNaN(value)) return NaN; - value = Number(value); - if (value < -1) return NaN; - if (value === -1) return -Infinity; - if (value === 0) return value; - if (value === Infinity) return Infinity; - - if (value > -1.0e-8 && value < 1.0e-8) return value - (value * value) / 2; - return log(1 + value); -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/log2/implement.js b/system/websocket_test/node_modules/es5-ext/math/log2/implement.js deleted file mode 100644 index 91c06b1..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/log2/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "log2", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/log2/index.js b/system/websocket_test/node_modules/es5-ext/math/log2/index.js deleted file mode 100644 index a561977..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/log2/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.log2 : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/log2/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/log2/is-implemented.js deleted file mode 100644 index c70963f..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/log2/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var log2 = Math.log2; - if (typeof log2 !== "function") return false; - return log2(3).toFixed(15) === "1.584962500721156"; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/log2/shim.js b/system/websocket_test/node_modules/es5-ext/math/log2/shim.js deleted file mode 100644 index 51fcdae..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/log2/shim.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var log = Math.log, LOG2E = Math.LOG2E; - -module.exports = function (value) { - if (isNaN(value)) return NaN; - value = Number(value); - if (value < 0) return NaN; - if (value === 0) return -Infinity; - if (value === 1) return 0; - if (value === Infinity) return Infinity; - - return log(value) * LOG2E; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/round-10.js b/system/websocket_test/node_modules/es5-ext/math/round-10.js deleted file mode 100644 index 228c235..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/round-10.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./_decimal-adjust")("round"); diff --git a/system/websocket_test/node_modules/es5-ext/math/sign/implement.js b/system/websocket_test/node_modules/es5-ext/math/sign/implement.js deleted file mode 100644 index daf1769..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/sign/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "sign", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/sign/index.js b/system/websocket_test/node_modules/es5-ext/math/sign/index.js deleted file mode 100644 index d2659cb..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/sign/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.sign : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/sign/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/sign/is-implemented.js deleted file mode 100644 index 4318cf2..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/sign/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var sign = Math.sign; - if (typeof sign !== "function") return false; - return sign(10) === 1 && sign(-20) === -1; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/sign/shim.js b/system/websocket_test/node_modules/es5-ext/math/sign/shim.js deleted file mode 100644 index 9acb495..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/sign/shim.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function (value) { - value = Number(value); - if (isNaN(value) || value === 0) return value; - return value > 0 ? 1 : -1; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/sinh/implement.js b/system/websocket_test/node_modules/es5-ext/math/sinh/implement.js deleted file mode 100644 index 4655f6b..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/sinh/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "sinh", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/sinh/index.js b/system/websocket_test/node_modules/es5-ext/math/sinh/index.js deleted file mode 100644 index 107ef2e..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/sinh/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.sinh : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/sinh/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/sinh/is-implemented.js deleted file mode 100644 index aad22b0..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/sinh/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var sinh = Math.sinh; - if (typeof sinh !== "function") return false; - return sinh(1) === 1.1752011936438014 && sinh(Number.MIN_VALUE) === 5e-324; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/sinh/shim.js b/system/websocket_test/node_modules/es5-ext/math/sinh/shim.js deleted file mode 100644 index b161eca..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/sinh/shim.js +++ /dev/null @@ -1,18 +0,0 @@ -// Parts of implementation taken from es6-shim project -// See: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js - -"use strict"; - -var expm1 = require("../expm1") - , abs = Math.abs - , exp = Math.exp - , e = Math.E; - -module.exports = function (value) { - if (isNaN(value)) return NaN; - value = Number(value); - if (value === 0) return value; - if (!isFinite(value)) return value; - if (abs(value) < 1) return (expm1(value) - expm1(-value)) / 2; - return ((exp(value - 1) - exp(-value - 1)) * e) / 2; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/tanh/implement.js b/system/websocket_test/node_modules/es5-ext/math/tanh/implement.js deleted file mode 100644 index 52d2957..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/tanh/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "tanh", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/tanh/index.js b/system/websocket_test/node_modules/es5-ext/math/tanh/index.js deleted file mode 100644 index 54b3251..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/tanh/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.tanh : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/tanh/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/tanh/is-implemented.js deleted file mode 100644 index b6226b4..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/tanh/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var tanh = Math.tanh; - if (typeof tanh !== "function") return false; - return tanh(1) === 0.7615941559557649 && tanh(Number.MAX_VALUE) === 1; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/tanh/shim.js b/system/websocket_test/node_modules/es5-ext/math/tanh/shim.js deleted file mode 100644 index 974dd7c..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/tanh/shim.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -var exp = Math.exp; - -module.exports = function (value) { - var num1, num2; - if (isNaN(value)) return NaN; - value = Number(value); - if (value === 0) return value; - if (value === Infinity) return 1; - if (value === -Infinity) return -1; - num1 = exp(value); - if (num1 === Infinity) return 1; - num2 = exp(-value); - if (num2 === Infinity) return -1; - return (num1 - num2) / (num1 + num2); -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/trunc/implement.js b/system/websocket_test/node_modules/es5-ext/math/trunc/implement.js deleted file mode 100644 index bf1bf64..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/trunc/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Math, "trunc", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/math/trunc/index.js b/system/websocket_test/node_modules/es5-ext/math/trunc/index.js deleted file mode 100644 index 8e3874c..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/trunc/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Math.trunc : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/math/trunc/is-implemented.js b/system/websocket_test/node_modules/es5-ext/math/trunc/is-implemented.js deleted file mode 100644 index 861b5c0..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/trunc/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var trunc = Math.trunc; - if (typeof trunc !== "function") return false; - return trunc(13.67) === 13 && trunc(-13.67) === -13; -}; diff --git a/system/websocket_test/node_modules/es5-ext/math/trunc/shim.js b/system/websocket_test/node_modules/es5-ext/math/trunc/shim.js deleted file mode 100644 index bf6ac8c..0000000 --- a/system/websocket_test/node_modules/es5-ext/math/trunc/shim.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var floor = Math.floor; - -module.exports = function (value) { - if (isNaN(value)) return NaN; - value = Number(value); - if (value === 0) return value; - if (value === Infinity) return Infinity; - if (value === -Infinity) return -Infinity; - if (value > 0) return floor(value); - return -floor(-value); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/number/\043/index.js" "b/system/websocket_test/node_modules/es5-ext/number/\043/index.js" deleted file mode 100644 index 50b6418..0000000 --- "a/system/websocket_test/node_modules/es5-ext/number/\043/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = { pad: require("./pad") }; diff --git "a/system/websocket_test/node_modules/es5-ext/number/\043/pad.js" "b/system/websocket_test/node_modules/es5-ext/number/\043/pad.js" deleted file mode 100644 index f5af869..0000000 --- "a/system/websocket_test/node_modules/es5-ext/number/\043/pad.js" +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -var pad = require("../../string/#/pad") - , toPosInt = require("../to-pos-integer") - , toFixed = Number.prototype.toFixed; - -module.exports = function (length /*, precision*/) { - var precision; - length = toPosInt(length); - precision = toPosInt(arguments[1]); - - return pad.call( - precision ? toFixed.call(this, precision) : this, "0", - length + (precision ? 1 + precision : 0) - ); -}; diff --git a/system/websocket_test/node_modules/es5-ext/number/epsilon/implement.js b/system/websocket_test/node_modules/es5-ext/number/epsilon/implement.js deleted file mode 100644 index 5a22cf5..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/epsilon/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Number, "EPSILON", { - value: require("./"), - configurable: false, - enumerable: false, - writable: false - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/number/epsilon/index.js b/system/websocket_test/node_modules/es5-ext/number/epsilon/index.js deleted file mode 100644 index 12e8a8d..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/epsilon/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = 2.220446049250313e-16; diff --git a/system/websocket_test/node_modules/es5-ext/number/epsilon/is-implemented.js b/system/websocket_test/node_modules/es5-ext/number/epsilon/is-implemented.js deleted file mode 100644 index 5ddc9d6..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/epsilon/is-implemented.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = function () { return typeof Number.EPSILON === "number"; }; diff --git a/system/websocket_test/node_modules/es5-ext/number/index.js b/system/websocket_test/node_modules/es5-ext/number/index.js deleted file mode 100644 index b57ff15..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/index.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -module.exports = { - "#": require("./#"), - "EPSILON": require("./epsilon"), - "isFinite": require("./is-finite"), - "isInteger": require("./is-integer"), - "isNaN": require("./is-nan"), - "isNatural": require("./is-natural"), - "isNumber": require("./is-number"), - "isSafeInteger": require("./is-safe-integer"), - "MAX_SAFE_INTEGER": require("./max-safe-integer"), - "MIN_SAFE_INTEGER": require("./min-safe-integer"), - "toInteger": require("./to-integer"), - "toPosInteger": require("./to-pos-integer"), - "toUint32": require("./to-uint32") -}; diff --git a/system/websocket_test/node_modules/es5-ext/number/is-finite/implement.js b/system/websocket_test/node_modules/es5-ext/number/is-finite/implement.js deleted file mode 100644 index 41109fb..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-finite/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Number, "isFinite", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/number/is-finite/index.js b/system/websocket_test/node_modules/es5-ext/number/is-finite/index.js deleted file mode 100644 index f3a7112..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-finite/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Number.isFinite : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/number/is-finite/is-implemented.js b/system/websocket_test/node_modules/es5-ext/number/is-finite/is-implemented.js deleted file mode 100644 index eadd050..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-finite/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var numberIsFinite = Number.isFinite; - if (typeof numberIsFinite !== "function") return false; - return !numberIsFinite("23") && numberIsFinite(34) && !numberIsFinite(Infinity); -}; diff --git a/system/websocket_test/node_modules/es5-ext/number/is-finite/shim.js b/system/websocket_test/node_modules/es5-ext/number/is-finite/shim.js deleted file mode 100644 index ce700f6..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-finite/shim.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = function (value) { return typeof value === "number" && isFinite(value); }; diff --git a/system/websocket_test/node_modules/es5-ext/number/is-integer/implement.js b/system/websocket_test/node_modules/es5-ext/number/is-integer/implement.js deleted file mode 100644 index 48b4cd2..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-integer/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Number, "isInteger", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/number/is-integer/index.js b/system/websocket_test/node_modules/es5-ext/number/is-integer/index.js deleted file mode 100644 index 2805b11..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-integer/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Number.isInteger : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/number/is-integer/is-implemented.js b/system/websocket_test/node_modules/es5-ext/number/is-integer/is-implemented.js deleted file mode 100644 index f357c71..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-integer/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var isInteger = Number.isInteger; - if (typeof isInteger !== "function") return false; - return !isInteger("23") && isInteger(34) && !isInteger(32.34); -}; diff --git a/system/websocket_test/node_modules/es5-ext/number/is-integer/shim.js b/system/websocket_test/node_modules/es5-ext/number/is-integer/shim.js deleted file mode 100644 index 12058b5..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-integer/shim.js +++ /dev/null @@ -1,8 +0,0 @@ -// Credit: http://www.2ality.com/2014/05/is-integer.html - -"use strict"; - -module.exports = function (value) { - if (typeof value !== "number") return false; - return value % 1 === 0; -}; diff --git a/system/websocket_test/node_modules/es5-ext/number/is-nan/implement.js b/system/websocket_test/node_modules/es5-ext/number/is-nan/implement.js deleted file mode 100644 index f704e4c..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-nan/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Number, "isNaN", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/number/is-nan/index.js b/system/websocket_test/node_modules/es5-ext/number/is-nan/index.js deleted file mode 100644 index 2cec8fc..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-nan/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Number.isNaN : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/number/is-nan/is-implemented.js b/system/websocket_test/node_modules/es5-ext/number/is-nan/is-implemented.js deleted file mode 100644 index 756838a..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-nan/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var numberIsNaN = Number.isNaN; - if (typeof numberIsNaN !== "function") return false; - return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34); -}; diff --git a/system/websocket_test/node_modules/es5-ext/number/is-nan/shim.js b/system/websocket_test/node_modules/es5-ext/number/is-nan/shim.js deleted file mode 100644 index b5730d1..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-nan/shim.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function (value) { - // eslint-disable-next-line no-self-compare - return value !== value; -}; diff --git a/system/websocket_test/node_modules/es5-ext/number/is-natural.js b/system/websocket_test/node_modules/es5-ext/number/is-natural.js deleted file mode 100644 index 2bbb5a2..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-natural.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var isInteger = require("./is-integer"); - -module.exports = function (num) { return isInteger(num) && num >= 0; }; diff --git a/system/websocket_test/node_modules/es5-ext/number/is-number.js b/system/websocket_test/node_modules/es5-ext/number/is-number.js deleted file mode 100644 index 5c11a52..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-number.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var objToString = Object.prototype.toString, id = objToString.call(1); - -module.exports = function (value) { - return ( - typeof value === "number" || - value instanceof Number || - (typeof value === "object" && objToString.call(value) === id) - ); -}; diff --git a/system/websocket_test/node_modules/es5-ext/number/is-safe-integer/implement.js b/system/websocket_test/node_modules/es5-ext/number/is-safe-integer/implement.js deleted file mode 100644 index 571b214..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-safe-integer/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Number, "isSafeInteger", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/number/is-safe-integer/index.js b/system/websocket_test/node_modules/es5-ext/number/is-safe-integer/index.js deleted file mode 100644 index 26c2b9f..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-safe-integer/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Number.isSafeInteger : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/number/is-safe-integer/is-implemented.js b/system/websocket_test/node_modules/es5-ext/number/is-safe-integer/is-implemented.js deleted file mode 100644 index 5ed3763..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-safe-integer/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var isSafeInteger = Number.isSafeInteger; - if (typeof isSafeInteger !== "function") return false; - return !isSafeInteger("23") && isSafeInteger(34232322323) && !isSafeInteger(9007199254740992); -}; diff --git a/system/websocket_test/node_modules/es5-ext/number/is-safe-integer/shim.js b/system/websocket_test/node_modules/es5-ext/number/is-safe-integer/shim.js deleted file mode 100644 index fb4f4d5..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/is-safe-integer/shim.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var isInteger = require("../is-integer/shim") - , maxValue = require("../max-safe-integer") - , abs = Math.abs; - -module.exports = function (value) { - if (!isInteger(value)) return false; - return abs(value) <= maxValue; -}; diff --git a/system/websocket_test/node_modules/es5-ext/number/max-safe-integer/implement.js b/system/websocket_test/node_modules/es5-ext/number/max-safe-integer/implement.js deleted file mode 100644 index 4ee3231..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/max-safe-integer/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Number, "MAX_SAFE_INTEGER", { - value: require("./"), - configurable: false, - enumerable: false, - writable: false - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/number/max-safe-integer/index.js b/system/websocket_test/node_modules/es5-ext/number/max-safe-integer/index.js deleted file mode 100644 index 75a41e7..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/max-safe-integer/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = Math.pow(2, 53) - 1; diff --git a/system/websocket_test/node_modules/es5-ext/number/max-safe-integer/is-implemented.js b/system/websocket_test/node_modules/es5-ext/number/max-safe-integer/is-implemented.js deleted file mode 100644 index 3d6e914..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/max-safe-integer/is-implemented.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = function () { return typeof Number.MAX_SAFE_INTEGER === "number"; }; diff --git a/system/websocket_test/node_modules/es5-ext/number/min-safe-integer/implement.js b/system/websocket_test/node_modules/es5-ext/number/min-safe-integer/implement.js deleted file mode 100644 index 979dc39..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/min-safe-integer/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Number, "MIN_SAFE_INTEGER", { - value: require("./"), - configurable: false, - enumerable: false, - writable: false - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/number/min-safe-integer/index.js b/system/websocket_test/node_modules/es5-ext/number/min-safe-integer/index.js deleted file mode 100644 index cde4514..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/min-safe-integer/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = -(Math.pow(2, 53) - 1); diff --git a/system/websocket_test/node_modules/es5-ext/number/min-safe-integer/is-implemented.js b/system/websocket_test/node_modules/es5-ext/number/min-safe-integer/is-implemented.js deleted file mode 100644 index 71e6a31..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/min-safe-integer/is-implemented.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = function () { return typeof Number.MIN_SAFE_INTEGER === "number"; }; diff --git a/system/websocket_test/node_modules/es5-ext/number/to-integer.js b/system/websocket_test/node_modules/es5-ext/number/to-integer.js deleted file mode 100644 index 4df5572..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/to-integer.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var sign = require("../math/sign") - , abs = Math.abs - , floor = Math.floor; - -module.exports = function (value) { - if (isNaN(value)) return 0; - value = Number(value); - if (value === 0 || !isFinite(value)) return value; - return sign(value) * floor(abs(value)); -}; diff --git a/system/websocket_test/node_modules/es5-ext/number/to-pos-integer.js b/system/websocket_test/node_modules/es5-ext/number/to-pos-integer.js deleted file mode 100644 index 28f6d40..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/to-pos-integer.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var toInteger = require("./to-integer") - , max = Math.max; - -module.exports = function (value) { return max(0, toInteger(value)); }; diff --git a/system/websocket_test/node_modules/es5-ext/number/to-uint32.js b/system/websocket_test/node_modules/es5-ext/number/to-uint32.js deleted file mode 100644 index cb3590a..0000000 --- a/system/websocket_test/node_modules/es5-ext/number/to-uint32.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function (value) { - // eslint-disable-next-line no-bitwise - return value >>> 0; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/_iterate.js b/system/websocket_test/node_modules/es5-ext/object/_iterate.js deleted file mode 100644 index 1f0c85f..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/_iterate.js +++ /dev/null @@ -1,30 +0,0 @@ -// Internal method, used by iteration functions. -// Calls a function for each key-value pair found in object -// Optionally takes compareFn to iterate object in specific order - -"use strict"; - -var callable = require("./valid-callable") - , value = require("./valid-value") - , bind = Function.prototype.bind - , call = Function.prototype.call - , keys = Object.keys - , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; - -module.exports = function (method, defVal) { - return function (obj, cb /*, thisArg, compareFn*/) { - var list, thisArg = arguments[2], compareFn = arguments[3]; - obj = Object(value(obj)); - callable(cb); - - list = keys(obj); - if (compareFn) { - list.sort(typeof compareFn === "function" ? bind.call(compareFn, obj) : undefined); - } - if (typeof method !== "function") method = list[method]; - return call.call(method, list, function (key, index) { - if (!objPropertyIsEnumerable.call(obj, key)) return defVal; - return call.call(cb, thisArg, obj[key], key, obj, index); - }); - }; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/assign-deep.js b/system/websocket_test/node_modules/es5-ext/object/assign-deep.js deleted file mode 100644 index 87fd78b..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/assign-deep.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -var includes = require("../array/#/contains") - , uniq = require("../array/#/uniq") - , copyDeep = require("./copy-deep") - , objForEach = require("./for-each") - , isPlainObject = require("./is-plain-object") - , ensureValue = require("./valid-value"); - -var isArray = Array.isArray, slice = Array.prototype.slice; - -var deepAssign = function (target, source) { - if (target === source) return target; - if (isPlainObject(target) && isPlainObject(source)) { - objForEach(source, function (value, key) { target[key] = deepAssign(target[key], value); }); - return target; - } - if (isArray(target) && isArray(source)) { - source.forEach(function (item) { - if (includes.call(target, item)) return; - if (isArray(item) || isPlainObject(item)) item = copyDeep(item); - target.push(item); - }); - return target; - } - if (isPlainObject(source) || isArray(source)) return copyDeep(source); - return source; -}; - -module.exports = function (target /*, ...objects*/) { - return uniq - .call([ensureValue(target)].concat(slice.call(arguments, 1).map(ensureValue))) - .reduce(deepAssign); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/assign/implement.js b/system/websocket_test/node_modules/es5-ext/object/assign/implement.js deleted file mode 100644 index f20371d..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/assign/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Object, "assign", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/object/assign/index.js b/system/websocket_test/node_modules/es5-ext/object/assign/index.js deleted file mode 100644 index 9585b55..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/assign/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Object.assign : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/object/assign/is-implemented.js b/system/websocket_test/node_modules/es5-ext/object/assign/is-implemented.js deleted file mode 100644 index 8bf71ae..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/assign/is-implemented.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -module.exports = function () { - var assign = Object.assign, obj; - if (typeof assign !== "function") return false; - obj = { foo: "raz" }; - assign(obj, { bar: "dwa" }, { trzy: "trzy" }); - return obj.foo + obj.bar + obj.trzy === "razdwatrzy"; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/assign/shim.js b/system/websocket_test/node_modules/es5-ext/object/assign/shim.js deleted file mode 100644 index afa58f2..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/assign/shim.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var keys = require("../keys") - , value = require("../valid-value") - , max = Math.max; - -module.exports = function (dest, src /*, …srcn*/) { - var error, i, length = max(arguments.length, 2), assign; - dest = Object(value(dest)); - assign = function (key) { - try { - dest[key] = src[key]; - } catch (e) { - if (!error) error = e; - } - }; - for (i = 1; i < length; ++i) { - src = arguments[i]; - keys(src).forEach(assign); - } - if (error !== undefined) throw error; - return dest; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/clear.js b/system/websocket_test/node_modules/es5-ext/object/clear.js deleted file mode 100644 index 268cc5b..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/clear.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -var keys = require("./keys"); - -module.exports = function (obj) { - var error; - keys(obj).forEach(function (key) { - try { - delete this[key]; - } catch (e) { - if (!error) error = e; - } - }, obj); - if (error !== undefined) throw error; - return obj; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/compact.js b/system/websocket_test/node_modules/es5-ext/object/compact.js deleted file mode 100644 index a1794bb..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/compact.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var filter = require("./filter") - , isValue = require("./is-value"); - -module.exports = function (obj) { - return filter(obj, function (val) { return isValue(val); }); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/compare.js b/system/websocket_test/node_modules/es5-ext/object/compare.js deleted file mode 100644 index 261a732..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/compare.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; - -var strCompare = require("../string/#/case-insensitive-compare") - , isObject = require("./is-object") - , isValue = require("./is-value") - , numIsNaN = require("../number/is-nan") - , resolve - , typeMap; - -typeMap = { undefined: 0, object: 1, boolean: 2, string: 3, number: 4 }; - -resolve = function (a) { - if (isObject(a)) { - if (typeof a.valueOf !== "function") return NaN; - a = a.valueOf(); - if (isObject(a)) { - if (typeof a.toString !== "function") return NaN; - a = a.toString(); - if (typeof a !== "string") return NaN; - } - } - return a; -}; - -module.exports = function (val1, val2) { - if (val1 === val2) return 0; // Same - - val1 = resolve(val1); - val2 = resolve(val2); - // eslint-disable-next-line eqeqeq - if (val1 == val2) return typeMap[typeof val1] - typeMap[typeof val2]; - if (!isValue(val1)) return -1; - if (!isValue(val2)) return 1; - if (typeof val1 === "string" || typeof val2 === "string") { - return strCompare.call(val1, val2); - } - if (numIsNaN(val1) && numIsNaN(val2)) return 0; // Jslint: ignore - return Number(val1) - Number(val2); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/copy-deep.js b/system/websocket_test/node_modules/es5-ext/object/copy-deep.js deleted file mode 100644 index 1d1bed2..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/copy-deep.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -var forEach = require("./for-each") - , isPlainObject = require("./is-plain-object") - , ensureValue = require("./valid-value") - , isArray = Array.isArray; - -var copyValue = function (value, ancestors, ancestorsCopy) { - var mode; - if (isPlainObject(value)) mode = "object"; - else if (isArray(value)) mode = "array"; - if (!mode) return value; - - var copy = ancestorsCopy[ancestors.indexOf(value)]; - if (copy) return copy; - copy = mode === "object" ? {} : []; - - ancestors.push(value); - ancestorsCopy.push(copy); - if (mode === "object") { - forEach(value, function (item, key) { - copy[key] = copyValue(item, ancestors, ancestorsCopy); - }); - } else { - value.forEach(function (item, index) { - copy[index] = copyValue(item, ancestors, ancestorsCopy); - }); - } - ancestors.pop(); - ancestorsCopy.pop(); - - return copy; -}; - -module.exports = function (source) { return copyValue(ensureValue(source), [], []); }; diff --git a/system/websocket_test/node_modules/es5-ext/object/copy.js b/system/websocket_test/node_modules/es5-ext/object/copy.js deleted file mode 100644 index 2bd591d..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/copy.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -var aFrom = require("../array/from") - , assign = require("./assign") - , value = require("./valid-value"); - -module.exports = function (obj /*, propertyNames, options*/) { - var copy = Object(value(obj)), propertyNames = arguments[1], options = Object(arguments[2]); - if (copy !== obj && !propertyNames) return copy; - var result = {}; - if (propertyNames) { - aFrom(propertyNames, function (propertyName) { - if (options.ensure || propertyName in obj) result[propertyName] = obj[propertyName]; - }); - } else { - assign(result, obj); - } - return result; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/count.js b/system/websocket_test/node_modules/es5-ext/object/count.js deleted file mode 100644 index 6c018bb..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/count.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var keys = require("./keys"); - -module.exports = function (obj) { return keys(obj).length; }; diff --git a/system/websocket_test/node_modules/es5-ext/object/create.js b/system/websocket_test/node_modules/es5-ext/object/create.js deleted file mode 100644 index a391ec1..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/create.js +++ /dev/null @@ -1,43 +0,0 @@ -// Workaround for http://code.google.com/p/v8/issues/detail?id=2804 - -"use strict"; - -var create = Object.create, shim; - -if (!require("./set-prototype-of/is-implemented")()) { - shim = require("./set-prototype-of/shim"); -} - -module.exports = (function () { - var nullObject, polyProps, desc; - if (!shim) return create; - if (shim.level !== 1) return create; - - nullObject = {}; - polyProps = {}; - desc = { configurable: false, enumerable: false, writable: true, value: undefined }; - Object.getOwnPropertyNames(Object.prototype).forEach(function (name) { - if (name === "__proto__") { - polyProps[name] = { - configurable: true, - enumerable: false, - writable: true, - value: undefined - }; - return; - } - polyProps[name] = desc; - }); - Object.defineProperties(nullObject, polyProps); - - Object.defineProperty(shim, "nullPolyfill", { - configurable: false, - enumerable: false, - writable: false, - value: nullObject - }); - - return function (prototype, props) { - return create(prototype === null ? nullObject : prototype, props); - }; -})(); diff --git a/system/websocket_test/node_modules/es5-ext/object/ensure-array.js b/system/websocket_test/node_modules/es5-ext/object/ensure-array.js deleted file mode 100644 index 5ca7a94..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/ensure-array.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var toShortString = require("../to-short-string-representation") - , isArray = require("./is-array-like"); - -module.exports = function (value) { - if (isArray(value)) return value; - throw new TypeError(toShortString(value) + " is not a array"); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/ensure-finite-number.js b/system/websocket_test/node_modules/es5-ext/object/ensure-finite-number.js deleted file mode 100644 index 4f6e4b4..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/ensure-finite-number.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var isFiniteNumber = require("./is-finite-number") - , safeToString = require("../safe-to-string"); - -module.exports = function (value) { - if (isFiniteNumber(value)) return Number(value); - throw new TypeError(safeToString(value) + " does not represent a finite number value"); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/ensure-integer.js b/system/websocket_test/node_modules/es5-ext/object/ensure-integer.js deleted file mode 100644 index 9ec64b5..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/ensure-integer.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var toShortString = require("../to-short-string-representation") - , isInteger = require("./is-integer"); - -module.exports = function (num) { - if (!isInteger(num)) throw new TypeError(toShortString(num) + " is not a integer"); - return Number(num); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/ensure-natural-number-value.js b/system/websocket_test/node_modules/es5-ext/object/ensure-natural-number-value.js deleted file mode 100644 index 1a901aa..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/ensure-natural-number-value.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var isNaturalValue = require("./is-natural-number-value") - , toShortString = require("../to-short-string-representation"); - -module.exports = function (arg) { - var num = Number(arg); - if (!isNaturalValue(arg)) throw new TypeError(toShortString(arg) + " is not a natural number"); - return num; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/ensure-natural-number.js b/system/websocket_test/node_modules/es5-ext/object/ensure-natural-number.js deleted file mode 100644 index ec7e514..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/ensure-natural-number.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var isNatural = require("../number/is-natural") - , toShortString = require("../to-short-string-representation"); - -module.exports = function (arg) { - var num = Number(arg); - if (!isNatural(num)) throw new TypeError(toShortString(arg) + " is not a natural number"); - return num; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/ensure-plain-function.js b/system/websocket_test/node_modules/es5-ext/object/ensure-plain-function.js deleted file mode 100644 index 6cd9853..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/ensure-plain-function.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var safeToString = require("../safe-to-string") - , isPlainFunction = require("./is-plain-function"); - -module.exports = function (value) { - if (!isPlainFunction(value)) { - throw new TypeError(safeToString(value) + " is not a plain function"); - } - return value; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/ensure-plain-object.js b/system/websocket_test/node_modules/es5-ext/object/ensure-plain-object.js deleted file mode 100644 index 7fb2b93..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/ensure-plain-object.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var safeToString = require("../safe-to-string") - , isPlainObject = require("./is-plain-object"); - -module.exports = function (value) { - if (!isPlainObject(value)) throw new TypeError(safeToString(value) + " is not a plain object"); - return value; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/ensure-promise.js b/system/websocket_test/node_modules/es5-ext/object/ensure-promise.js deleted file mode 100644 index b5b5356..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/ensure-promise.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var safeToString = require("../safe-to-string") - , isPromise = require("./is-promise"); - -module.exports = function (value) { - if (!isPromise(value)) throw new TypeError(safeToString(value) + " is not a promise"); - return value; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/ensure-thenable.js b/system/websocket_test/node_modules/es5-ext/object/ensure-thenable.js deleted file mode 100644 index c55c17a..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/ensure-thenable.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var safeToString = require("../safe-to-string") - , isThenable = require("./is-thenable"); - -module.exports = function (value) { - if (!isThenable(value)) throw new TypeError(safeToString(value) + " is not a thenable"); - return value; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/entries/implement.js b/system/websocket_test/node_modules/es5-ext/object/entries/implement.js deleted file mode 100644 index 5c2a246..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/entries/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Object, "entries", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/object/entries/index.js b/system/websocket_test/node_modules/es5-ext/object/entries/index.js deleted file mode 100644 index 4a297d6..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/entries/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Object.entries : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/object/entries/is-implemented.js b/system/websocket_test/node_modules/es5-ext/object/entries/is-implemented.js deleted file mode 100644 index aad52b2..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/entries/is-implemented.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - try { return Object.entries({ foo: 12 })[0][0] === "foo"; } - catch (e) { return false; } -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/entries/shim.js b/system/websocket_test/node_modules/es5-ext/object/entries/shim.js deleted file mode 100644 index 2348e44..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/entries/shim.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var ensureValue = require("../valid-value"); - -module.exports = function (object) { - ensureValue(object); - var result = []; - object = Object(object); - for (var key in object) { - if (!propertyIsEnumerable.call(object, key)) continue; - result.push([key, object[key]]); - } - return result; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/eq.js b/system/websocket_test/node_modules/es5-ext/object/eq.js deleted file mode 100644 index 0312468..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/eq.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var numIsNaN = require("../number/is-nan"); - -module.exports = function (val1, val2) { - return val1 === val2 || (numIsNaN(val1) && numIsNaN(val2)); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/every.js b/system/websocket_test/node_modules/es5-ext/object/every.js deleted file mode 100644 index 892b548..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/every.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./_iterate")("every", true); diff --git a/system/websocket_test/node_modules/es5-ext/object/filter.js b/system/websocket_test/node_modules/es5-ext/object/filter.js deleted file mode 100644 index c7dd969..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/filter.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var callable = require("./valid-callable") - , forEach = require("./for-each") - , call = Function.prototype.call; - -module.exports = function (obj, cb /*, thisArg*/) { - var result = {}, thisArg = arguments[2]; - callable(cb); - forEach(obj, function (value, key, targetObj, index) { - if (call.call(cb, thisArg, value, key, targetObj, index)) result[key] = targetObj[key]; - }); - return result; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/find-key.js b/system/websocket_test/node_modules/es5-ext/object/find-key.js deleted file mode 100644 index 6da6ba6..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/find-key.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./_iterate")(require("../array/#/find"), false); diff --git a/system/websocket_test/node_modules/es5-ext/object/find.js b/system/websocket_test/node_modules/es5-ext/object/find.js deleted file mode 100644 index 5960421..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/find.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var findKey = require("./find-key") - , isValue = require("./is-value"); - -// eslint-disable-next-line no-unused-vars -module.exports = function (obj, cb /*, thisArg, compareFn*/) { - var key = findKey.apply(this, arguments); - return isValue(key) ? obj[key] : key; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/first-key.js b/system/websocket_test/node_modules/es5-ext/object/first-key.js deleted file mode 100644 index 3666de5..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/first-key.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var value = require("./valid-value") - , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; - -module.exports = function (obj) { - var i; - value(obj); - for (i in obj) { - if (objPropertyIsEnumerable.call(obj, i)) return i; - } - return null; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/flatten.js b/system/websocket_test/node_modules/es5-ext/object/flatten.js deleted file mode 100644 index cda7475..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/flatten.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -var isPlainObject = require("./is-plain-object") - , forEach = require("./for-each") - , process; - -process = function self(value, key) { - if (isPlainObject(value)) forEach(value, self, this); - else this[key] = value; -}; - -module.exports = function (obj) { - var flattened = {}; - forEach(obj, process, flattened); - return flattened; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/for-each.js b/system/websocket_test/node_modules/es5-ext/object/for-each.js deleted file mode 100644 index d282956..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/for-each.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./_iterate")("forEach"); diff --git a/system/websocket_test/node_modules/es5-ext/object/get-property-names.js b/system/websocket_test/node_modules/es5-ext/object/get-property-names.js deleted file mode 100644 index 7dfef27..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/get-property-names.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -var uniq = require("../array/#/uniq") - , value = require("./valid-value") - , push = Array.prototype.push - , getOwnPropertyNames = Object.getOwnPropertyNames - , getPrototypeOf = Object.getPrototypeOf; - -module.exports = function (obj) { - var keys; - obj = Object(value(obj)); - keys = getOwnPropertyNames(obj); - while ((obj = getPrototypeOf(obj))) { - push.apply(keys, getOwnPropertyNames(obj)); - } - return uniq.call(keys); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/index.js b/system/websocket_test/node_modules/es5-ext/object/index.js deleted file mode 100644 index 13cfb95..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/index.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; - -module.exports = { - assign: require("./assign"), - assignDeep: require("./assign-deep"), - clear: require("./clear"), - compact: require("./compact"), - compare: require("./compare"), - copy: require("./copy"), - copyDeep: require("./copy-deep"), - count: require("./count"), - create: require("./create"), - ensureArray: require("./ensure-array"), - ensureFiniteNumber: require("./ensure-finite-number"), - ensureInteger: require("./ensure-integer"), - ensureNaturalNumber: require("./ensure-natural-number"), - ensureNaturalNumberValue: require("./ensure-natural-number-value"), - ensurePlainFunction: require("./ensure-plain-function"), - ensurePlainObject: require("./ensure-plain-object"), - ensurePromise: require("./ensure-promise"), - ensureThenable: require("./ensure-thenable"), - entries: require("./entries"), - eq: require("./eq"), - every: require("./every"), - filter: require("./filter"), - find: require("./find"), - findKey: require("./find-key"), - firstKey: require("./first-key"), - flatten: require("./flatten"), - forEach: require("./for-each"), - getPropertyNames: require("./get-property-names"), - is: require("./is"), - isArrayLike: require("./is-array-like"), - isCallable: require("./is-callable"), - isCopy: require("./is-copy"), - isCopyDeep: require("./is-copy-deep"), - isEmpty: require("./is-empty"), - isFiniteNumber: require("./is-finite-number"), - isInteger: require("./is-integer"), - isNaturalNumber: require("./is-natural-number"), - isNaturalNumberValue: require("./is-natural-number-value"), - isNumberValue: require("./is-number-value"), - isObject: require("./is-object"), - isPlainFunction: require("./is-plain-function"), - isPlainObject: require("./is-plain-object"), - isPromise: require("./is-promise"), - isThenable: require("./is-thenable"), - isValue: require("./is-value"), - keyOf: require("./key-of"), - keys: require("./keys"), - map: require("./map"), - mapKeys: require("./map-keys"), - normalizeOptions: require("./normalize-options"), - mixin: require("./mixin"), - mixinPrototypes: require("./mixin-prototypes"), - primitiveSet: require("./primitive-set"), - safeTraverse: require("./safe-traverse"), - serialize: require("./serialize"), - setPrototypeOf: require("./set-prototype-of"), - some: require("./some"), - toArray: require("./to-array"), - unserialize: require("./unserialize"), - validateArrayLike: require("./validate-array-like"), - validateArrayLikeObject: require("./validate-array-like-object"), - validCallable: require("./valid-callable"), - validObject: require("./valid-object"), - validateStringifiable: require("./validate-stringifiable"), - validateStringifiableValue: require("./validate-stringifiable-value"), - validValue: require("./valid-value") -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-array-like.js b/system/websocket_test/node_modules/es5-ext/object/is-array-like.js deleted file mode 100644 index fcb9115..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-array-like.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -var isFunction = require("../function/is-function") - , isObject = require("./is-object") - , isValue = require("./is-value"); - -module.exports = function (value) { - return ( - (isValue(value) && - typeof value.length === "number" && - // Just checking ((typeof x === 'object') && (typeof x !== 'function')) - // won't work right for some cases, e.g.: - // type of instance of NodeList in Safari is a 'function' - ((isObject(value) && !isFunction(value)) || typeof value === "string")) || - false - ); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-callable.js b/system/websocket_test/node_modules/es5-ext/object/is-callable.js deleted file mode 100644 index 927e5e8..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-callable.js +++ /dev/null @@ -1,5 +0,0 @@ -// Deprecated - -"use strict"; - -module.exports = function (obj) { return typeof obj === "function"; }; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-copy-deep.js b/system/websocket_test/node_modules/es5-ext/object/is-copy-deep.js deleted file mode 100644 index a1206ae..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-copy-deep.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; - -var eq = require("./eq") - , isPlainObject = require("./is-plain-object") - , value = require("./valid-value"); - -var isArray = Array.isArray - , keys = Object.keys - , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable - , objHasOwnProperty = Object.prototype.hasOwnProperty - , eqArr - , eqVal - , eqObj; - -eqArr = function (arr1, arr2, recMap) { - var i, length = arr1.length; - if (length !== arr2.length) return false; - for (i = 0; i < length; ++i) { - if (objHasOwnProperty.call(arr1, i) !== objHasOwnProperty.call(arr2, i)) return false; - if (!eqVal(arr1[i], arr2[i], recMap)) return false; - } - return true; -}; - -eqObj = function (obj1, obj2, recMap) { - var k1 = keys(obj1), k2 = keys(obj2); - if (k1.length !== k2.length) return false; - return k1.every(function (key) { - if (!objPropertyIsEnumerable.call(obj2, key)) return false; - return eqVal(obj1[key], obj2[key], recMap); - }); -}; - -eqVal = function (val1, val2, recMap) { - var i, eqX, c1, c2; - if (eq(val1, val2)) return true; - if (isPlainObject(val1)) { - if (!isPlainObject(val2)) return false; - eqX = eqObj; - } else if (isArray(val1) && isArray(val2)) { - eqX = eqArr; - } else { - return false; - } - c1 = recMap[0]; - c2 = recMap[1]; - i = c1.indexOf(val1); - if (i === -1) { - i = c1.push(val1) - 1; - c2[i] = []; - } else if (c2[i].indexOf(val2) !== -1) return true; - c2[i].push(val2); - return eqX(val1, val2, recMap); -}; - -module.exports = function (val1, val2) { - if (eq(value(val1), value(val2))) return true; - return eqVal(Object(val1), Object(val2), [[], []]); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-copy.js b/system/websocket_test/node_modules/es5-ext/object/is-copy.js deleted file mode 100644 index 8c6ae5e..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-copy.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var eq = require("./eq") - , value = require("./valid-value") - , keys = Object.keys - , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; - -module.exports = function (val1, val2) { - var k1, k2; - - if (eq(value(val1), value(val2))) return true; - - val1 = Object(val1); - val2 = Object(val2); - - k1 = keys(val1); - k2 = keys(val2); - if (k1.length !== k2.length) return false; - return k1.every(function (key) { - if (!objPropertyIsEnumerable.call(val2, key)) return false; - return eq(val1[key], val2[key]); - }); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-empty.js b/system/websocket_test/node_modules/es5-ext/object/is-empty.js deleted file mode 100644 index dbc52d0..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-empty.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var value = require("./valid-value") - , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; - -module.exports = function (obj) { - var i; - value(obj); - for (i in obj) { - // Jslint: ignore - if (objPropertyIsEnumerable.call(obj, i)) return false; - } - return true; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-finite-number.js b/system/websocket_test/node_modules/es5-ext/object/is-finite-number.js deleted file mode 100644 index e016f8d..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-finite-number.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var isNumber = require("./is-number-value"); - -module.exports = function (value) { return isNumber(value) && isFinite(value); }; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-integer.js b/system/websocket_test/node_modules/es5-ext/object/is-integer.js deleted file mode 100644 index 1745b82..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-integer.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var isInteger = require("../number/is-integer") - , isValue = require("./is-value"); - -module.exports = function (arg) { - if (!isValue(arg)) return false; - arg = Number(arg); - return isInteger(arg); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-natural-number-value.js b/system/websocket_test/node_modules/es5-ext/object/is-natural-number-value.js deleted file mode 100644 index c744521..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-natural-number-value.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var isNaturalNumber = require("./is-natural-number") - , isValue = require("./is-value"); - -module.exports = function (arg) { - if (!isValue(arg)) return false; - return isNaturalNumber(arg); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-natural-number.js b/system/websocket_test/node_modules/es5-ext/object/is-natural-number.js deleted file mode 100644 index 3e2c1f5..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-natural-number.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var isNatural = require("../number/is-natural"); - -module.exports = function (arg) { return isNatural(Number(arg)); }; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-number-value.js b/system/websocket_test/node_modules/es5-ext/object/is-number-value.js deleted file mode 100644 index f701bf5..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-number-value.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var isValue = require("./is-value"); - -module.exports = function (value) { - if (!isValue(value)) return false; - try { return !isNaN(value); } - catch (e) { return false; } -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-object.js b/system/websocket_test/node_modules/es5-ext/object/is-object.js deleted file mode 100644 index 0e576d7..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-object.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var isValue = require("./is-value"); - -var map = { function: true, object: true }; - -module.exports = function (value) { return (isValue(value) && map[typeof value]) || false; }; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-plain-function.js b/system/websocket_test/node_modules/es5-ext/object/is-plain-function.js deleted file mode 100644 index a2f3234..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-plain-function.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var isClassStr = RegExp.prototype.test.bind(/^\s*class[\s{/}]/) - , fnToString = Function.prototype.toString; - -module.exports = function (fn) { - if (typeof fn !== "function") return false; - if (typeof fn.call !== "function") return false; - if (typeof fn.apply !== "function") return false; - return !isClassStr(fnToString.call(fn)); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-plain-object.js b/system/websocket_test/node_modules/es5-ext/object/is-plain-object.js deleted file mode 100644 index ff15328..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-plain-object.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -var getPrototypeOf = Object.getPrototypeOf - , prototype = Object.prototype - , objToString = prototype.toString - , id = Object().toString(); - -module.exports = function (value) { - var proto, valueConstructor; - if (!value || typeof value !== "object" || objToString.call(value) !== id) { - return false; - } - proto = getPrototypeOf(value); - if (proto === null) { - valueConstructor = value.constructor; - if (typeof valueConstructor !== "function") return true; - return valueConstructor.prototype !== value; - } - return proto === prototype || getPrototypeOf(proto) === null; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-promise.js b/system/websocket_test/node_modules/es5-ext/object/is-promise.js deleted file mode 100644 index 33d6df1..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-promise.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; - -// In next major this check will also confirm on promise constructor -module.exports = require("./is-thenable"); diff --git a/system/websocket_test/node_modules/es5-ext/object/is-thenable.js b/system/websocket_test/node_modules/es5-ext/object/is-thenable.js deleted file mode 100644 index 06db0fd..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-thenable.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var isCallable = require("./is-callable") - , isObject = require("./is-object"); - -module.exports = function (value) { return isObject(value) && isCallable(value.then); }; diff --git a/system/websocket_test/node_modules/es5-ext/object/is-value.js b/system/websocket_test/node_modules/es5-ext/object/is-value.js deleted file mode 100644 index 4ee3805..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is-value.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var _undefined = require("../function/noop")(); // Support ES3 engines - -module.exports = function (val) { return val !== _undefined && val !== null; }; diff --git a/system/websocket_test/node_modules/es5-ext/object/is.js b/system/websocket_test/node_modules/es5-ext/object/is.js deleted file mode 100644 index 54baade..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/is.js +++ /dev/null @@ -1,10 +0,0 @@ -// Implementation credits go to: -// http://wiki.ecmascript.org/doku.php?id=harmony:egal - -"use strict"; - -var numIsNaN = require("../number/is-nan"); - -module.exports = function (val1, val2) { - return val1 === val2 ? val1 !== 0 || 1 / val1 === 1 / val2 : numIsNaN(val1) && numIsNaN(val2); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/key-of.js b/system/websocket_test/node_modules/es5-ext/object/key-of.js deleted file mode 100644 index dc640e4..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/key-of.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -var eq = require("./eq") - , some = require("./some"); - -module.exports = function (obj, searchValue) { - var result; - return some(obj, function (value, name) { - if (eq(value, searchValue)) { - result = name; - return true; - } - return false; - }) - ? result - : null; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/keys/implement.js b/system/websocket_test/node_modules/es5-ext/object/keys/implement.js deleted file mode 100644 index 72ecfbd..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/keys/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Object, "keys", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/object/keys/index.js b/system/websocket_test/node_modules/es5-ext/object/keys/index.js deleted file mode 100644 index d194227..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/keys/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Object.keys : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/object/keys/is-implemented.js b/system/websocket_test/node_modules/es5-ext/object/keys/is-implemented.js deleted file mode 100644 index 2dfcf1b..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/keys/is-implemented.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -module.exports = function () { - try { - Object.keys("primitive"); - return true; - } catch (e) { - return false; - } -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/keys/shim.js b/system/websocket_test/node_modules/es5-ext/object/keys/shim.js deleted file mode 100644 index a8908d5..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/keys/shim.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var isValue = require("../is-value"); - -var keys = Object.keys; - -module.exports = function (object) { return keys(isValue(object) ? Object(object) : object); }; diff --git a/system/websocket_test/node_modules/es5-ext/object/map-keys.js b/system/websocket_test/node_modules/es5-ext/object/map-keys.js deleted file mode 100644 index 72dada0..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/map-keys.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -var callable = require("./valid-callable") - , forEach = require("./for-each") - , call = Function.prototype.call; - -module.exports = function (obj, cb /*, thisArg*/) { - var result = {}, thisArg = arguments[2]; - callable(cb); - forEach( - obj, - function (value, key, targetObj, index) { - result[call.call(cb, thisArg, key, value, this, index)] = value; - }, - obj - ); - return result; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/map.js b/system/websocket_test/node_modules/es5-ext/object/map.js deleted file mode 100644 index 7b718db..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/map.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var callable = require("./valid-callable") - , forEach = require("./for-each") - , call = Function.prototype.call; - -module.exports = function (obj, cb /*, thisArg*/) { - var result = {}, thisArg = arguments[2]; - callable(cb); - forEach(obj, function (value, key, targetObj, index) { - result[key] = call.call(cb, thisArg, value, key, targetObj, index); - }); - return result; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/mixin-prototypes.js b/system/websocket_test/node_modules/es5-ext/object/mixin-prototypes.js deleted file mode 100644 index 81e27c7..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/mixin-prototypes.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -var value = require("./valid-value") - , mixin = require("./mixin"); - -var getPrototypeOf = Object.getPrototypeOf; - -module.exports = function (target, source) { - target = Object(value(target)); - source = Object(value(source)); - if (target === source) return target; - - var sources = []; - while (source && !isPrototypeOf.call(source, target)) { - sources.unshift(source); - source = getPrototypeOf(source); - } - - var error; - sources.forEach(function (sourceProto) { - try { mixin(target, sourceProto); } catch (mixinError) { error = mixinError; } - }); - if (error) throw error; - return target; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/mixin.js b/system/websocket_test/node_modules/es5-ext/object/mixin.js deleted file mode 100644 index f5cf9dd..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/mixin.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -var value = require("./valid-value") - , defineProperty = Object.defineProperty - , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor - , getOwnPropertyNames = Object.getOwnPropertyNames - , getOwnPropertySymbols = Object.getOwnPropertySymbols; - -module.exports = function (target, source) { - var error, sourceObject = Object(value(source)); - target = Object(value(target)); - getOwnPropertyNames(sourceObject).forEach(function (name) { - try { - defineProperty(target, name, getOwnPropertyDescriptor(source, name)); - } catch (e) { error = e; } - }); - if (typeof getOwnPropertySymbols === "function") { - getOwnPropertySymbols(sourceObject).forEach(function (symbol) { - try { - defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol)); - } catch (e) { error = e; } - }); - } - if (error !== undefined) throw error; - return target; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/normalize-options.js b/system/websocket_test/node_modules/es5-ext/object/normalize-options.js deleted file mode 100644 index 6c394fe..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/normalize-options.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -var isValue = require("./is-value"); - -var forEach = Array.prototype.forEach, create = Object.create; - -var process = function (src, obj) { - var key; - for (key in src) obj[key] = src[key]; -}; - -// eslint-disable-next-line no-unused-vars -module.exports = function (opts1 /*, …options*/) { - var result = create(null); - forEach.call(arguments, function (options) { - if (!isValue(options)) return; - process(Object(options), result); - }); - return result; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/primitive-set.js b/system/websocket_test/node_modules/es5-ext/object/primitive-set.js deleted file mode 100644 index 840808d..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/primitive-set.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var forEach = Array.prototype.forEach, create = Object.create; - -// eslint-disable-next-line no-unused-vars -module.exports = function (arg /*, …args*/) { - var set = create(null); - forEach.call(arguments, function (name) { set[name] = true; }); - return set; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/safe-traverse.js b/system/websocket_test/node_modules/es5-ext/object/safe-traverse.js deleted file mode 100644 index 7b72d55..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/safe-traverse.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -var value = require("./valid-value") - , isValue = require("./is-value"); - -module.exports = function (obj /*, …names*/) { - var length, current = 1; - value(obj); - length = arguments.length - 1; - if (!length) return obj; - while (current < length) { - obj = obj[arguments[current++]]; - if (!isValue(obj)) return undefined; - } - return obj[arguments[current]]; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/serialize.js b/system/websocket_test/node_modules/es5-ext/object/serialize.js deleted file mode 100644 index ec868c1..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/serialize.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; - -var toArray = require("./to-array") - , isDate = require("../date/is-date") - , isValue = require("../object/is-value") - , isRegExp = require("../reg-exp/is-reg-exp"); - -var isArray = Array.isArray - , stringify = JSON.stringify - , objHasOwnProperty = Object.prototype.hasOwnProperty; -var keyValueToString = function (value, key) { - return stringify(key) + ":" + module.exports(value); -}; - -var sparseMap = function (arr) { - var i, length = arr.length, result = new Array(length); - for (i = 0; i < length; ++i) { - if (!objHasOwnProperty.call(arr, i)) continue; - result[i] = module.exports(arr[i]); - } - return result; -}; - -module.exports = function (obj) { - if (!isValue(obj)) return String(obj); - switch (typeof obj) { - case "string": - return stringify(obj); - case "number": - case "boolean": - case "function": - return String(obj); - case "object": - if (isArray(obj)) return "[" + sparseMap(obj) + "]"; - if (isRegExp(obj)) return String(obj); - if (isDate(obj)) return "new Date(" + obj.valueOf() + ")"; - return "{" + toArray(obj, keyValueToString) + "}"; - default: - throw new TypeError("Serialization of " + String(obj) + "is unsupported"); - } -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/set-prototype-of/implement.js b/system/websocket_test/node_modules/es5-ext/object/set-prototype-of/implement.js deleted file mode 100644 index 386a300..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/set-prototype-of/implement.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var shim; - -if (!require("./is-implemented")() && (shim = require("./shim"))) { - Object.defineProperty(Object, "setPrototypeOf", { - value: shim, - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/object/set-prototype-of/index.js b/system/websocket_test/node_modules/es5-ext/object/set-prototype-of/index.js deleted file mode 100644 index ac07b99..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/set-prototype-of/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Object.setPrototypeOf : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/object/set-prototype-of/is-implemented.js b/system/websocket_test/node_modules/es5-ext/object/set-prototype-of/is-implemented.js deleted file mode 100644 index 1a00627..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/set-prototype-of/is-implemented.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var create = Object.create, getPrototypeOf = Object.getPrototypeOf, plainObject = {}; - -module.exports = function (/* CustomCreate*/) { - var setPrototypeOf = Object.setPrototypeOf, customCreate = arguments[0] || create; - if (typeof setPrototypeOf !== "function") return false; - return getPrototypeOf(setPrototypeOf(customCreate(null), plainObject)) === plainObject; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/set-prototype-of/shim.js b/system/websocket_test/node_modules/es5-ext/object/set-prototype-of/shim.js deleted file mode 100644 index 97b0b50..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/set-prototype-of/shim.js +++ /dev/null @@ -1,81 +0,0 @@ -/* eslint no-proto: "off" */ - -// Big thanks to @WebReflection for sorting this out -// https://gist.github.com/WebReflection/5593554 - -"use strict"; - -var isObject = require("../is-object") - , value = require("../valid-value") - , objIsPrototypeOf = Object.prototype.isPrototypeOf - , defineProperty = Object.defineProperty - , nullDesc = { configurable: true, enumerable: false, writable: true, value: undefined } - , validate; - -validate = function (obj, prototype) { - value(obj); - if (prototype === null || isObject(prototype)) return obj; - throw new TypeError("Prototype must be null or an object"); -}; - -module.exports = (function (status) { - var fn, set; - if (!status) return null; - if (status.level === 2) { - if (status.set) { - set = status.set; - fn = function (obj, prototype) { - set.call(validate(obj, prototype), prototype); - return obj; - }; - } else { - fn = function (obj, prototype) { - validate(obj, prototype).__proto__ = prototype; - return obj; - }; - } - } else { - fn = function self(obj, prototype) { - var isNullBase; - validate(obj, prototype); - isNullBase = objIsPrototypeOf.call(self.nullPolyfill, obj); - if (isNullBase) delete self.nullPolyfill.__proto__; - if (prototype === null) prototype = self.nullPolyfill; - obj.__proto__ = prototype; - if (isNullBase) defineProperty(self.nullPolyfill, "__proto__", nullDesc); - return obj; - }; - } - return Object.defineProperty(fn, "level", { - configurable: false, - enumerable: false, - writable: false, - value: status.level - }); -})( - (function () { - var tmpObj1 = Object.create(null) - , tmpObj2 = {} - , set - , desc = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__"); - - if (desc) { - try { - set = desc.set; // Opera crashes at this point - set.call(tmpObj1, tmpObj2); - } catch (ignore) {} - if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { set: set, level: 2 }; - } - - tmpObj1.__proto__ = tmpObj2; - if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 2 }; - - tmpObj1 = {}; - tmpObj1.__proto__ = tmpObj2; - if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 1 }; - - return false; - })() -); - -require("../create"); diff --git a/system/websocket_test/node_modules/es5-ext/object/some.js b/system/websocket_test/node_modules/es5-ext/object/some.js deleted file mode 100644 index c919466..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/some.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./_iterate")("some", false); diff --git a/system/websocket_test/node_modules/es5-ext/object/to-array.js b/system/websocket_test/node_modules/es5-ext/object/to-array.js deleted file mode 100644 index 8912b45..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/to-array.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -var callable = require("./valid-callable") - , isValue = require("./is-value") - , forEach = require("./for-each") - , call = Function.prototype.call - , defaultCb = function (value, key) { return [key, value]; }; - -module.exports = function (obj /*, cb, thisArg, compareFn*/) { - var a = [], cb = arguments[1], thisArg = arguments[2]; - cb = isValue(cb) ? callable(cb) : defaultCb; - - forEach( - obj, - function (value, key, targetObj, index) { - a.push(call.call(cb, thisArg, value, key, this, index)); - }, - obj, arguments[3] - ); - return a; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/unserialize.js b/system/websocket_test/node_modules/es5-ext/object/unserialize.js deleted file mode 100644 index f62ea78..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/unserialize.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var value = require("./valid-value"); - -module.exports = function (code) { - // eslint-disable-next-line no-new-func - return new Function("return " + value(code))(); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/valid-callable.js b/system/websocket_test/node_modules/es5-ext/object/valid-callable.js deleted file mode 100644 index a97fb3e..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/valid-callable.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function (fn) { - if (typeof fn !== "function") throw new TypeError(fn + " is not a function"); - return fn; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/valid-object.js b/system/websocket_test/node_modules/es5-ext/object/valid-object.js deleted file mode 100644 index 74b5e5f..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/valid-object.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var isObject = require("./is-object"); - -module.exports = function (value) { - if (!isObject(value)) throw new TypeError(value + " is not an Object"); - return value; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/valid-value.js b/system/websocket_test/node_modules/es5-ext/object/valid-value.js deleted file mode 100644 index d0ced8a..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/valid-value.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var isValue = require("./is-value"); - -module.exports = function (value) { - if (!isValue(value)) throw new TypeError("Cannot use null or undefined"); - return value; -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/validate-array-like-object.js b/system/websocket_test/node_modules/es5-ext/object/validate-array-like-object.js deleted file mode 100644 index d7c45b3..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/validate-array-like-object.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var isArrayLike = require("./is-array-like") - , isObject = require("./is-object"); - -module.exports = function (obj) { - if (isObject(obj) && isArrayLike(obj)) return obj; - throw new TypeError(obj + " is not array-like object"); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/validate-array-like.js b/system/websocket_test/node_modules/es5-ext/object/validate-array-like.js deleted file mode 100644 index 07aa794..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/validate-array-like.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var isArrayLike = require("./is-array-like"); - -module.exports = function (obj) { - if (isArrayLike(obj)) return obj; - throw new TypeError(obj + " is not array-like value"); -}; diff --git a/system/websocket_test/node_modules/es5-ext/object/validate-stringifiable-value.js b/system/websocket_test/node_modules/es5-ext/object/validate-stringifiable-value.js deleted file mode 100644 index b58f18c..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/validate-stringifiable-value.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var ensureValue = require("./valid-value") - , stringifiable = require("./validate-stringifiable"); - -module.exports = function (value) { return stringifiable(ensureValue(value)); }; diff --git a/system/websocket_test/node_modules/es5-ext/object/validate-stringifiable.js b/system/websocket_test/node_modules/es5-ext/object/validate-stringifiable.js deleted file mode 100644 index 2b1f127..0000000 --- a/system/websocket_test/node_modules/es5-ext/object/validate-stringifiable.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var isCallable = require("./is-callable"); - -module.exports = function (stringifiable) { - try { - if (stringifiable && isCallable(stringifiable.toString)) return stringifiable.toString(); - return String(stringifiable); - } catch (e) { - throw new TypeError("Passed argument cannot be stringifed"); - } -}; diff --git a/system/websocket_test/node_modules/es5-ext/optional-chaining.js b/system/websocket_test/node_modules/es5-ext/optional-chaining.js deleted file mode 100644 index f181127..0000000 --- a/system/websocket_test/node_modules/es5-ext/optional-chaining.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var isValue = require("./object/is-value"); - -var slice = Array.prototype.slice; - -// eslint-disable-next-line no-unused-vars -module.exports = function (value, propertyName1 /*, …propertyNamen*/) { - var propertyNames = slice.call(arguments, 1), index = 0, length = propertyNames.length; - while (isValue(value) && index < length) value = value[propertyNames[index++]]; - return index === length ? value : undefined; -}; diff --git a/system/websocket_test/node_modules/es5-ext/package.json b/system/websocket_test/node_modules/es5-ext/package.json deleted file mode 100644 index 32383e4..0000000 --- a/system/websocket_test/node_modules/es5-ext/package.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "name": "es5-ext", - "version": "0.10.64", - "description": "ECMAScript extensions and shims", - "author": "Mariusz Nowak (http://www.medikoo.com/)", - "keywords": [ - "ecmascript", - "ecmascript5", - "ecmascript6", - "es5", - "es6", - "extensions", - "ext", - "addons", - "extras", - "harmony", - "javascript", - "polyfill", - "shim", - "util", - "utils", - "utilities" - ], - "repository": "medikoo/es5-ext", - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "esniff": "^2.0.1", - "next-tick": "^1.1.0" - }, - "devDependencies": { - "eslint": "^8.57.0", - "eslint-config-medikoo": "^4.2.0", - "git-list-updated": "^1.2.1", - "github-release-from-cc-changelog": "^2.3.0", - "husky": "^4.3.8", - "lint-staged": "~13.2.3", - "nyc": "^15.1.0", - "plain-promise": "^0.1.1", - "prettier-elastic": "^2.8.8", - "tad": "^3.1.1" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.js": [ - "eslint" - ], - "*.{css,html,js,json,md,yaml,yml}": [ - "prettier -c" - ] - }, - "eslintConfig": { - "extends": "medikoo/es5", - "root": true, - "rules": { - "no-extend-native": "off" - }, - "overrides": [ - { - "files": "global.js", - "globals": { - "__global__": true, - "globalThis": true, - "self": true, - "window": true - }, - "rules": { - "strict": "off" - } - }, - { - "files": "_postinstall.js", - "env": { - "node": true - } - } - ] - }, - "prettier": { - "printWidth": 100, - "tabWidth": 4, - "overrides": [ - { - "files": [ - "*.md", - "*.yml" - ], - "options": { - "tabWidth": 2 - } - } - ] - }, - "nyc": { - "all": true, - "exclude": [ - ".github", - "coverage/**", - "test/**", - "*.config.js" - ], - "reporter": [ - "lcov", - "html", - "text-summary" - ] - }, - "scripts": { - "coverage": "nyc npm test", - "lint": "eslint --ignore-path=.gitignore .", - "lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'", - "postinstall": " node -e \"try{require('./_postinstall')}catch(e){}\" || exit 0", - "prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettier-check:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", - "prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettify:updated": "pipe-git-updated ---base=main -ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write", - "test": "node ./node_modules/tad/bin/tad" - }, - "engines": { - "node": ">=0.10" - }, - "license": "ISC" -} diff --git "a/system/websocket_test/node_modules/es5-ext/promise/\043/as-callback.js" "b/system/websocket_test/node_modules/es5-ext/promise/\043/as-callback.js" deleted file mode 100644 index ba310b3..0000000 --- "a/system/websocket_test/node_modules/es5-ext/promise/\043/as-callback.js" +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var ensurePlainFunction = require("../../object/ensure-plain-function") - , ensureThenable = require("../../object/ensure-thenable") - , microtaskDelay = require("../../function/#/microtask-delay"); - -module.exports = function (callback) { - ensureThenable(this); - ensurePlainFunction(callback); - // Rely on microtaskDelay to escape eventual error swallowing - this.then( - microtaskDelay.call(function (value) { callback(null, value); }), - microtaskDelay.call(function (reason) { callback(reason); }) - ); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/promise/\043/finally/implement.js" "b/system/websocket_test/node_modules/es5-ext/promise/\043/finally/implement.js" deleted file mode 100644 index 77592b3..0000000 --- "a/system/websocket_test/node_modules/es5-ext/promise/\043/finally/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Promise.prototype, "finally", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/promise/\043/finally/index.js" "b/system/websocket_test/node_modules/es5-ext/promise/\043/finally/index.js" deleted file mode 100644 index f6bb447..0000000 --- "a/system/websocket_test/node_modules/es5-ext/promise/\043/finally/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Promise.prototype.finally : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/promise/\043/finally/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/promise/\043/finally/is-implemented.js" deleted file mode 100644 index 0534ce6..0000000 --- "a/system/websocket_test/node_modules/es5-ext/promise/\043/finally/is-implemented.js" +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - if (typeof Promise !== "function") return false; - if (typeof Promise.prototype.finally !== "function") return false; - return true; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/promise/\043/finally/shim.js" "b/system/websocket_test/node_modules/es5-ext/promise/\043/finally/shim.js" deleted file mode 100644 index f29f5b3..0000000 --- "a/system/websocket_test/node_modules/es5-ext/promise/\043/finally/shim.js" +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -var ensurePlainFunction = require("../../../object/ensure-plain-function") - , isThenable = require("../../../object/is-thenable") - , ensureThenable = require("../../../object/ensure-thenable"); - -var resolveCallback = function (callback, next) { - var callbackResult = callback(); - if (!isThenable(callbackResult)) return next(); - return callbackResult.then(next); -}; - -module.exports = function (callback) { - ensureThenable(this); - ensurePlainFunction(callback); - return this.then( - function (result) { - return resolveCallback(callback, function () { return result; }); - }, - function (error) { - return resolveCallback(callback, function () { throw error; }); - } - ); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/promise/\043/index.js" "b/system/websocket_test/node_modules/es5-ext/promise/\043/index.js" deleted file mode 100644 index 4601803..0000000 --- "a/system/websocket_test/node_modules/es5-ext/promise/\043/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = { asCallback: require("./as-callback"), finally: require("./finally") }; diff --git a/system/websocket_test/node_modules/es5-ext/promise/.eslintrc.json b/system/websocket_test/node_modules/es5-ext/promise/.eslintrc.json deleted file mode 100644 index 0d86fe7..0000000 --- a/system/websocket_test/node_modules/es5-ext/promise/.eslintrc.json +++ /dev/null @@ -1 +0,0 @@ -{ "globals": { "Promise": true } } diff --git a/system/websocket_test/node_modules/es5-ext/promise/index.js b/system/websocket_test/node_modules/es5-ext/promise/index.js deleted file mode 100644 index 6aa66bb..0000000 --- a/system/websocket_test/node_modules/es5-ext/promise/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = { "#": require("./#"), "lazy": require("./lazy") }; diff --git a/system/websocket_test/node_modules/es5-ext/promise/lazy.js b/system/websocket_test/node_modules/es5-ext/promise/lazy.js deleted file mode 100644 index ad97a53..0000000 --- a/system/websocket_test/node_modules/es5-ext/promise/lazy.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -var isFunction = require("../function/is-function"); - -module.exports = function (executor) { - var Constructor; - if (isFunction(this)) { - Constructor = this; - } else if (typeof Promise === "function") { - Constructor = Promise; - } else { - throw new TypeError("Could not resolve Promise constuctor"); - } - - var lazyThen; - var promise = new Constructor(function (resolve, reject) { - lazyThen = function (onSuccess, onFailure) { - if (!hasOwnProperty.call(this, "then")) { - // Sanity check - throw new Error("Unexpected (inherited) lazy then invocation"); - } - - try { executor(resolve, reject); } - catch (reason) { reject(reason); } - delete this.then; - return this.then(onSuccess, onFailure); - }; - }); - - return Object.defineProperty(promise, "then", { - configurable: true, - writable: true, - value: lazyThen - }); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/index.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/index.js" deleted file mode 100644 index 9b098e0..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/index.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -module.exports = { - isSticky: require("./is-sticky"), - isUnicode: require("./is-unicode"), - match: require("./match"), - replace: require("./replace"), - search: require("./search"), - split: require("./split") -}; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/is-sticky.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/is-sticky.js" deleted file mode 100644 index 6e99533..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/is-sticky.js" +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var validRegExp = require("../valid-reg-exp") - , re = /\/[a-xz]*y[a-xz]*$/; - -module.exports = function () { return Boolean(String(validRegExp(this)).match(re)); }; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/is-unicode.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/is-unicode.js" deleted file mode 100644 index 63a457f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/is-unicode.js" +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var validRegExp = require("../valid-reg-exp") - , re = /\/[a-xz]*u[a-xz]*$/; - -module.exports = function () { return Boolean(String(validRegExp(this)).match(re)); }; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/match/implement.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/match/implement.js" deleted file mode 100644 index 68dcd55..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/match/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(RegExp.prototype, "match", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/match/index.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/match/index.js" deleted file mode 100644 index 4b33296..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/match/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? RegExp.prototype.match : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/match/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/match/is-implemented.js" deleted file mode 100644 index a5065fc..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/match/is-implemented.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var re = /foo/; - -module.exports = function () { - if (typeof re.match !== "function") return false; - return re.match("barfoobar") && !re.match("elo"); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/match/shim.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/match/shim.js" deleted file mode 100644 index 2955821..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/match/shim.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var validRegExp = require("../../valid-reg-exp"); - -module.exports = function (string) { - validRegExp(this); - return String(string).match(this); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/replace/implement.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/replace/implement.js" deleted file mode 100644 index f990c4f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/replace/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(RegExp.prototype, "replace", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/replace/index.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/replace/index.js" deleted file mode 100644 index be54b52..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/replace/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? RegExp.prototype.replace : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/replace/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/replace/is-implemented.js" deleted file mode 100644 index 0a2e7c2..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/replace/is-implemented.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var re = /foo/; - -module.exports = function () { - if (typeof re.replace !== "function") return false; - return re.replace("foobar", "mar") === "marbar"; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/replace/shim.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/replace/shim.js" deleted file mode 100644 index 66f5d5b..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/replace/shim.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var validRegExp = require("../../valid-reg-exp"); - -module.exports = function (string, replaceValue) { - validRegExp(this); - return String(string).replace(this, replaceValue); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/search/implement.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/search/implement.js" deleted file mode 100644 index df4a337..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/search/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(RegExp.prototype, "search", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/search/index.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/search/index.js" deleted file mode 100644 index 25ca76a..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/search/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? RegExp.prototype.search : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/search/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/search/is-implemented.js" deleted file mode 100644 index 7f38669..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/search/is-implemented.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var re = /foo/; - -module.exports = function () { - if (typeof re.search !== "function") return false; - return re.search("barfoo") === 3; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/search/shim.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/search/shim.js" deleted file mode 100644 index c97a787..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/search/shim.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var validRegExp = require("../../valid-reg-exp"); - -module.exports = function (string) { - validRegExp(this); - return String(string).search(this); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/split/implement.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/split/implement.js" deleted file mode 100644 index b979db0..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/split/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(RegExp.prototype, "split", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/split/index.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/split/index.js" deleted file mode 100644 index 6d4f177..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/split/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? RegExp.prototype.split : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/split/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/split/is-implemented.js" deleted file mode 100644 index 90fca0c..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/split/is-implemented.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var re = /\|/; - -module.exports = function () { - if (typeof re.split !== "function") return false; - return re.split("bar|foo")[1] === "foo"; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/split/shim.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/split/shim.js" deleted file mode 100644 index c9c73cc..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/split/shim.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var validRegExp = require("../../valid-reg-exp"); - -module.exports = function (string) { - validRegExp(this); - return String(string).split(this); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/sticky/implement.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/sticky/implement.js" deleted file mode 100644 index 7864c6c..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/sticky/implement.js" +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var isSticky = require("../is-sticky"); - -if (!require("./is-implemented")()) { - Object.defineProperty(RegExp.prototype, "sticky", { - configurable: true, - enumerable: false, - get: isSticky - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/sticky/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/sticky/is-implemented.js" deleted file mode 100644 index a1ade11..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/sticky/is-implemented.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -module.exports = function () { - var dummyRegExp = /a/; - // We need to do check on instance and not on prototype due to how ES2015 spec evolved: - // https://github.com/tc39/ecma262/issues/262 - // https://github.com/tc39/ecma262/pull/263 - // https://bugs.chromium.org/p/v8/issues/detail?id=4617 - return "sticky" in dummyRegExp; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/unicode/implement.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/unicode/implement.js" deleted file mode 100644 index 8b99be5..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/unicode/implement.js" +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var isUnicode = require("../is-unicode"); - -if (!require("./is-implemented")()) { - Object.defineProperty(RegExp.prototype, "unicode", { - configurable: true, - enumerable: false, - get: isUnicode - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/unicode/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/reg-exp/\043/unicode/is-implemented.js" deleted file mode 100644 index 48605d7..0000000 --- "a/system/websocket_test/node_modules/es5-ext/reg-exp/\043/unicode/is-implemented.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -module.exports = function () { - var dummyRegExp = /a/; - // We need to do check on instance and not on prototype due to how ES2015 spec evolved: - // https://github.com/tc39/ecma262/issues/262 - // https://github.com/tc39/ecma262/pull/263 - // https://bugs.chromium.org/p/v8/issues/detail?id=4617 - return "unicode" in dummyRegExp; -}; diff --git a/system/websocket_test/node_modules/es5-ext/reg-exp/escape.js b/system/websocket_test/node_modules/es5-ext/reg-exp/escape.js deleted file mode 100644 index b65b351..0000000 --- a/system/websocket_test/node_modules/es5-ext/reg-exp/escape.js +++ /dev/null @@ -1,9 +0,0 @@ -// Thanks to Andrew Clover: -// http://stackoverflow.com/questions/3561493 -// /is-there-a-regexp-escape-function-in-javascript - -"use strict"; - -var re = /[-/\\^$*+?.()|[\]{}]/g; - -module.exports = function (str) { return String(str).replace(re, "\\$&"); }; diff --git a/system/websocket_test/node_modules/es5-ext/reg-exp/index.js b/system/websocket_test/node_modules/es5-ext/reg-exp/index.js deleted file mode 100644 index f023fe0..0000000 --- a/system/websocket_test/node_modules/es5-ext/reg-exp/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -module.exports = { - "#": require("./#"), - "escape": require("./escape"), - "isRegExp": require("./is-reg-exp"), - "validRegExp": require("./valid-reg-exp") -}; diff --git a/system/websocket_test/node_modules/es5-ext/reg-exp/is-reg-exp.js b/system/websocket_test/node_modules/es5-ext/reg-exp/is-reg-exp.js deleted file mode 100644 index b966b0f..0000000 --- a/system/websocket_test/node_modules/es5-ext/reg-exp/is-reg-exp.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var objToString = Object.prototype.toString, id = objToString.call(/a/); - -module.exports = function (value) { - return (value && (value instanceof RegExp || objToString.call(value) === id)) || false; -}; diff --git a/system/websocket_test/node_modules/es5-ext/reg-exp/valid-reg-exp.js b/system/websocket_test/node_modules/es5-ext/reg-exp/valid-reg-exp.js deleted file mode 100644 index a05927a..0000000 --- a/system/websocket_test/node_modules/es5-ext/reg-exp/valid-reg-exp.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var isRegExp = require("./is-reg-exp"); - -module.exports = function (value) { - if (!isRegExp(value)) throw new TypeError(value + " is not a RegExp object"); - return value; -}; diff --git a/system/websocket_test/node_modules/es5-ext/safe-to-string.js b/system/websocket_test/node_modules/es5-ext/safe-to-string.js deleted file mode 100644 index f49a238..0000000 --- a/system/websocket_test/node_modules/es5-ext/safe-to-string.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var isCallable = require("./object/is-callable"); - -module.exports = function (value) { - try { - if (value && isCallable(value.toString)) return value.toString(); - return String(value); - } catch (e) { - return ""; - } -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/@@iterator/implement.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/@@iterator/implement.js" deleted file mode 100644 index b51ad9f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/@@iterator/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(String.prototype, require("es6-symbol").iterator, { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/@@iterator/index.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/@@iterator/index.js" deleted file mode 100644 index 4572443..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/@@iterator/index.js" +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() - ? String.prototype[require("es6-symbol").iterator] - : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/@@iterator/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/@@iterator/is-implemented.js" deleted file mode 100644 index bb8a8d6..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/@@iterator/is-implemented.js" +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -var iteratorSymbol = require("es6-symbol").iterator; - -module.exports = function () { - var str = "🙈f", iterator, result; - if (typeof str[iteratorSymbol] !== "function") return false; - iterator = str[iteratorSymbol](); - if (!iterator) return false; - if (typeof iterator.next !== "function") return false; - result = iterator.next(); - if (!result) return false; - if (result.value !== "🙈") return false; - if (result.done !== false) return false; - return true; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/@@iterator/shim.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/@@iterator/shim.js" deleted file mode 100644 index 2160619..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/@@iterator/shim.js" +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var StringIterator = require("es6-iterator/string") - , value = require("../../../object/valid-value"); - -module.exports = function () { return new StringIterator(value(this)); }; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/at.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/at.js" deleted file mode 100644 index a8c2917..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/at.js" +++ /dev/null @@ -1,35 +0,0 @@ -// Based on: https://github.com/mathiasbynens/String.prototype.at -// Thanks @mathiasbynens ! - -"use strict"; - -var toInteger = require("../../number/to-integer") - , validValue = require("../../object/valid-value"); - -module.exports = function (pos) { - var str = String(validValue(this)), size = str.length, cuFirst, cuSecond, nextPos, len; - pos = toInteger(pos); - - // Account for out-of-bounds indices - // The odd lower bound is because the ToInteger operation is - // going to round `n` to `0` for `-1 < n <= 0`. - if (pos <= -1 || pos >= size) return ""; - - // Second half of `ToInteger` - // eslint-disable-next-line no-bitwise - pos |= 0; - // Get the first code unit and code unit value - cuFirst = str.charCodeAt(pos); - nextPos = pos + 1; - len = 1; - if ( - // Check if it’s the start of a surrogate pair - cuFirst >= 0xd800 && - cuFirst <= 0xdbff && // High surrogate - size > nextPos // There is a next code unit - ) { - cuSecond = str.charCodeAt(nextPos); - if (cuSecond >= 0xdc00 && cuSecond <= 0xdfff) len = 2; // Low surrogate - } - return str.slice(pos, pos + len); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/camel-to-hyphen.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/camel-to-hyphen.js" deleted file mode 100644 index 5add3ed..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/camel-to-hyphen.js" +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var replace = String.prototype.replace, re = /([A-Z])/g; - -module.exports = function () { - var str = replace.call(this, re, "-$1").toLowerCase(); - if (str[0] === "-") str = str.slice(1); - return str; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/capitalize.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/capitalize.js" deleted file mode 100644 index fc92a9f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/capitalize.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var value = require("../../object/valid-value"); - -module.exports = function () { - var str = String(value(this)); - return str.charAt(0).toUpperCase() + str.slice(1); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/case-insensitive-compare.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/case-insensitive-compare.js" deleted file mode 100644 index 5d961a5..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/case-insensitive-compare.js" +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var toLowerCase = String.prototype.toLowerCase; - -module.exports = function (other) { - return toLowerCase.call(this).localeCompare(toLowerCase.call(String(other))); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/code-point-at/implement.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/code-point-at/implement.js" deleted file mode 100644 index 25752f9..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/code-point-at/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(String.prototype, "codePointAt", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/code-point-at/index.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/code-point-at/index.js" deleted file mode 100644 index 0a22f84..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/code-point-at/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? String.prototype.codePointAt : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/code-point-at/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/code-point-at/is-implemented.js" deleted file mode 100644 index 47e4c93..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/code-point-at/is-implemented.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var str = "abc\uD834\uDF06def"; - -module.exports = function () { - if (typeof str.codePointAt !== "function") return false; - return str.codePointAt(3) === 0x1d306; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/code-point-at/shim.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/code-point-at/shim.js" deleted file mode 100644 index 0f331c3..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/code-point-at/shim.js" +++ /dev/null @@ -1,26 +0,0 @@ -// Based on: https://github.com/mathiasbynens/String.prototype.codePointAt -// Thanks @mathiasbynens ! - -"use strict"; - -var toInteger = require("../../../number/to-integer") - , validValue = require("../../../object/valid-value"); - -module.exports = function (pos) { - var str = String(validValue(this)), length = str.length, first, second; - pos = toInteger(pos); - - // Account for out-of-bounds indices: - if (pos < 0 || pos >= length) return undefined; - - // Get the first code unit - first = str.charCodeAt(pos); - if (first >= 0xd800 && first <= 0xdbff && length > pos + 1) { - second = str.charCodeAt(pos + 1); - if (second >= 0xdc00 && second <= 0xdfff) { - // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - 0xd800) * 0x400 + second - 0xdc00 + 0x10000; - } - } - return first; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/contains/implement.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/contains/implement.js" deleted file mode 100644 index 03cc091..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/contains/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(String.prototype, "contains", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/contains/index.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/contains/index.js" deleted file mode 100644 index 5f8d993..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/contains/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? String.prototype.contains : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/contains/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/contains/is-implemented.js" deleted file mode 100644 index d9b3e9a..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/contains/is-implemented.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var str = "razdwatrzy"; - -module.exports = function () { - if (typeof str.contains !== "function") return false; - return str.contains("dwa") === true && str.contains("foo") === false; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/contains/shim.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/contains/shim.js" deleted file mode 100644 index de2483d..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/contains/shim.js" +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var indexOf = String.prototype.indexOf; - -module.exports = function (searchString /*, position*/) { - return indexOf.call(this, searchString, arguments[1]) > -1; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/count.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/count.js" deleted file mode 100644 index 7607013..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/count.js" +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var ensureString = require("../../object/validate-stringifiable-value"); - -module.exports = function (search) { - var string = ensureString(this), count = 0, index = 0; - - search = ensureString(search); - if (!search) throw new TypeError("Search string cannot be empty"); - while ((index = string.indexOf(search, index)) !== -1) { - ++count; - index += search.length; - } - return count; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/ends-with/implement.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/ends-with/implement.js" deleted file mode 100644 index 62457cc..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/ends-with/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(String.prototype, "endsWith", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/ends-with/index.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/ends-with/index.js" deleted file mode 100644 index 04c8264..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/ends-with/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? String.prototype.endsWith : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/ends-with/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/ends-with/is-implemented.js" deleted file mode 100644 index 1abaff7..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/ends-with/is-implemented.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var str = "razdwatrzy"; - -module.exports = function () { - if (typeof str.endsWith !== "function") return false; - return str.endsWith("trzy") === true && str.endsWith("raz") === false; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/ends-with/shim.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/ends-with/shim.js" deleted file mode 100644 index c5371aa..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/ends-with/shim.js" +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -var toInteger = require("../../../number/to-integer") - , value = require("../../../object/valid-value") - , isValue = require("../../../object/is-value") - , min = Math.min - , max = Math.max; - -module.exports = function (searchString /*, endPosition*/) { - var self, start, endPos; - self = String(value(this)); - searchString = String(searchString); - endPos = arguments[1]; - start = - (isValue(endPos) ? min(max(toInteger(endPos), 0), self.length) : self.length) - - searchString.length; - return start < 0 ? false : self.indexOf(searchString, start) === start; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/hyphen-to-camel.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/hyphen-to-camel.js" deleted file mode 100644 index 9feef5b..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/hyphen-to-camel.js" +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var replace = String.prototype.replace, re = /-([a-z0-9])/g; -var toUpperCase = function (ignored, a) { return a.toUpperCase(); }; - -module.exports = function () { return replace.call(this, re, toUpperCase); }; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/indent.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/indent.js" deleted file mode 100644 index df8869d..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/indent.js" +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var isValue = require("../../object/is-value") - , repeat = require("./repeat") - , replace = String.prototype.replace - , re = /(\r\n|[\n\r\u2028\u2029])([\u0000-\u0009\u000b-\uffff]+)/g; - -module.exports = function (indent /*, count*/) { - var count = arguments[1]; - indent = repeat.call(String(indent), isValue(count) ? count : 1); - return indent + replace.call(this, re, "$1" + indent + "$2"); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/index.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/index.js" deleted file mode 100644 index 2344489..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/index.js" +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -module.exports = { - "@@iterator": require("./@@iterator"), - "at": require("./at"), - "count": require("./count"), - "camelToHyphen": require("./camel-to-hyphen"), - "capitalize": require("./capitalize"), - "caseInsensitiveCompare": require("./case-insensitive-compare"), - "codePointAt": require("./code-point-at"), - "contains": require("./contains"), - "hyphenToCamel": require("./hyphen-to-camel"), - "endsWith": require("./ends-with"), - "indent": require("./indent"), - "last": require("./last"), - "normalize": require("./normalize"), - "pad": require("./pad"), - "plainReplace": require("./plain-replace"), - "plainReplaceAll": require("./plain-replace-all"), - "repeat": require("./repeat"), - "startsWith": require("./starts-with"), - "uncapitalize": require("./uncapitalize") -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/last.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/last.js" deleted file mode 100644 index f5c957f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/last.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var value = require("../../object/valid-value"); - -module.exports = function () { - var self = String(value(this)), length = self.length; - return length ? self[length - 1] : null; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/normalize/_data.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/normalize/_data.js" deleted file mode 100644 index ae4f153..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/normalize/_data.js" +++ /dev/null @@ -1,6988 +0,0 @@ -/* eslint max-lines: "off", no-sparse-arrays: "off", comma-style: "off" */ - -"use strict"; - -module.exports = { - 0: { - 60: [, , { 824: 8814 }], - 61: [, , { 824: 8800 }], - 62: [, , { 824: 8815 }], - 65: [ - , , - { - 768: 192, - 769: 193, - 770: 194, - 771: 195, - 772: 256, - 774: 258, - 775: 550, - 776: 196, - 777: 7842, - 778: 197, - 780: 461, - 783: 512, - 785: 514, - 803: 7840, - 805: 7680, - 808: 260 - } - ], - 66: [, , { 775: 7682, 803: 7684, 817: 7686 }], - 67: [, , { 769: 262, 770: 264, 775: 266, 780: 268, 807: 199 }], - 68: [, , { 775: 7690, 780: 270, 803: 7692, 807: 7696, 813: 7698, 817: 7694 }], - 69: [ - , , - { - 768: 200, - 769: 201, - 770: 202, - 771: 7868, - 772: 274, - 774: 276, - 775: 278, - 776: 203, - 777: 7866, - 780: 282, - 783: 516, - 785: 518, - 803: 7864, - 807: 552, - 808: 280, - 813: 7704, - 816: 7706 - } - ], - 70: [, , { 775: 7710 }], - 71: [, , { 769: 500, 770: 284, 772: 7712, 774: 286, 775: 288, 780: 486, 807: 290 }], - 72: [, , { 770: 292, 775: 7714, 776: 7718, 780: 542, 803: 7716, 807: 7720, 814: 7722 }], - 73: [ - , , - { - 768: 204, - 769: 205, - 770: 206, - 771: 296, - 772: 298, - 774: 300, - 775: 304, - 776: 207, - 777: 7880, - 780: 463, - 783: 520, - 785: 522, - 803: 7882, - 808: 302, - 816: 7724 - } - ], - 74: [, , { 770: 308 }], - 75: [, , { 769: 7728, 780: 488, 803: 7730, 807: 310, 817: 7732 }], - 76: [, , { 769: 313, 780: 317, 803: 7734, 807: 315, 813: 7740, 817: 7738 }], - 77: [, , { 769: 7742, 775: 7744, 803: 7746 }], - 78: [ - , , - { - 768: 504, - 769: 323, - 771: 209, - 775: 7748, - 780: 327, - 803: 7750, - 807: 325, - 813: 7754, - 817: 7752 - } - ], - 79: [ - , , - { - 768: 210, - 769: 211, - 770: 212, - 771: 213, - 772: 332, - 774: 334, - 775: 558, - 776: 214, - 777: 7886, - 779: 336, - 780: 465, - 783: 524, - 785: 526, - 795: 416, - 803: 7884, - 808: 490 - } - ], - 80: [, , { 769: 7764, 775: 7766 }], - 82: [ - , , - { 769: 340, 775: 7768, 780: 344, 783: 528, 785: 530, 803: 7770, 807: 342, 817: 7774 } - ], - 83: [, , { 769: 346, 770: 348, 775: 7776, 780: 352, 803: 7778, 806: 536, 807: 350 }], - 84: [, , { 775: 7786, 780: 356, 803: 7788, 806: 538, 807: 354, 813: 7792, 817: 7790 }], - 85: [ - , , - { - 768: 217, - 769: 218, - 770: 219, - 771: 360, - 772: 362, - 774: 364, - 776: 220, - 777: 7910, - 778: 366, - 779: 368, - 780: 467, - 783: 532, - 785: 534, - 795: 431, - 803: 7908, - 804: 7794, - 808: 370, - 813: 7798, - 816: 7796 - } - ], - 86: [, , { 771: 7804, 803: 7806 }], - 87: [, , { 768: 7808, 769: 7810, 770: 372, 775: 7814, 776: 7812, 803: 7816 }], - 88: [, , { 775: 7818, 776: 7820 }], - 89: [ - , , - { - 768: 7922, - 769: 221, - 770: 374, - 771: 7928, - 772: 562, - 775: 7822, - 776: 376, - 777: 7926, - 803: 7924 - } - ], - 90: [, , { 769: 377, 770: 7824, 775: 379, 780: 381, 803: 7826, 817: 7828 }], - 97: [ - , , - { - 768: 224, - 769: 225, - 770: 226, - 771: 227, - 772: 257, - 774: 259, - 775: 551, - 776: 228, - 777: 7843, - 778: 229, - 780: 462, - 783: 513, - 785: 515, - 803: 7841, - 805: 7681, - 808: 261 - } - ], - 98: [, , { 775: 7683, 803: 7685, 817: 7687 }], - 99: [, , { 769: 263, 770: 265, 775: 267, 780: 269, 807: 231 }], - 100: [, , { 775: 7691, 780: 271, 803: 7693, 807: 7697, 813: 7699, 817: 7695 }], - 101: [ - , , - { - 768: 232, - 769: 233, - 770: 234, - 771: 7869, - 772: 275, - 774: 277, - 775: 279, - 776: 235, - 777: 7867, - 780: 283, - 783: 517, - 785: 519, - 803: 7865, - 807: 553, - 808: 281, - 813: 7705, - 816: 7707 - } - ], - 102: [, , { 775: 7711 }], - 103: [, , { 769: 501, 770: 285, 772: 7713, 774: 287, 775: 289, 780: 487, 807: 291 }], - 104: [ - , , - { 770: 293, 775: 7715, 776: 7719, 780: 543, 803: 7717, 807: 7721, 814: 7723, 817: 7830 } - ], - 105: [ - , , - { - 768: 236, - 769: 237, - 770: 238, - 771: 297, - 772: 299, - 774: 301, - 776: 239, - 777: 7881, - 780: 464, - 783: 521, - 785: 523, - 803: 7883, - 808: 303, - 816: 7725 - } - ], - 106: [, , { 770: 309, 780: 496 }], - 107: [, , { 769: 7729, 780: 489, 803: 7731, 807: 311, 817: 7733 }], - 108: [, , { 769: 314, 780: 318, 803: 7735, 807: 316, 813: 7741, 817: 7739 }], - 109: [, , { 769: 7743, 775: 7745, 803: 7747 }], - 110: [ - , , - { - 768: 505, - 769: 324, - 771: 241, - 775: 7749, - 780: 328, - 803: 7751, - 807: 326, - 813: 7755, - 817: 7753 - } - ], - 111: [ - , , - { - 768: 242, - 769: 243, - 770: 244, - 771: 245, - 772: 333, - 774: 335, - 775: 559, - 776: 246, - 777: 7887, - 779: 337, - 780: 466, - 783: 525, - 785: 527, - 795: 417, - 803: 7885, - 808: 491 - } - ], - 112: [, , { 769: 7765, 775: 7767 }], - 114: [ - , , - { 769: 341, 775: 7769, 780: 345, 783: 529, 785: 531, 803: 7771, 807: 343, 817: 7775 } - ], - 115: [, , { 769: 347, 770: 349, 775: 7777, 780: 353, 803: 7779, 806: 537, 807: 351 }], - 116: [ - , , - { 775: 7787, 776: 7831, 780: 357, 803: 7789, 806: 539, 807: 355, 813: 7793, 817: 7791 } - ], - 117: [ - , , - { - 768: 249, - 769: 250, - 770: 251, - 771: 361, - 772: 363, - 774: 365, - 776: 252, - 777: 7911, - 778: 367, - 779: 369, - 780: 468, - 783: 533, - 785: 535, - 795: 432, - 803: 7909, - 804: 7795, - 808: 371, - 813: 7799, - 816: 7797 - } - ], - 118: [, , { 771: 7805, 803: 7807 }], - 119: [, , { 768: 7809, 769: 7811, 770: 373, 775: 7815, 776: 7813, 778: 7832, 803: 7817 }], - 120: [, , { 775: 7819, 776: 7821 }], - 121: [ - , , - { - 768: 7923, - 769: 253, - 770: 375, - 771: 7929, - 772: 563, - 775: 7823, - 776: 255, - 777: 7927, - 778: 7833, - 803: 7925 - } - ], - 122: [, , { 769: 378, 770: 7825, 775: 380, 780: 382, 803: 7827, 817: 7829 }], - 160: [[32], 256], - 168: [[32, 776], 256, { 768: 8173, 769: 901, 834: 8129 }], - 170: [[97], 256], - 175: [[32, 772], 256], - 178: [[50], 256], - 179: [[51], 256], - 180: [[32, 769], 256], - 181: [[956], 256], - 184: [[32, 807], 256], - 185: [[49], 256], - 186: [[111], 256], - 188: [[49, 8260, 52], 256], - 189: [[49, 8260, 50], 256], - 190: [[51, 8260, 52], 256], - 192: [[65, 768]], - 193: [[65, 769]], - 194: [[65, 770], , { 768: 7846, 769: 7844, 771: 7850, 777: 7848 }], - 195: [[65, 771]], - 196: [[65, 776], , { 772: 478 }], - 197: [[65, 778], , { 769: 506 }], - 198: [, , { 769: 508, 772: 482 }], - 199: [[67, 807], , { 769: 7688 }], - 200: [[69, 768]], - 201: [[69, 769]], - 202: [[69, 770], , { 768: 7872, 769: 7870, 771: 7876, 777: 7874 }], - 203: [[69, 776]], - 204: [[73, 768]], - 205: [[73, 769]], - 206: [[73, 770]], - 207: [[73, 776], , { 769: 7726 }], - 209: [[78, 771]], - 210: [[79, 768]], - 211: [[79, 769]], - 212: [[79, 770], , { 768: 7890, 769: 7888, 771: 7894, 777: 7892 }], - 213: [[79, 771], , { 769: 7756, 772: 556, 776: 7758 }], - 214: [[79, 776], , { 772: 554 }], - 216: [, , { 769: 510 }], - 217: [[85, 768]], - 218: [[85, 769]], - 219: [[85, 770]], - 220: [[85, 776], , { 768: 475, 769: 471, 772: 469, 780: 473 }], - 221: [[89, 769]], - 224: [[97, 768]], - 225: [[97, 769]], - 226: [[97, 770], , { 768: 7847, 769: 7845, 771: 7851, 777: 7849 }], - 227: [[97, 771]], - 228: [[97, 776], , { 772: 479 }], - 229: [[97, 778], , { 769: 507 }], - 230: [, , { 769: 509, 772: 483 }], - 231: [[99, 807], , { 769: 7689 }], - 232: [[101, 768]], - 233: [[101, 769]], - 234: [[101, 770], , { 768: 7873, 769: 7871, 771: 7877, 777: 7875 }], - 235: [[101, 776]], - 236: [[105, 768]], - 237: [[105, 769]], - 238: [[105, 770]], - 239: [[105, 776], , { 769: 7727 }], - 241: [[110, 771]], - 242: [[111, 768]], - 243: [[111, 769]], - 244: [[111, 770], , { 768: 7891, 769: 7889, 771: 7895, 777: 7893 }], - 245: [[111, 771], , { 769: 7757, 772: 557, 776: 7759 }], - 246: [[111, 776], , { 772: 555 }], - 248: [, , { 769: 511 }], - 249: [[117, 768]], - 250: [[117, 769]], - 251: [[117, 770]], - 252: [[117, 776], , { 768: 476, 769: 472, 772: 470, 780: 474 }], - 253: [[121, 769]], - 255: [[121, 776]] - }, - 256: { - 256: [[65, 772]], - 257: [[97, 772]], - 258: [[65, 774], , { 768: 7856, 769: 7854, 771: 7860, 777: 7858 }], - 259: [[97, 774], , { 768: 7857, 769: 7855, 771: 7861, 777: 7859 }], - 260: [[65, 808]], - 261: [[97, 808]], - 262: [[67, 769]], - 263: [[99, 769]], - 264: [[67, 770]], - 265: [[99, 770]], - 266: [[67, 775]], - 267: [[99, 775]], - 268: [[67, 780]], - 269: [[99, 780]], - 270: [[68, 780]], - 271: [[100, 780]], - 274: [[69, 772], , { 768: 7700, 769: 7702 }], - 275: [[101, 772], , { 768: 7701, 769: 7703 }], - 276: [[69, 774]], - 277: [[101, 774]], - 278: [[69, 775]], - 279: [[101, 775]], - 280: [[69, 808]], - 281: [[101, 808]], - 282: [[69, 780]], - 283: [[101, 780]], - 284: [[71, 770]], - 285: [[103, 770]], - 286: [[71, 774]], - 287: [[103, 774]], - 288: [[71, 775]], - 289: [[103, 775]], - 290: [[71, 807]], - 291: [[103, 807]], - 292: [[72, 770]], - 293: [[104, 770]], - 296: [[73, 771]], - 297: [[105, 771]], - 298: [[73, 772]], - 299: [[105, 772]], - 300: [[73, 774]], - 301: [[105, 774]], - 302: [[73, 808]], - 303: [[105, 808]], - 304: [[73, 775]], - 306: [[73, 74], 256], - 307: [[105, 106], 256], - 308: [[74, 770]], - 309: [[106, 770]], - 310: [[75, 807]], - 311: [[107, 807]], - 313: [[76, 769]], - 314: [[108, 769]], - 315: [[76, 807]], - 316: [[108, 807]], - 317: [[76, 780]], - 318: [[108, 780]], - 319: [[76, 183], 256], - 320: [[108, 183], 256], - 323: [[78, 769]], - 324: [[110, 769]], - 325: [[78, 807]], - 326: [[110, 807]], - 327: [[78, 780]], - 328: [[110, 780]], - 329: [[700, 110], 256], - 332: [[79, 772], , { 768: 7760, 769: 7762 }], - 333: [[111, 772], , { 768: 7761, 769: 7763 }], - 334: [[79, 774]], - 335: [[111, 774]], - 336: [[79, 779]], - 337: [[111, 779]], - 340: [[82, 769]], - 341: [[114, 769]], - 342: [[82, 807]], - 343: [[114, 807]], - 344: [[82, 780]], - 345: [[114, 780]], - 346: [[83, 769], , { 775: 7780 }], - 347: [[115, 769], , { 775: 7781 }], - 348: [[83, 770]], - 349: [[115, 770]], - 350: [[83, 807]], - 351: [[115, 807]], - 352: [[83, 780], , { 775: 7782 }], - 353: [[115, 780], , { 775: 7783 }], - 354: [[84, 807]], - 355: [[116, 807]], - 356: [[84, 780]], - 357: [[116, 780]], - 360: [[85, 771], , { 769: 7800 }], - 361: [[117, 771], , { 769: 7801 }], - 362: [[85, 772], , { 776: 7802 }], - 363: [[117, 772], , { 776: 7803 }], - 364: [[85, 774]], - 365: [[117, 774]], - 366: [[85, 778]], - 367: [[117, 778]], - 368: [[85, 779]], - 369: [[117, 779]], - 370: [[85, 808]], - 371: [[117, 808]], - 372: [[87, 770]], - 373: [[119, 770]], - 374: [[89, 770]], - 375: [[121, 770]], - 376: [[89, 776]], - 377: [[90, 769]], - 378: [[122, 769]], - 379: [[90, 775]], - 380: [[122, 775]], - 381: [[90, 780]], - 382: [[122, 780]], - 383: [[115], 256, { 775: 7835 }], - 416: [[79, 795], , { 768: 7900, 769: 7898, 771: 7904, 777: 7902, 803: 7906 }], - 417: [[111, 795], , { 768: 7901, 769: 7899, 771: 7905, 777: 7903, 803: 7907 }], - 431: [[85, 795], , { 768: 7914, 769: 7912, 771: 7918, 777: 7916, 803: 7920 }], - 432: [[117, 795], , { 768: 7915, 769: 7913, 771: 7919, 777: 7917, 803: 7921 }], - 439: [, , { 780: 494 }], - 452: [[68, 381], 256], - 453: [[68, 382], 256], - 454: [[100, 382], 256], - 455: [[76, 74], 256], - 456: [[76, 106], 256], - 457: [[108, 106], 256], - 458: [[78, 74], 256], - 459: [[78, 106], 256], - 460: [[110, 106], 256], - 461: [[65, 780]], - 462: [[97, 780]], - 463: [[73, 780]], - 464: [[105, 780]], - 465: [[79, 780]], - 466: [[111, 780]], - 467: [[85, 780]], - 468: [[117, 780]], - 469: [[220, 772]], - 470: [[252, 772]], - 471: [[220, 769]], - 472: [[252, 769]], - 473: [[220, 780]], - 474: [[252, 780]], - 475: [[220, 768]], - 476: [[252, 768]], - 478: [[196, 772]], - 479: [[228, 772]], - 480: [[550, 772]], - 481: [[551, 772]], - 482: [[198, 772]], - 483: [[230, 772]], - 486: [[71, 780]], - 487: [[103, 780]], - 488: [[75, 780]], - 489: [[107, 780]], - 490: [[79, 808], , { 772: 492 }], - 491: [[111, 808], , { 772: 493 }], - 492: [[490, 772]], - 493: [[491, 772]], - 494: [[439, 780]], - 495: [[658, 780]], - 496: [[106, 780]], - 497: [[68, 90], 256], - 498: [[68, 122], 256], - 499: [[100, 122], 256], - 500: [[71, 769]], - 501: [[103, 769]], - 504: [[78, 768]], - 505: [[110, 768]], - 506: [[197, 769]], - 507: [[229, 769]], - 508: [[198, 769]], - 509: [[230, 769]], - 510: [[216, 769]], - 511: [[248, 769]], - 66045: [, 220] - }, - 512: { - 512: [[65, 783]], - 513: [[97, 783]], - 514: [[65, 785]], - 515: [[97, 785]], - 516: [[69, 783]], - 517: [[101, 783]], - 518: [[69, 785]], - 519: [[101, 785]], - 520: [[73, 783]], - 521: [[105, 783]], - 522: [[73, 785]], - 523: [[105, 785]], - 524: [[79, 783]], - 525: [[111, 783]], - 526: [[79, 785]], - 527: [[111, 785]], - 528: [[82, 783]], - 529: [[114, 783]], - 530: [[82, 785]], - 531: [[114, 785]], - 532: [[85, 783]], - 533: [[117, 783]], - 534: [[85, 785]], - 535: [[117, 785]], - 536: [[83, 806]], - 537: [[115, 806]], - 538: [[84, 806]], - 539: [[116, 806]], - 542: [[72, 780]], - 543: [[104, 780]], - 550: [[65, 775], , { 772: 480 }], - 551: [[97, 775], , { 772: 481 }], - 552: [[69, 807], , { 774: 7708 }], - 553: [[101, 807], , { 774: 7709 }], - 554: [[214, 772]], - 555: [[246, 772]], - 556: [[213, 772]], - 557: [[245, 772]], - 558: [[79, 775], , { 772: 560 }], - 559: [[111, 775], , { 772: 561 }], - 560: [[558, 772]], - 561: [[559, 772]], - 562: [[89, 772]], - 563: [[121, 772]], - 658: [, , { 780: 495 }], - 688: [[104], 256], - 689: [[614], 256], - 690: [[106], 256], - 691: [[114], 256], - 692: [[633], 256], - 693: [[635], 256], - 694: [[641], 256], - 695: [[119], 256], - 696: [[121], 256], - 728: [[32, 774], 256], - 729: [[32, 775], 256], - 730: [[32, 778], 256], - 731: [[32, 808], 256], - 732: [[32, 771], 256], - 733: [[32, 779], 256], - 736: [[611], 256], - 737: [[108], 256], - 738: [[115], 256], - 739: [[120], 256], - 740: [[661], 256] - }, - 768: { - 768: [, 230], - 769: [, 230], - 770: [, 230], - 771: [, 230], - 772: [, 230], - 773: [, 230], - 774: [, 230], - 775: [, 230], - 776: [, 230, { 769: 836 }], - 777: [, 230], - 778: [, 230], - 779: [, 230], - 780: [, 230], - 781: [, 230], - 782: [, 230], - 783: [, 230], - 784: [, 230], - 785: [, 230], - 786: [, 230], - 787: [, 230], - 788: [, 230], - 789: [, 232], - 790: [, 220], - 791: [, 220], - 792: [, 220], - 793: [, 220], - 794: [, 232], - 795: [, 216], - 796: [, 220], - 797: [, 220], - 798: [, 220], - 799: [, 220], - 800: [, 220], - 801: [, 202], - 802: [, 202], - 803: [, 220], - 804: [, 220], - 805: [, 220], - 806: [, 220], - 807: [, 202], - 808: [, 202], - 809: [, 220], - 810: [, 220], - 811: [, 220], - 812: [, 220], - 813: [, 220], - 814: [, 220], - 815: [, 220], - 816: [, 220], - 817: [, 220], - 818: [, 220], - 819: [, 220], - 820: [, 1], - 821: [, 1], - 822: [, 1], - 823: [, 1], - 824: [, 1], - 825: [, 220], - 826: [, 220], - 827: [, 220], - 828: [, 220], - 829: [, 230], - 830: [, 230], - 831: [, 230], - 832: [[768], 230], - 833: [[769], 230], - 834: [, 230], - 835: [[787], 230], - 836: [[776, 769], 230], - 837: [, 240], - 838: [, 230], - 839: [, 220], - 840: [, 220], - 841: [, 220], - 842: [, 230], - 843: [, 230], - 844: [, 230], - 845: [, 220], - 846: [, 220], - 848: [, 230], - 849: [, 230], - 850: [, 230], - 851: [, 220], - 852: [, 220], - 853: [, 220], - 854: [, 220], - 855: [, 230], - 856: [, 232], - 857: [, 220], - 858: [, 220], - 859: [, 230], - 860: [, 233], - 861: [, 234], - 862: [, 234], - 863: [, 233], - 864: [, 234], - 865: [, 234], - 866: [, 233], - 867: [, 230], - 868: [, 230], - 869: [, 230], - 870: [, 230], - 871: [, 230], - 872: [, 230], - 873: [, 230], - 874: [, 230], - 875: [, 230], - 876: [, 230], - 877: [, 230], - 878: [, 230], - 879: [, 230], - 884: [[697]], - 890: [[32, 837], 256], - 894: [[59]], - 900: [[32, 769], 256], - 901: [[168, 769]], - 902: [[913, 769]], - 903: [[183]], - 904: [[917, 769]], - 905: [[919, 769]], - 906: [[921, 769]], - 908: [[927, 769]], - 910: [[933, 769]], - 911: [[937, 769]], - 912: [[970, 769]], - 913: [, , { 768: 8122, 769: 902, 772: 8121, 774: 8120, 787: 7944, 788: 7945, 837: 8124 }], - 917: [, , { 768: 8136, 769: 904, 787: 7960, 788: 7961 }], - 919: [, , { 768: 8138, 769: 905, 787: 7976, 788: 7977, 837: 8140 }], - 921: [, , { 768: 8154, 769: 906, 772: 8153, 774: 8152, 776: 938, 787: 7992, 788: 7993 }], - 927: [, , { 768: 8184, 769: 908, 787: 8008, 788: 8009 }], - 929: [, , { 788: 8172 }], - 933: [, , { 768: 8170, 769: 910, 772: 8169, 774: 8168, 776: 939, 788: 8025 }], - 937: [, , { 768: 8186, 769: 911, 787: 8040, 788: 8041, 837: 8188 }], - 938: [[921, 776]], - 939: [[933, 776]], - 940: [[945, 769], , { 837: 8116 }], - 941: [[949, 769]], - 942: [[951, 769], , { 837: 8132 }], - 943: [[953, 769]], - 944: [[971, 769]], - 945: [ - , , - { - 768: 8048, - 769: 940, - 772: 8113, - 774: 8112, - 787: 7936, - 788: 7937, - 834: 8118, - 837: 8115 - } - ], - 949: [, , { 768: 8050, 769: 941, 787: 7952, 788: 7953 }], - 951: [, , { 768: 8052, 769: 942, 787: 7968, 788: 7969, 834: 8134, 837: 8131 }], - 953: [ - , , - { 768: 8054, 769: 943, 772: 8145, 774: 8144, 776: 970, 787: 7984, 788: 7985, 834: 8150 } - ], - 959: [, , { 768: 8056, 769: 972, 787: 8000, 788: 8001 }], - 961: [, , { 787: 8164, 788: 8165 }], - 965: [ - , , - { 768: 8058, 769: 973, 772: 8161, 774: 8160, 776: 971, 787: 8016, 788: 8017, 834: 8166 } - ], - 969: [, , { 768: 8060, 769: 974, 787: 8032, 788: 8033, 834: 8182, 837: 8179 }], - 970: [[953, 776], , { 768: 8146, 769: 912, 834: 8151 }], - 971: [[965, 776], , { 768: 8162, 769: 944, 834: 8167 }], - 972: [[959, 769]], - 973: [[965, 769]], - 974: [[969, 769], , { 837: 8180 }], - 976: [[946], 256], - 977: [[952], 256], - 978: [[933], 256, { 769: 979, 776: 980 }], - 979: [[978, 769]], - 980: [[978, 776]], - 981: [[966], 256], - 982: [[960], 256], - 1008: [[954], 256], - 1009: [[961], 256], - 1010: [[962], 256], - 1012: [[920], 256], - 1013: [[949], 256], - 1017: [[931], 256] - }, - 1024: { - 1024: [[1045, 768]], - 1025: [[1045, 776]], - 1027: [[1043, 769]], - 1030: [, , { 776: 1031 }], - 1031: [[1030, 776]], - 1036: [[1050, 769]], - 1037: [[1048, 768]], - 1038: [[1059, 774]], - 1040: [, , { 774: 1232, 776: 1234 }], - 1043: [, , { 769: 1027 }], - 1045: [, , { 768: 1024, 774: 1238, 776: 1025 }], - 1046: [, , { 774: 1217, 776: 1244 }], - 1047: [, , { 776: 1246 }], - 1048: [, , { 768: 1037, 772: 1250, 774: 1049, 776: 1252 }], - 1049: [[1048, 774]], - 1050: [, , { 769: 1036 }], - 1054: [, , { 776: 1254 }], - 1059: [, , { 772: 1262, 774: 1038, 776: 1264, 779: 1266 }], - 1063: [, , { 776: 1268 }], - 1067: [, , { 776: 1272 }], - 1069: [, , { 776: 1260 }], - 1072: [, , { 774: 1233, 776: 1235 }], - 1075: [, , { 769: 1107 }], - 1077: [, , { 768: 1104, 774: 1239, 776: 1105 }], - 1078: [, , { 774: 1218, 776: 1245 }], - 1079: [, , { 776: 1247 }], - 1080: [, , { 768: 1117, 772: 1251, 774: 1081, 776: 1253 }], - 1081: [[1080, 774]], - 1082: [, , { 769: 1116 }], - 1086: [, , { 776: 1255 }], - 1091: [, , { 772: 1263, 774: 1118, 776: 1265, 779: 1267 }], - 1095: [, , { 776: 1269 }], - 1099: [, , { 776: 1273 }], - 1101: [, , { 776: 1261 }], - 1104: [[1077, 768]], - 1105: [[1077, 776]], - 1107: [[1075, 769]], - 1110: [, , { 776: 1111 }], - 1111: [[1110, 776]], - 1116: [[1082, 769]], - 1117: [[1080, 768]], - 1118: [[1091, 774]], - 1140: [, , { 783: 1142 }], - 1141: [, , { 783: 1143 }], - 1142: [[1140, 783]], - 1143: [[1141, 783]], - 1155: [, 230], - 1156: [, 230], - 1157: [, 230], - 1158: [, 230], - 1159: [, 230], - 1217: [[1046, 774]], - 1218: [[1078, 774]], - 1232: [[1040, 774]], - 1233: [[1072, 774]], - 1234: [[1040, 776]], - 1235: [[1072, 776]], - 1238: [[1045, 774]], - 1239: [[1077, 774]], - 1240: [, , { 776: 1242 }], - 1241: [, , { 776: 1243 }], - 1242: [[1240, 776]], - 1243: [[1241, 776]], - 1244: [[1046, 776]], - 1245: [[1078, 776]], - 1246: [[1047, 776]], - 1247: [[1079, 776]], - 1250: [[1048, 772]], - 1251: [[1080, 772]], - 1252: [[1048, 776]], - 1253: [[1080, 776]], - 1254: [[1054, 776]], - 1255: [[1086, 776]], - 1256: [, , { 776: 1258 }], - 1257: [, , { 776: 1259 }], - 1258: [[1256, 776]], - 1259: [[1257, 776]], - 1260: [[1069, 776]], - 1261: [[1101, 776]], - 1262: [[1059, 772]], - 1263: [[1091, 772]], - 1264: [[1059, 776]], - 1265: [[1091, 776]], - 1266: [[1059, 779]], - 1267: [[1091, 779]], - 1268: [[1063, 776]], - 1269: [[1095, 776]], - 1272: [[1067, 776]], - 1273: [[1099, 776]] - }, - 1280: { - 1415: [[1381, 1410], 256], - 1425: [, 220], - 1426: [, 230], - 1427: [, 230], - 1428: [, 230], - 1429: [, 230], - 1430: [, 220], - 1431: [, 230], - 1432: [, 230], - 1433: [, 230], - 1434: [, 222], - 1435: [, 220], - 1436: [, 230], - 1437: [, 230], - 1438: [, 230], - 1439: [, 230], - 1440: [, 230], - 1441: [, 230], - 1442: [, 220], - 1443: [, 220], - 1444: [, 220], - 1445: [, 220], - 1446: [, 220], - 1447: [, 220], - 1448: [, 230], - 1449: [, 230], - 1450: [, 220], - 1451: [, 230], - 1452: [, 230], - 1453: [, 222], - 1454: [, 228], - 1455: [, 230], - 1456: [, 10], - 1457: [, 11], - 1458: [, 12], - 1459: [, 13], - 1460: [, 14], - 1461: [, 15], - 1462: [, 16], - 1463: [, 17], - 1464: [, 18], - 1465: [, 19], - 1466: [, 19], - 1467: [, 20], - 1468: [, 21], - 1469: [, 22], - 1471: [, 23], - 1473: [, 24], - 1474: [, 25], - 1476: [, 230], - 1477: [, 220], - 1479: [, 18] - }, - 1536: { - 1552: [, 230], - 1553: [, 230], - 1554: [, 230], - 1555: [, 230], - 1556: [, 230], - 1557: [, 230], - 1558: [, 230], - 1559: [, 230], - 1560: [, 30], - 1561: [, 31], - 1562: [, 32], - 1570: [[1575, 1619]], - 1571: [[1575, 1620]], - 1572: [[1608, 1620]], - 1573: [[1575, 1621]], - 1574: [[1610, 1620]], - 1575: [, , { 1619: 1570, 1620: 1571, 1621: 1573 }], - 1608: [, , { 1620: 1572 }], - 1610: [, , { 1620: 1574 }], - 1611: [, 27], - 1612: [, 28], - 1613: [, 29], - 1614: [, 30], - 1615: [, 31], - 1616: [, 32], - 1617: [, 33], - 1618: [, 34], - 1619: [, 230], - 1620: [, 230], - 1621: [, 220], - 1622: [, 220], - 1623: [, 230], - 1624: [, 230], - 1625: [, 230], - 1626: [, 230], - 1627: [, 230], - 1628: [, 220], - 1629: [, 230], - 1630: [, 230], - 1631: [, 220], - 1648: [, 35], - 1653: [[1575, 1652], 256], - 1654: [[1608, 1652], 256], - 1655: [[1735, 1652], 256], - 1656: [[1610, 1652], 256], - 1728: [[1749, 1620]], - 1729: [, , { 1620: 1730 }], - 1730: [[1729, 1620]], - 1746: [, , { 1620: 1747 }], - 1747: [[1746, 1620]], - 1749: [, , { 1620: 1728 }], - 1750: [, 230], - 1751: [, 230], - 1752: [, 230], - 1753: [, 230], - 1754: [, 230], - 1755: [, 230], - 1756: [, 230], - 1759: [, 230], - 1760: [, 230], - 1761: [, 230], - 1762: [, 230], - 1763: [, 220], - 1764: [, 230], - 1767: [, 230], - 1768: [, 230], - 1770: [, 220], - 1771: [, 230], - 1772: [, 230], - 1773: [, 220] - }, - 1792: { - 1809: [, 36], - 1840: [, 230], - 1841: [, 220], - 1842: [, 230], - 1843: [, 230], - 1844: [, 220], - 1845: [, 230], - 1846: [, 230], - 1847: [, 220], - 1848: [, 220], - 1849: [, 220], - 1850: [, 230], - 1851: [, 220], - 1852: [, 220], - 1853: [, 230], - 1854: [, 220], - 1855: [, 230], - 1856: [, 230], - 1857: [, 230], - 1858: [, 220], - 1859: [, 230], - 1860: [, 220], - 1861: [, 230], - 1862: [, 220], - 1863: [, 230], - 1864: [, 220], - 1865: [, 230], - 1866: [, 230], - 2027: [, 230], - 2028: [, 230], - 2029: [, 230], - 2030: [, 230], - 2031: [, 230], - 2032: [, 230], - 2033: [, 230], - 2034: [, 220], - 2035: [, 230] - }, - 2048: { - 2070: [, 230], - 2071: [, 230], - 2072: [, 230], - 2073: [, 230], - 2075: [, 230], - 2076: [, 230], - 2077: [, 230], - 2078: [, 230], - 2079: [, 230], - 2080: [, 230], - 2081: [, 230], - 2082: [, 230], - 2083: [, 230], - 2085: [, 230], - 2086: [, 230], - 2087: [, 230], - 2089: [, 230], - 2090: [, 230], - 2091: [, 230], - 2092: [, 230], - 2093: [, 230], - 2137: [, 220], - 2138: [, 220], - 2139: [, 220], - 2276: [, 230], - 2277: [, 230], - 2278: [, 220], - 2279: [, 230], - 2280: [, 230], - 2281: [, 220], - 2282: [, 230], - 2283: [, 230], - 2284: [, 230], - 2285: [, 220], - 2286: [, 220], - 2287: [, 220], - 2288: [, 27], - 2289: [, 28], - 2290: [, 29], - 2291: [, 230], - 2292: [, 230], - 2293: [, 230], - 2294: [, 220], - 2295: [, 230], - 2296: [, 230], - 2297: [, 220], - 2298: [, 220], - 2299: [, 230], - 2300: [, 230], - 2301: [, 230], - 2302: [, 230] - }, - 2304: { - 2344: [, , { 2364: 2345 }], - 2345: [[2344, 2364]], - 2352: [, , { 2364: 2353 }], - 2353: [[2352, 2364]], - 2355: [, , { 2364: 2356 }], - 2356: [[2355, 2364]], - 2364: [, 7], - 2381: [, 9], - 2385: [, 230], - 2386: [, 220], - 2387: [, 230], - 2388: [, 230], - 2392: [[2325, 2364], 512], - 2393: [[2326, 2364], 512], - 2394: [[2327, 2364], 512], - 2395: [[2332, 2364], 512], - 2396: [[2337, 2364], 512], - 2397: [[2338, 2364], 512], - 2398: [[2347, 2364], 512], - 2399: [[2351, 2364], 512], - 2492: [, 7], - 2503: [, , { 2494: 2507, 2519: 2508 }], - 2507: [[2503, 2494]], - 2508: [[2503, 2519]], - 2509: [, 9], - 2524: [[2465, 2492], 512], - 2525: [[2466, 2492], 512], - 2527: [[2479, 2492], 512] - }, - 2560: { - 2611: [[2610, 2620], 512], - 2614: [[2616, 2620], 512], - 2620: [, 7], - 2637: [, 9], - 2649: [[2582, 2620], 512], - 2650: [[2583, 2620], 512], - 2651: [[2588, 2620], 512], - 2654: [[2603, 2620], 512], - 2748: [, 7], - 2765: [, 9], - 68109: [, 220], - 68111: [, 230], - 68152: [, 230], - 68153: [, 1], - 68154: [, 220], - 68159: [, 9] - }, - 2816: { - 2876: [, 7], - 2887: [, , { 2878: 2891, 2902: 2888, 2903: 2892 }], - 2888: [[2887, 2902]], - 2891: [[2887, 2878]], - 2892: [[2887, 2903]], - 2893: [, 9], - 2908: [[2849, 2876], 512], - 2909: [[2850, 2876], 512], - 2962: [, , { 3031: 2964 }], - 2964: [[2962, 3031]], - 3014: [, , { 3006: 3018, 3031: 3020 }], - 3015: [, , { 3006: 3019 }], - 3018: [[3014, 3006]], - 3019: [[3015, 3006]], - 3020: [[3014, 3031]], - 3021: [, 9] - }, - 3072: { - 3142: [, , { 3158: 3144 }], - 3144: [[3142, 3158]], - 3149: [, 9], - 3157: [, 84], - 3158: [, 91], - 3260: [, 7], - 3263: [, , { 3285: 3264 }], - 3264: [[3263, 3285]], - 3270: [, , { 3266: 3274, 3285: 3271, 3286: 3272 }], - 3271: [[3270, 3285]], - 3272: [[3270, 3286]], - 3274: [[3270, 3266], , { 3285: 3275 }], - 3275: [[3274, 3285]], - 3277: [, 9] - }, - 3328: { - 3398: [, , { 3390: 3402, 3415: 3404 }], - 3399: [, , { 3390: 3403 }], - 3402: [[3398, 3390]], - 3403: [[3399, 3390]], - 3404: [[3398, 3415]], - 3405: [, 9], - 3530: [, 9], - 3545: [, , { 3530: 3546, 3535: 3548, 3551: 3550 }], - 3546: [[3545, 3530]], - 3548: [[3545, 3535], , { 3530: 3549 }], - 3549: [[3548, 3530]], - 3550: [[3545, 3551]] - }, - 3584: { - 3635: [[3661, 3634], 256], - 3640: [, 103], - 3641: [, 103], - 3642: [, 9], - 3656: [, 107], - 3657: [, 107], - 3658: [, 107], - 3659: [, 107], - 3763: [[3789, 3762], 256], - 3768: [, 118], - 3769: [, 118], - 3784: [, 122], - 3785: [, 122], - 3786: [, 122], - 3787: [, 122], - 3804: [[3755, 3737], 256], - 3805: [[3755, 3745], 256] - }, - 3840: { - 3852: [[3851], 256], - 3864: [, 220], - 3865: [, 220], - 3893: [, 220], - 3895: [, 220], - 3897: [, 216], - 3907: [[3906, 4023], 512], - 3917: [[3916, 4023], 512], - 3922: [[3921, 4023], 512], - 3927: [[3926, 4023], 512], - 3932: [[3931, 4023], 512], - 3945: [[3904, 4021], 512], - 3953: [, 129], - 3954: [, 130], - 3955: [[3953, 3954], 512], - 3956: [, 132], - 3957: [[3953, 3956], 512], - 3958: [[4018, 3968], 512], - 3959: [[4018, 3969], 256], - 3960: [[4019, 3968], 512], - 3961: [[4019, 3969], 256], - 3962: [, 130], - 3963: [, 130], - 3964: [, 130], - 3965: [, 130], - 3968: [, 130], - 3969: [[3953, 3968], 512], - 3970: [, 230], - 3971: [, 230], - 3972: [, 9], - 3974: [, 230], - 3975: [, 230], - 3987: [[3986, 4023], 512], - 3997: [[3996, 4023], 512], - 4002: [[4001, 4023], 512], - 4007: [[4006, 4023], 512], - 4012: [[4011, 4023], 512], - 4025: [[3984, 4021], 512], - 4038: [, 220] - }, - 4096: { - 4133: [, , { 4142: 4134 }], - 4134: [[4133, 4142]], - 4151: [, 7], - 4153: [, 9], - 4154: [, 9], - 4237: [, 220], - 4348: [[4316], 256], - 69702: [, 9], - 69785: [, , { 69818: 69786 }], - 69786: [[69785, 69818]], - 69787: [, , { 69818: 69788 }], - 69788: [[69787, 69818]], - 69797: [, , { 69818: 69803 }], - 69803: [[69797, 69818]], - 69817: [, 9], - 69818: [, 7] - }, - 4352: { - 69888: [, 230], - 69889: [, 230], - 69890: [, 230], - 69934: [[69937, 69927]], - 69935: [[69938, 69927]], - 69937: [, , { 69927: 69934 }], - 69938: [, , { 69927: 69935 }], - 69939: [, 9], - 69940: [, 9], - 70080: [, 9] - }, - 4864: { 4957: [, 230], 4958: [, 230], 4959: [, 230] }, - 5632: { 71350: [, 9], 71351: [, 7] }, - 5888: { 5908: [, 9], 5940: [, 9], 6098: [, 9], 6109: [, 230] }, - 6144: { 6313: [, 228] }, - 6400: { 6457: [, 222], 6458: [, 230], 6459: [, 220] }, - 6656: { - 6679: [, 230], - 6680: [, 220], - 6752: [, 9], - 6773: [, 230], - 6774: [, 230], - 6775: [, 230], - 6776: [, 230], - 6777: [, 230], - 6778: [, 230], - 6779: [, 230], - 6780: [, 230], - 6783: [, 220] - }, - 6912: { - 6917: [, , { 6965: 6918 }], - 6918: [[6917, 6965]], - 6919: [, , { 6965: 6920 }], - 6920: [[6919, 6965]], - 6921: [, , { 6965: 6922 }], - 6922: [[6921, 6965]], - 6923: [, , { 6965: 6924 }], - 6924: [[6923, 6965]], - 6925: [, , { 6965: 6926 }], - 6926: [[6925, 6965]], - 6929: [, , { 6965: 6930 }], - 6930: [[6929, 6965]], - 6964: [, 7], - 6970: [, , { 6965: 6971 }], - 6971: [[6970, 6965]], - 6972: [, , { 6965: 6973 }], - 6973: [[6972, 6965]], - 6974: [, , { 6965: 6976 }], - 6975: [, , { 6965: 6977 }], - 6976: [[6974, 6965]], - 6977: [[6975, 6965]], - 6978: [, , { 6965: 6979 }], - 6979: [[6978, 6965]], - 6980: [, 9], - 7019: [, 230], - 7020: [, 220], - 7021: [, 230], - 7022: [, 230], - 7023: [, 230], - 7024: [, 230], - 7025: [, 230], - 7026: [, 230], - 7027: [, 230], - 7082: [, 9], - 7083: [, 9], - 7142: [, 7], - 7154: [, 9], - 7155: [, 9] - }, - 7168: { - 7223: [, 7], - 7376: [, 230], - 7377: [, 230], - 7378: [, 230], - 7380: [, 1], - 7381: [, 220], - 7382: [, 220], - 7383: [, 220], - 7384: [, 220], - 7385: [, 220], - 7386: [, 230], - 7387: [, 230], - 7388: [, 220], - 7389: [, 220], - 7390: [, 220], - 7391: [, 220], - 7392: [, 230], - 7394: [, 1], - 7395: [, 1], - 7396: [, 1], - 7397: [, 1], - 7398: [, 1], - 7399: [, 1], - 7400: [, 1], - 7405: [, 220], - 7412: [, 230] - }, - 7424: { - 7468: [[65], 256], - 7469: [[198], 256], - 7470: [[66], 256], - 7472: [[68], 256], - 7473: [[69], 256], - 7474: [[398], 256], - 7475: [[71], 256], - 7476: [[72], 256], - 7477: [[73], 256], - 7478: [[74], 256], - 7479: [[75], 256], - 7480: [[76], 256], - 7481: [[77], 256], - 7482: [[78], 256], - 7484: [[79], 256], - 7485: [[546], 256], - 7486: [[80], 256], - 7487: [[82], 256], - 7488: [[84], 256], - 7489: [[85], 256], - 7490: [[87], 256], - 7491: [[97], 256], - 7492: [[592], 256], - 7493: [[593], 256], - 7494: [[7426], 256], - 7495: [[98], 256], - 7496: [[100], 256], - 7497: [[101], 256], - 7498: [[601], 256], - 7499: [[603], 256], - 7500: [[604], 256], - 7501: [[103], 256], - 7503: [[107], 256], - 7504: [[109], 256], - 7505: [[331], 256], - 7506: [[111], 256], - 7507: [[596], 256], - 7508: [[7446], 256], - 7509: [[7447], 256], - 7510: [[112], 256], - 7511: [[116], 256], - 7512: [[117], 256], - 7513: [[7453], 256], - 7514: [[623], 256], - 7515: [[118], 256], - 7516: [[7461], 256], - 7517: [[946], 256], - 7518: [[947], 256], - 7519: [[948], 256], - 7520: [[966], 256], - 7521: [[967], 256], - 7522: [[105], 256], - 7523: [[114], 256], - 7524: [[117], 256], - 7525: [[118], 256], - 7526: [[946], 256], - 7527: [[947], 256], - 7528: [[961], 256], - 7529: [[966], 256], - 7530: [[967], 256], - 7544: [[1085], 256], - 7579: [[594], 256], - 7580: [[99], 256], - 7581: [[597], 256], - 7582: [[240], 256], - 7583: [[604], 256], - 7584: [[102], 256], - 7585: [[607], 256], - 7586: [[609], 256], - 7587: [[613], 256], - 7588: [[616], 256], - 7589: [[617], 256], - 7590: [[618], 256], - 7591: [[7547], 256], - 7592: [[669], 256], - 7593: [[621], 256], - 7594: [[7557], 256], - 7595: [[671], 256], - 7596: [[625], 256], - 7597: [[624], 256], - 7598: [[626], 256], - 7599: [[627], 256], - 7600: [[628], 256], - 7601: [[629], 256], - 7602: [[632], 256], - 7603: [[642], 256], - 7604: [[643], 256], - 7605: [[427], 256], - 7606: [[649], 256], - 7607: [[650], 256], - 7608: [[7452], 256], - 7609: [[651], 256], - 7610: [[652], 256], - 7611: [[122], 256], - 7612: [[656], 256], - 7613: [[657], 256], - 7614: [[658], 256], - 7615: [[952], 256], - 7616: [, 230], - 7617: [, 230], - 7618: [, 220], - 7619: [, 230], - 7620: [, 230], - 7621: [, 230], - 7622: [, 230], - 7623: [, 230], - 7624: [, 230], - 7625: [, 230], - 7626: [, 220], - 7627: [, 230], - 7628: [, 230], - 7629: [, 234], - 7630: [, 214], - 7631: [, 220], - 7632: [, 202], - 7633: [, 230], - 7634: [, 230], - 7635: [, 230], - 7636: [, 230], - 7637: [, 230], - 7638: [, 230], - 7639: [, 230], - 7640: [, 230], - 7641: [, 230], - 7642: [, 230], - 7643: [, 230], - 7644: [, 230], - 7645: [, 230], - 7646: [, 230], - 7647: [, 230], - 7648: [, 230], - 7649: [, 230], - 7650: [, 230], - 7651: [, 230], - 7652: [, 230], - 7653: [, 230], - 7654: [, 230], - 7676: [, 233], - 7677: [, 220], - 7678: [, 230], - 7679: [, 220] - }, - 7680: { - 7680: [[65, 805]], - 7681: [[97, 805]], - 7682: [[66, 775]], - 7683: [[98, 775]], - 7684: [[66, 803]], - 7685: [[98, 803]], - 7686: [[66, 817]], - 7687: [[98, 817]], - 7688: [[199, 769]], - 7689: [[231, 769]], - 7690: [[68, 775]], - 7691: [[100, 775]], - 7692: [[68, 803]], - 7693: [[100, 803]], - 7694: [[68, 817]], - 7695: [[100, 817]], - 7696: [[68, 807]], - 7697: [[100, 807]], - 7698: [[68, 813]], - 7699: [[100, 813]], - 7700: [[274, 768]], - 7701: [[275, 768]], - 7702: [[274, 769]], - 7703: [[275, 769]], - 7704: [[69, 813]], - 7705: [[101, 813]], - 7706: [[69, 816]], - 7707: [[101, 816]], - 7708: [[552, 774]], - 7709: [[553, 774]], - 7710: [[70, 775]], - 7711: [[102, 775]], - 7712: [[71, 772]], - 7713: [[103, 772]], - 7714: [[72, 775]], - 7715: [[104, 775]], - 7716: [[72, 803]], - 7717: [[104, 803]], - 7718: [[72, 776]], - 7719: [[104, 776]], - 7720: [[72, 807]], - 7721: [[104, 807]], - 7722: [[72, 814]], - 7723: [[104, 814]], - 7724: [[73, 816]], - 7725: [[105, 816]], - 7726: [[207, 769]], - 7727: [[239, 769]], - 7728: [[75, 769]], - 7729: [[107, 769]], - 7730: [[75, 803]], - 7731: [[107, 803]], - 7732: [[75, 817]], - 7733: [[107, 817]], - 7734: [[76, 803], , { 772: 7736 }], - 7735: [[108, 803], , { 772: 7737 }], - 7736: [[7734, 772]], - 7737: [[7735, 772]], - 7738: [[76, 817]], - 7739: [[108, 817]], - 7740: [[76, 813]], - 7741: [[108, 813]], - 7742: [[77, 769]], - 7743: [[109, 769]], - 7744: [[77, 775]], - 7745: [[109, 775]], - 7746: [[77, 803]], - 7747: [[109, 803]], - 7748: [[78, 775]], - 7749: [[110, 775]], - 7750: [[78, 803]], - 7751: [[110, 803]], - 7752: [[78, 817]], - 7753: [[110, 817]], - 7754: [[78, 813]], - 7755: [[110, 813]], - 7756: [[213, 769]], - 7757: [[245, 769]], - 7758: [[213, 776]], - 7759: [[245, 776]], - 7760: [[332, 768]], - 7761: [[333, 768]], - 7762: [[332, 769]], - 7763: [[333, 769]], - 7764: [[80, 769]], - 7765: [[112, 769]], - 7766: [[80, 775]], - 7767: [[112, 775]], - 7768: [[82, 775]], - 7769: [[114, 775]], - 7770: [[82, 803], , { 772: 7772 }], - 7771: [[114, 803], , { 772: 7773 }], - 7772: [[7770, 772]], - 7773: [[7771, 772]], - 7774: [[82, 817]], - 7775: [[114, 817]], - 7776: [[83, 775]], - 7777: [[115, 775]], - 7778: [[83, 803], , { 775: 7784 }], - 7779: [[115, 803], , { 775: 7785 }], - 7780: [[346, 775]], - 7781: [[347, 775]], - 7782: [[352, 775]], - 7783: [[353, 775]], - 7784: [[7778, 775]], - 7785: [[7779, 775]], - 7786: [[84, 775]], - 7787: [[116, 775]], - 7788: [[84, 803]], - 7789: [[116, 803]], - 7790: [[84, 817]], - 7791: [[116, 817]], - 7792: [[84, 813]], - 7793: [[116, 813]], - 7794: [[85, 804]], - 7795: [[117, 804]], - 7796: [[85, 816]], - 7797: [[117, 816]], - 7798: [[85, 813]], - 7799: [[117, 813]], - 7800: [[360, 769]], - 7801: [[361, 769]], - 7802: [[362, 776]], - 7803: [[363, 776]], - 7804: [[86, 771]], - 7805: [[118, 771]], - 7806: [[86, 803]], - 7807: [[118, 803]], - 7808: [[87, 768]], - 7809: [[119, 768]], - 7810: [[87, 769]], - 7811: [[119, 769]], - 7812: [[87, 776]], - 7813: [[119, 776]], - 7814: [[87, 775]], - 7815: [[119, 775]], - 7816: [[87, 803]], - 7817: [[119, 803]], - 7818: [[88, 775]], - 7819: [[120, 775]], - 7820: [[88, 776]], - 7821: [[120, 776]], - 7822: [[89, 775]], - 7823: [[121, 775]], - 7824: [[90, 770]], - 7825: [[122, 770]], - 7826: [[90, 803]], - 7827: [[122, 803]], - 7828: [[90, 817]], - 7829: [[122, 817]], - 7830: [[104, 817]], - 7831: [[116, 776]], - 7832: [[119, 778]], - 7833: [[121, 778]], - 7834: [[97, 702], 256], - 7835: [[383, 775]], - 7840: [[65, 803], , { 770: 7852, 774: 7862 }], - 7841: [[97, 803], , { 770: 7853, 774: 7863 }], - 7842: [[65, 777]], - 7843: [[97, 777]], - 7844: [[194, 769]], - 7845: [[226, 769]], - 7846: [[194, 768]], - 7847: [[226, 768]], - 7848: [[194, 777]], - 7849: [[226, 777]], - 7850: [[194, 771]], - 7851: [[226, 771]], - 7852: [[7840, 770]], - 7853: [[7841, 770]], - 7854: [[258, 769]], - 7855: [[259, 769]], - 7856: [[258, 768]], - 7857: [[259, 768]], - 7858: [[258, 777]], - 7859: [[259, 777]], - 7860: [[258, 771]], - 7861: [[259, 771]], - 7862: [[7840, 774]], - 7863: [[7841, 774]], - 7864: [[69, 803], , { 770: 7878 }], - 7865: [[101, 803], , { 770: 7879 }], - 7866: [[69, 777]], - 7867: [[101, 777]], - 7868: [[69, 771]], - 7869: [[101, 771]], - 7870: [[202, 769]], - 7871: [[234, 769]], - 7872: [[202, 768]], - 7873: [[234, 768]], - 7874: [[202, 777]], - 7875: [[234, 777]], - 7876: [[202, 771]], - 7877: [[234, 771]], - 7878: [[7864, 770]], - 7879: [[7865, 770]], - 7880: [[73, 777]], - 7881: [[105, 777]], - 7882: [[73, 803]], - 7883: [[105, 803]], - 7884: [[79, 803], , { 770: 7896 }], - 7885: [[111, 803], , { 770: 7897 }], - 7886: [[79, 777]], - 7887: [[111, 777]], - 7888: [[212, 769]], - 7889: [[244, 769]], - 7890: [[212, 768]], - 7891: [[244, 768]], - 7892: [[212, 777]], - 7893: [[244, 777]], - 7894: [[212, 771]], - 7895: [[244, 771]], - 7896: [[7884, 770]], - 7897: [[7885, 770]], - 7898: [[416, 769]], - 7899: [[417, 769]], - 7900: [[416, 768]], - 7901: [[417, 768]], - 7902: [[416, 777]], - 7903: [[417, 777]], - 7904: [[416, 771]], - 7905: [[417, 771]], - 7906: [[416, 803]], - 7907: [[417, 803]], - 7908: [[85, 803]], - 7909: [[117, 803]], - 7910: [[85, 777]], - 7911: [[117, 777]], - 7912: [[431, 769]], - 7913: [[432, 769]], - 7914: [[431, 768]], - 7915: [[432, 768]], - 7916: [[431, 777]], - 7917: [[432, 777]], - 7918: [[431, 771]], - 7919: [[432, 771]], - 7920: [[431, 803]], - 7921: [[432, 803]], - 7922: [[89, 768]], - 7923: [[121, 768]], - 7924: [[89, 803]], - 7925: [[121, 803]], - 7926: [[89, 777]], - 7927: [[121, 777]], - 7928: [[89, 771]], - 7929: [[121, 771]] - }, - 7936: { - 7936: [[945, 787], , { 768: 7938, 769: 7940, 834: 7942, 837: 8064 }], - 7937: [[945, 788], , { 768: 7939, 769: 7941, 834: 7943, 837: 8065 }], - 7938: [[7936, 768], , { 837: 8066 }], - 7939: [[7937, 768], , { 837: 8067 }], - 7940: [[7936, 769], , { 837: 8068 }], - 7941: [[7937, 769], , { 837: 8069 }], - 7942: [[7936, 834], , { 837: 8070 }], - 7943: [[7937, 834], , { 837: 8071 }], - 7944: [[913, 787], , { 768: 7946, 769: 7948, 834: 7950, 837: 8072 }], - 7945: [[913, 788], , { 768: 7947, 769: 7949, 834: 7951, 837: 8073 }], - 7946: [[7944, 768], , { 837: 8074 }], - 7947: [[7945, 768], , { 837: 8075 }], - 7948: [[7944, 769], , { 837: 8076 }], - 7949: [[7945, 769], , { 837: 8077 }], - 7950: [[7944, 834], , { 837: 8078 }], - 7951: [[7945, 834], , { 837: 8079 }], - 7952: [[949, 787], , { 768: 7954, 769: 7956 }], - 7953: [[949, 788], , { 768: 7955, 769: 7957 }], - 7954: [[7952, 768]], - 7955: [[7953, 768]], - 7956: [[7952, 769]], - 7957: [[7953, 769]], - 7960: [[917, 787], , { 768: 7962, 769: 7964 }], - 7961: [[917, 788], , { 768: 7963, 769: 7965 }], - 7962: [[7960, 768]], - 7963: [[7961, 768]], - 7964: [[7960, 769]], - 7965: [[7961, 769]], - 7968: [[951, 787], , { 768: 7970, 769: 7972, 834: 7974, 837: 8080 }], - 7969: [[951, 788], , { 768: 7971, 769: 7973, 834: 7975, 837: 8081 }], - 7970: [[7968, 768], , { 837: 8082 }], - 7971: [[7969, 768], , { 837: 8083 }], - 7972: [[7968, 769], , { 837: 8084 }], - 7973: [[7969, 769], , { 837: 8085 }], - 7974: [[7968, 834], , { 837: 8086 }], - 7975: [[7969, 834], , { 837: 8087 }], - 7976: [[919, 787], , { 768: 7978, 769: 7980, 834: 7982, 837: 8088 }], - 7977: [[919, 788], , { 768: 7979, 769: 7981, 834: 7983, 837: 8089 }], - 7978: [[7976, 768], , { 837: 8090 }], - 7979: [[7977, 768], , { 837: 8091 }], - 7980: [[7976, 769], , { 837: 8092 }], - 7981: [[7977, 769], , { 837: 8093 }], - 7982: [[7976, 834], , { 837: 8094 }], - 7983: [[7977, 834], , { 837: 8095 }], - 7984: [[953, 787], , { 768: 7986, 769: 7988, 834: 7990 }], - 7985: [[953, 788], , { 768: 7987, 769: 7989, 834: 7991 }], - 7986: [[7984, 768]], - 7987: [[7985, 768]], - 7988: [[7984, 769]], - 7989: [[7985, 769]], - 7990: [[7984, 834]], - 7991: [[7985, 834]], - 7992: [[921, 787], , { 768: 7994, 769: 7996, 834: 7998 }], - 7993: [[921, 788], , { 768: 7995, 769: 7997, 834: 7999 }], - 7994: [[7992, 768]], - 7995: [[7993, 768]], - 7996: [[7992, 769]], - 7997: [[7993, 769]], - 7998: [[7992, 834]], - 7999: [[7993, 834]], - 8000: [[959, 787], , { 768: 8002, 769: 8004 }], - 8001: [[959, 788], , { 768: 8003, 769: 8005 }], - 8002: [[8000, 768]], - 8003: [[8001, 768]], - 8004: [[8000, 769]], - 8005: [[8001, 769]], - 8008: [[927, 787], , { 768: 8010, 769: 8012 }], - 8009: [[927, 788], , { 768: 8011, 769: 8013 }], - 8010: [[8008, 768]], - 8011: [[8009, 768]], - 8012: [[8008, 769]], - 8013: [[8009, 769]], - 8016: [[965, 787], , { 768: 8018, 769: 8020, 834: 8022 }], - 8017: [[965, 788], , { 768: 8019, 769: 8021, 834: 8023 }], - 8018: [[8016, 768]], - 8019: [[8017, 768]], - 8020: [[8016, 769]], - 8021: [[8017, 769]], - 8022: [[8016, 834]], - 8023: [[8017, 834]], - 8025: [[933, 788], , { 768: 8027, 769: 8029, 834: 8031 }], - 8027: [[8025, 768]], - 8029: [[8025, 769]], - 8031: [[8025, 834]], - 8032: [[969, 787], , { 768: 8034, 769: 8036, 834: 8038, 837: 8096 }], - 8033: [[969, 788], , { 768: 8035, 769: 8037, 834: 8039, 837: 8097 }], - 8034: [[8032, 768], , { 837: 8098 }], - 8035: [[8033, 768], , { 837: 8099 }], - 8036: [[8032, 769], , { 837: 8100 }], - 8037: [[8033, 769], , { 837: 8101 }], - 8038: [[8032, 834], , { 837: 8102 }], - 8039: [[8033, 834], , { 837: 8103 }], - 8040: [[937, 787], , { 768: 8042, 769: 8044, 834: 8046, 837: 8104 }], - 8041: [[937, 788], , { 768: 8043, 769: 8045, 834: 8047, 837: 8105 }], - 8042: [[8040, 768], , { 837: 8106 }], - 8043: [[8041, 768], , { 837: 8107 }], - 8044: [[8040, 769], , { 837: 8108 }], - 8045: [[8041, 769], , { 837: 8109 }], - 8046: [[8040, 834], , { 837: 8110 }], - 8047: [[8041, 834], , { 837: 8111 }], - 8048: [[945, 768], , { 837: 8114 }], - 8049: [[940]], - 8050: [[949, 768]], - 8051: [[941]], - 8052: [[951, 768], , { 837: 8130 }], - 8053: [[942]], - 8054: [[953, 768]], - 8055: [[943]], - 8056: [[959, 768]], - 8057: [[972]], - 8058: [[965, 768]], - 8059: [[973]], - 8060: [[969, 768], , { 837: 8178 }], - 8061: [[974]], - 8064: [[7936, 837]], - 8065: [[7937, 837]], - 8066: [[7938, 837]], - 8067: [[7939, 837]], - 8068: [[7940, 837]], - 8069: [[7941, 837]], - 8070: [[7942, 837]], - 8071: [[7943, 837]], - 8072: [[7944, 837]], - 8073: [[7945, 837]], - 8074: [[7946, 837]], - 8075: [[7947, 837]], - 8076: [[7948, 837]], - 8077: [[7949, 837]], - 8078: [[7950, 837]], - 8079: [[7951, 837]], - 8080: [[7968, 837]], - 8081: [[7969, 837]], - 8082: [[7970, 837]], - 8083: [[7971, 837]], - 8084: [[7972, 837]], - 8085: [[7973, 837]], - 8086: [[7974, 837]], - 8087: [[7975, 837]], - 8088: [[7976, 837]], - 8089: [[7977, 837]], - 8090: [[7978, 837]], - 8091: [[7979, 837]], - 8092: [[7980, 837]], - 8093: [[7981, 837]], - 8094: [[7982, 837]], - 8095: [[7983, 837]], - 8096: [[8032, 837]], - 8097: [[8033, 837]], - 8098: [[8034, 837]], - 8099: [[8035, 837]], - 8100: [[8036, 837]], - 8101: [[8037, 837]], - 8102: [[8038, 837]], - 8103: [[8039, 837]], - 8104: [[8040, 837]], - 8105: [[8041, 837]], - 8106: [[8042, 837]], - 8107: [[8043, 837]], - 8108: [[8044, 837]], - 8109: [[8045, 837]], - 8110: [[8046, 837]], - 8111: [[8047, 837]], - 8112: [[945, 774]], - 8113: [[945, 772]], - 8114: [[8048, 837]], - 8115: [[945, 837]], - 8116: [[940, 837]], - 8118: [[945, 834], , { 837: 8119 }], - 8119: [[8118, 837]], - 8120: [[913, 774]], - 8121: [[913, 772]], - 8122: [[913, 768]], - 8123: [[902]], - 8124: [[913, 837]], - 8125: [[32, 787], 256], - 8126: [[953]], - 8127: [[32, 787], 256, { 768: 8141, 769: 8142, 834: 8143 }], - 8128: [[32, 834], 256], - 8129: [[168, 834]], - 8130: [[8052, 837]], - 8131: [[951, 837]], - 8132: [[942, 837]], - 8134: [[951, 834], , { 837: 8135 }], - 8135: [[8134, 837]], - 8136: [[917, 768]], - 8137: [[904]], - 8138: [[919, 768]], - 8139: [[905]], - 8140: [[919, 837]], - 8141: [[8127, 768]], - 8142: [[8127, 769]], - 8143: [[8127, 834]], - 8144: [[953, 774]], - 8145: [[953, 772]], - 8146: [[970, 768]], - 8147: [[912]], - 8150: [[953, 834]], - 8151: [[970, 834]], - 8152: [[921, 774]], - 8153: [[921, 772]], - 8154: [[921, 768]], - 8155: [[906]], - 8157: [[8190, 768]], - 8158: [[8190, 769]], - 8159: [[8190, 834]], - 8160: [[965, 774]], - 8161: [[965, 772]], - 8162: [[971, 768]], - 8163: [[944]], - 8164: [[961, 787]], - 8165: [[961, 788]], - 8166: [[965, 834]], - 8167: [[971, 834]], - 8168: [[933, 774]], - 8169: [[933, 772]], - 8170: [[933, 768]], - 8171: [[910]], - 8172: [[929, 788]], - 8173: [[168, 768]], - 8174: [[901]], - 8175: [[96]], - 8178: [[8060, 837]], - 8179: [[969, 837]], - 8180: [[974, 837]], - 8182: [[969, 834], , { 837: 8183 }], - 8183: [[8182, 837]], - 8184: [[927, 768]], - 8185: [[908]], - 8186: [[937, 768]], - 8187: [[911]], - 8188: [[937, 837]], - 8189: [[180]], - 8190: [[32, 788], 256, { 768: 8157, 769: 8158, 834: 8159 }] - }, - 8192: { - 8192: [[8194]], - 8193: [[8195]], - 8194: [[32], 256], - 8195: [[32], 256], - 8196: [[32], 256], - 8197: [[32], 256], - 8198: [[32], 256], - 8199: [[32], 256], - 8200: [[32], 256], - 8201: [[32], 256], - 8202: [[32], 256], - 8209: [[8208], 256], - 8215: [[32, 819], 256], - 8228: [[46], 256], - 8229: [[46, 46], 256], - 8230: [[46, 46, 46], 256], - 8239: [[32], 256], - 8243: [[8242, 8242], 256], - 8244: [[8242, 8242, 8242], 256], - 8246: [[8245, 8245], 256], - 8247: [[8245, 8245, 8245], 256], - 8252: [[33, 33], 256], - 8254: [[32, 773], 256], - 8263: [[63, 63], 256], - 8264: [[63, 33], 256], - 8265: [[33, 63], 256], - 8279: [[8242, 8242, 8242, 8242], 256], - 8287: [[32], 256], - 8304: [[48], 256], - 8305: [[105], 256], - 8308: [[52], 256], - 8309: [[53], 256], - 8310: [[54], 256], - 8311: [[55], 256], - 8312: [[56], 256], - 8313: [[57], 256], - 8314: [[43], 256], - 8315: [[8722], 256], - 8316: [[61], 256], - 8317: [[40], 256], - 8318: [[41], 256], - 8319: [[110], 256], - 8320: [[48], 256], - 8321: [[49], 256], - 8322: [[50], 256], - 8323: [[51], 256], - 8324: [[52], 256], - 8325: [[53], 256], - 8326: [[54], 256], - 8327: [[55], 256], - 8328: [[56], 256], - 8329: [[57], 256], - 8330: [[43], 256], - 8331: [[8722], 256], - 8332: [[61], 256], - 8333: [[40], 256], - 8334: [[41], 256], - 8336: [[97], 256], - 8337: [[101], 256], - 8338: [[111], 256], - 8339: [[120], 256], - 8340: [[601], 256], - 8341: [[104], 256], - 8342: [[107], 256], - 8343: [[108], 256], - 8344: [[109], 256], - 8345: [[110], 256], - 8346: [[112], 256], - 8347: [[115], 256], - 8348: [[116], 256], - 8360: [[82, 115], 256], - 8400: [, 230], - 8401: [, 230], - 8402: [, 1], - 8403: [, 1], - 8404: [, 230], - 8405: [, 230], - 8406: [, 230], - 8407: [, 230], - 8408: [, 1], - 8409: [, 1], - 8410: [, 1], - 8411: [, 230], - 8412: [, 230], - 8417: [, 230], - 8421: [, 1], - 8422: [, 1], - 8423: [, 230], - 8424: [, 220], - 8425: [, 230], - 8426: [, 1], - 8427: [, 1], - 8428: [, 220], - 8429: [, 220], - 8430: [, 220], - 8431: [, 220], - 8432: [, 230] - }, - 8448: { - 8448: [[97, 47, 99], 256], - 8449: [[97, 47, 115], 256], - 8450: [[67], 256], - 8451: [[176, 67], 256], - 8453: [[99, 47, 111], 256], - 8454: [[99, 47, 117], 256], - 8455: [[400], 256], - 8457: [[176, 70], 256], - 8458: [[103], 256], - 8459: [[72], 256], - 8460: [[72], 256], - 8461: [[72], 256], - 8462: [[104], 256], - 8463: [[295], 256], - 8464: [[73], 256], - 8465: [[73], 256], - 8466: [[76], 256], - 8467: [[108], 256], - 8469: [[78], 256], - 8470: [[78, 111], 256], - 8473: [[80], 256], - 8474: [[81], 256], - 8475: [[82], 256], - 8476: [[82], 256], - 8477: [[82], 256], - 8480: [[83, 77], 256], - 8481: [[84, 69, 76], 256], - 8482: [[84, 77], 256], - 8484: [[90], 256], - 8486: [[937]], - 8488: [[90], 256], - 8490: [[75]], - 8491: [[197]], - 8492: [[66], 256], - 8493: [[67], 256], - 8495: [[101], 256], - 8496: [[69], 256], - 8497: [[70], 256], - 8499: [[77], 256], - 8500: [[111], 256], - 8501: [[1488], 256], - 8502: [[1489], 256], - 8503: [[1490], 256], - 8504: [[1491], 256], - 8505: [[105], 256], - 8507: [[70, 65, 88], 256], - 8508: [[960], 256], - 8509: [[947], 256], - 8510: [[915], 256], - 8511: [[928], 256], - 8512: [[8721], 256], - 8517: [[68], 256], - 8518: [[100], 256], - 8519: [[101], 256], - 8520: [[105], 256], - 8521: [[106], 256], - 8528: [[49, 8260, 55], 256], - 8529: [[49, 8260, 57], 256], - 8530: [[49, 8260, 49, 48], 256], - 8531: [[49, 8260, 51], 256], - 8532: [[50, 8260, 51], 256], - 8533: [[49, 8260, 53], 256], - 8534: [[50, 8260, 53], 256], - 8535: [[51, 8260, 53], 256], - 8536: [[52, 8260, 53], 256], - 8537: [[49, 8260, 54], 256], - 8538: [[53, 8260, 54], 256], - 8539: [[49, 8260, 56], 256], - 8540: [[51, 8260, 56], 256], - 8541: [[53, 8260, 56], 256], - 8542: [[55, 8260, 56], 256], - 8543: [[49, 8260], 256], - 8544: [[73], 256], - 8545: [[73, 73], 256], - 8546: [[73, 73, 73], 256], - 8547: [[73, 86], 256], - 8548: [[86], 256], - 8549: [[86, 73], 256], - 8550: [[86, 73, 73], 256], - 8551: [[86, 73, 73, 73], 256], - 8552: [[73, 88], 256], - 8553: [[88], 256], - 8554: [[88, 73], 256], - 8555: [[88, 73, 73], 256], - 8556: [[76], 256], - 8557: [[67], 256], - 8558: [[68], 256], - 8559: [[77], 256], - 8560: [[105], 256], - 8561: [[105, 105], 256], - 8562: [[105, 105, 105], 256], - 8563: [[105, 118], 256], - 8564: [[118], 256], - 8565: [[118, 105], 256], - 8566: [[118, 105, 105], 256], - 8567: [[118, 105, 105, 105], 256], - 8568: [[105, 120], 256], - 8569: [[120], 256], - 8570: [[120, 105], 256], - 8571: [[120, 105, 105], 256], - 8572: [[108], 256], - 8573: [[99], 256], - 8574: [[100], 256], - 8575: [[109], 256], - 8585: [[48, 8260, 51], 256], - 8592: [, , { 824: 8602 }], - 8594: [, , { 824: 8603 }], - 8596: [, , { 824: 8622 }], - 8602: [[8592, 824]], - 8603: [[8594, 824]], - 8622: [[8596, 824]], - 8653: [[8656, 824]], - 8654: [[8660, 824]], - 8655: [[8658, 824]], - 8656: [, , { 824: 8653 }], - 8658: [, , { 824: 8655 }], - 8660: [, , { 824: 8654 }] - }, - 8704: { - 8707: [, , { 824: 8708 }], - 8708: [[8707, 824]], - 8712: [, , { 824: 8713 }], - 8713: [[8712, 824]], - 8715: [, , { 824: 8716 }], - 8716: [[8715, 824]], - 8739: [, , { 824: 8740 }], - 8740: [[8739, 824]], - 8741: [, , { 824: 8742 }], - 8742: [[8741, 824]], - 8748: [[8747, 8747], 256], - 8749: [[8747, 8747, 8747], 256], - 8751: [[8750, 8750], 256], - 8752: [[8750, 8750, 8750], 256], - 8764: [, , { 824: 8769 }], - 8769: [[8764, 824]], - 8771: [, , { 824: 8772 }], - 8772: [[8771, 824]], - 8773: [, , { 824: 8775 }], - 8775: [[8773, 824]], - 8776: [, , { 824: 8777 }], - 8777: [[8776, 824]], - 8781: [, , { 824: 8813 }], - 8800: [[61, 824]], - 8801: [, , { 824: 8802 }], - 8802: [[8801, 824]], - 8804: [, , { 824: 8816 }], - 8805: [, , { 824: 8817 }], - 8813: [[8781, 824]], - 8814: [[60, 824]], - 8815: [[62, 824]], - 8816: [[8804, 824]], - 8817: [[8805, 824]], - 8818: [, , { 824: 8820 }], - 8819: [, , { 824: 8821 }], - 8820: [[8818, 824]], - 8821: [[8819, 824]], - 8822: [, , { 824: 8824 }], - 8823: [, , { 824: 8825 }], - 8824: [[8822, 824]], - 8825: [[8823, 824]], - 8826: [, , { 824: 8832 }], - 8827: [, , { 824: 8833 }], - 8828: [, , { 824: 8928 }], - 8829: [, , { 824: 8929 }], - 8832: [[8826, 824]], - 8833: [[8827, 824]], - 8834: [, , { 824: 8836 }], - 8835: [, , { 824: 8837 }], - 8836: [[8834, 824]], - 8837: [[8835, 824]], - 8838: [, , { 824: 8840 }], - 8839: [, , { 824: 8841 }], - 8840: [[8838, 824]], - 8841: [[8839, 824]], - 8849: [, , { 824: 8930 }], - 8850: [, , { 824: 8931 }], - 8866: [, , { 824: 8876 }], - 8872: [, , { 824: 8877 }], - 8873: [, , { 824: 8878 }], - 8875: [, , { 824: 8879 }], - 8876: [[8866, 824]], - 8877: [[8872, 824]], - 8878: [[8873, 824]], - 8879: [[8875, 824]], - 8882: [, , { 824: 8938 }], - 8883: [, , { 824: 8939 }], - 8884: [, , { 824: 8940 }], - 8885: [, , { 824: 8941 }], - 8928: [[8828, 824]], - 8929: [[8829, 824]], - 8930: [[8849, 824]], - 8931: [[8850, 824]], - 8938: [[8882, 824]], - 8939: [[8883, 824]], - 8940: [[8884, 824]], - 8941: [[8885, 824]] - }, - 8960: { 9001: [[12296]], 9002: [[12297]] }, - 9216: { - 9312: [[49], 256], - 9313: [[50], 256], - 9314: [[51], 256], - 9315: [[52], 256], - 9316: [[53], 256], - 9317: [[54], 256], - 9318: [[55], 256], - 9319: [[56], 256], - 9320: [[57], 256], - 9321: [[49, 48], 256], - 9322: [[49, 49], 256], - 9323: [[49, 50], 256], - 9324: [[49, 51], 256], - 9325: [[49, 52], 256], - 9326: [[49, 53], 256], - 9327: [[49, 54], 256], - 9328: [[49, 55], 256], - 9329: [[49, 56], 256], - 9330: [[49, 57], 256], - 9331: [[50, 48], 256], - 9332: [[40, 49, 41], 256], - 9333: [[40, 50, 41], 256], - 9334: [[40, 51, 41], 256], - 9335: [[40, 52, 41], 256], - 9336: [[40, 53, 41], 256], - 9337: [[40, 54, 41], 256], - 9338: [[40, 55, 41], 256], - 9339: [[40, 56, 41], 256], - 9340: [[40, 57, 41], 256], - 9341: [[40, 49, 48, 41], 256], - 9342: [[40, 49, 49, 41], 256], - 9343: [[40, 49, 50, 41], 256], - 9344: [[40, 49, 51, 41], 256], - 9345: [[40, 49, 52, 41], 256], - 9346: [[40, 49, 53, 41], 256], - 9347: [[40, 49, 54, 41], 256], - 9348: [[40, 49, 55, 41], 256], - 9349: [[40, 49, 56, 41], 256], - 9350: [[40, 49, 57, 41], 256], - 9351: [[40, 50, 48, 41], 256], - 9352: [[49, 46], 256], - 9353: [[50, 46], 256], - 9354: [[51, 46], 256], - 9355: [[52, 46], 256], - 9356: [[53, 46], 256], - 9357: [[54, 46], 256], - 9358: [[55, 46], 256], - 9359: [[56, 46], 256], - 9360: [[57, 46], 256], - 9361: [[49, 48, 46], 256], - 9362: [[49, 49, 46], 256], - 9363: [[49, 50, 46], 256], - 9364: [[49, 51, 46], 256], - 9365: [[49, 52, 46], 256], - 9366: [[49, 53, 46], 256], - 9367: [[49, 54, 46], 256], - 9368: [[49, 55, 46], 256], - 9369: [[49, 56, 46], 256], - 9370: [[49, 57, 46], 256], - 9371: [[50, 48, 46], 256], - 9372: [[40, 97, 41], 256], - 9373: [[40, 98, 41], 256], - 9374: [[40, 99, 41], 256], - 9375: [[40, 100, 41], 256], - 9376: [[40, 101, 41], 256], - 9377: [[40, 102, 41], 256], - 9378: [[40, 103, 41], 256], - 9379: [[40, 104, 41], 256], - 9380: [[40, 105, 41], 256], - 9381: [[40, 106, 41], 256], - 9382: [[40, 107, 41], 256], - 9383: [[40, 108, 41], 256], - 9384: [[40, 109, 41], 256], - 9385: [[40, 110, 41], 256], - 9386: [[40, 111, 41], 256], - 9387: [[40, 112, 41], 256], - 9388: [[40, 113, 41], 256], - 9389: [[40, 114, 41], 256], - 9390: [[40, 115, 41], 256], - 9391: [[40, 116, 41], 256], - 9392: [[40, 117, 41], 256], - 9393: [[40, 118, 41], 256], - 9394: [[40, 119, 41], 256], - 9395: [[40, 120, 41], 256], - 9396: [[40, 121, 41], 256], - 9397: [[40, 122, 41], 256], - 9398: [[65], 256], - 9399: [[66], 256], - 9400: [[67], 256], - 9401: [[68], 256], - 9402: [[69], 256], - 9403: [[70], 256], - 9404: [[71], 256], - 9405: [[72], 256], - 9406: [[73], 256], - 9407: [[74], 256], - 9408: [[75], 256], - 9409: [[76], 256], - 9410: [[77], 256], - 9411: [[78], 256], - 9412: [[79], 256], - 9413: [[80], 256], - 9414: [[81], 256], - 9415: [[82], 256], - 9416: [[83], 256], - 9417: [[84], 256], - 9418: [[85], 256], - 9419: [[86], 256], - 9420: [[87], 256], - 9421: [[88], 256], - 9422: [[89], 256], - 9423: [[90], 256], - 9424: [[97], 256], - 9425: [[98], 256], - 9426: [[99], 256], - 9427: [[100], 256], - 9428: [[101], 256], - 9429: [[102], 256], - 9430: [[103], 256], - 9431: [[104], 256], - 9432: [[105], 256], - 9433: [[106], 256], - 9434: [[107], 256], - 9435: [[108], 256], - 9436: [[109], 256], - 9437: [[110], 256], - 9438: [[111], 256], - 9439: [[112], 256], - 9440: [[113], 256], - 9441: [[114], 256], - 9442: [[115], 256], - 9443: [[116], 256], - 9444: [[117], 256], - 9445: [[118], 256], - 9446: [[119], 256], - 9447: [[120], 256], - 9448: [[121], 256], - 9449: [[122], 256], - 9450: [[48], 256] - }, - 10752: { - 10764: [[8747, 8747, 8747, 8747], 256], - 10868: [[58, 58, 61], 256], - 10869: [[61, 61], 256], - 10870: [[61, 61, 61], 256], - 10972: [[10973, 824], 512] - }, - 11264: { - 11388: [[106], 256], - 11389: [[86], 256], - 11503: [, 230], - 11504: [, 230], - 11505: [, 230] - }, - 11520: { - 11631: [[11617], 256], - 11647: [, 9], - 11744: [, 230], - 11745: [, 230], - 11746: [, 230], - 11747: [, 230], - 11748: [, 230], - 11749: [, 230], - 11750: [, 230], - 11751: [, 230], - 11752: [, 230], - 11753: [, 230], - 11754: [, 230], - 11755: [, 230], - 11756: [, 230], - 11757: [, 230], - 11758: [, 230], - 11759: [, 230], - 11760: [, 230], - 11761: [, 230], - 11762: [, 230], - 11763: [, 230], - 11764: [, 230], - 11765: [, 230], - 11766: [, 230], - 11767: [, 230], - 11768: [, 230], - 11769: [, 230], - 11770: [, 230], - 11771: [, 230], - 11772: [, 230], - 11773: [, 230], - 11774: [, 230], - 11775: [, 230] - }, - 11776: { 11935: [[27597], 256], 12019: [[40863], 256] }, - 12032: { - 12032: [[19968], 256], - 12033: [[20008], 256], - 12034: [[20022], 256], - 12035: [[20031], 256], - 12036: [[20057], 256], - 12037: [[20101], 256], - 12038: [[20108], 256], - 12039: [[20128], 256], - 12040: [[20154], 256], - 12041: [[20799], 256], - 12042: [[20837], 256], - 12043: [[20843], 256], - 12044: [[20866], 256], - 12045: [[20886], 256], - 12046: [[20907], 256], - 12047: [[20960], 256], - 12048: [[20981], 256], - 12049: [[20992], 256], - 12050: [[21147], 256], - 12051: [[21241], 256], - 12052: [[21269], 256], - 12053: [[21274], 256], - 12054: [[21304], 256], - 12055: [[21313], 256], - 12056: [[21340], 256], - 12057: [[21353], 256], - 12058: [[21378], 256], - 12059: [[21430], 256], - 12060: [[21448], 256], - 12061: [[21475], 256], - 12062: [[22231], 256], - 12063: [[22303], 256], - 12064: [[22763], 256], - 12065: [[22786], 256], - 12066: [[22794], 256], - 12067: [[22805], 256], - 12068: [[22823], 256], - 12069: [[22899], 256], - 12070: [[23376], 256], - 12071: [[23424], 256], - 12072: [[23544], 256], - 12073: [[23567], 256], - 12074: [[23586], 256], - 12075: [[23608], 256], - 12076: [[23662], 256], - 12077: [[23665], 256], - 12078: [[24027], 256], - 12079: [[24037], 256], - 12080: [[24049], 256], - 12081: [[24062], 256], - 12082: [[24178], 256], - 12083: [[24186], 256], - 12084: [[24191], 256], - 12085: [[24308], 256], - 12086: [[24318], 256], - 12087: [[24331], 256], - 12088: [[24339], 256], - 12089: [[24400], 256], - 12090: [[24417], 256], - 12091: [[24435], 256], - 12092: [[24515], 256], - 12093: [[25096], 256], - 12094: [[25142], 256], - 12095: [[25163], 256], - 12096: [[25903], 256], - 12097: [[25908], 256], - 12098: [[25991], 256], - 12099: [[26007], 256], - 12100: [[26020], 256], - 12101: [[26041], 256], - 12102: [[26080], 256], - 12103: [[26085], 256], - 12104: [[26352], 256], - 12105: [[26376], 256], - 12106: [[26408], 256], - 12107: [[27424], 256], - 12108: [[27490], 256], - 12109: [[27513], 256], - 12110: [[27571], 256], - 12111: [[27595], 256], - 12112: [[27604], 256], - 12113: [[27611], 256], - 12114: [[27663], 256], - 12115: [[27668], 256], - 12116: [[27700], 256], - 12117: [[28779], 256], - 12118: [[29226], 256], - 12119: [[29238], 256], - 12120: [[29243], 256], - 12121: [[29247], 256], - 12122: [[29255], 256], - 12123: [[29273], 256], - 12124: [[29275], 256], - 12125: [[29356], 256], - 12126: [[29572], 256], - 12127: [[29577], 256], - 12128: [[29916], 256], - 12129: [[29926], 256], - 12130: [[29976], 256], - 12131: [[29983], 256], - 12132: [[29992], 256], - 12133: [[30000], 256], - 12134: [[30091], 256], - 12135: [[30098], 256], - 12136: [[30326], 256], - 12137: [[30333], 256], - 12138: [[30382], 256], - 12139: [[30399], 256], - 12140: [[30446], 256], - 12141: [[30683], 256], - 12142: [[30690], 256], - 12143: [[30707], 256], - 12144: [[31034], 256], - 12145: [[31160], 256], - 12146: [[31166], 256], - 12147: [[31348], 256], - 12148: [[31435], 256], - 12149: [[31481], 256], - 12150: [[31859], 256], - 12151: [[31992], 256], - 12152: [[32566], 256], - 12153: [[32593], 256], - 12154: [[32650], 256], - 12155: [[32701], 256], - 12156: [[32769], 256], - 12157: [[32780], 256], - 12158: [[32786], 256], - 12159: [[32819], 256], - 12160: [[32895], 256], - 12161: [[32905], 256], - 12162: [[33251], 256], - 12163: [[33258], 256], - 12164: [[33267], 256], - 12165: [[33276], 256], - 12166: [[33292], 256], - 12167: [[33307], 256], - 12168: [[33311], 256], - 12169: [[33390], 256], - 12170: [[33394], 256], - 12171: [[33400], 256], - 12172: [[34381], 256], - 12173: [[34411], 256], - 12174: [[34880], 256], - 12175: [[34892], 256], - 12176: [[34915], 256], - 12177: [[35198], 256], - 12178: [[35211], 256], - 12179: [[35282], 256], - 12180: [[35328], 256], - 12181: [[35895], 256], - 12182: [[35910], 256], - 12183: [[35925], 256], - 12184: [[35960], 256], - 12185: [[35997], 256], - 12186: [[36196], 256], - 12187: [[36208], 256], - 12188: [[36275], 256], - 12189: [[36523], 256], - 12190: [[36554], 256], - 12191: [[36763], 256], - 12192: [[36784], 256], - 12193: [[36789], 256], - 12194: [[37009], 256], - 12195: [[37193], 256], - 12196: [[37318], 256], - 12197: [[37324], 256], - 12198: [[37329], 256], - 12199: [[38263], 256], - 12200: [[38272], 256], - 12201: [[38428], 256], - 12202: [[38582], 256], - 12203: [[38585], 256], - 12204: [[38632], 256], - 12205: [[38737], 256], - 12206: [[38750], 256], - 12207: [[38754], 256], - 12208: [[38761], 256], - 12209: [[38859], 256], - 12210: [[38893], 256], - 12211: [[38899], 256], - 12212: [[38913], 256], - 12213: [[39080], 256], - 12214: [[39131], 256], - 12215: [[39135], 256], - 12216: [[39318], 256], - 12217: [[39321], 256], - 12218: [[39340], 256], - 12219: [[39592], 256], - 12220: [[39640], 256], - 12221: [[39647], 256], - 12222: [[39717], 256], - 12223: [[39727], 256], - 12224: [[39730], 256], - 12225: [[39740], 256], - 12226: [[39770], 256], - 12227: [[40165], 256], - 12228: [[40565], 256], - 12229: [[40575], 256], - 12230: [[40613], 256], - 12231: [[40635], 256], - 12232: [[40643], 256], - 12233: [[40653], 256], - 12234: [[40657], 256], - 12235: [[40697], 256], - 12236: [[40701], 256], - 12237: [[40718], 256], - 12238: [[40723], 256], - 12239: [[40736], 256], - 12240: [[40763], 256], - 12241: [[40778], 256], - 12242: [[40786], 256], - 12243: [[40845], 256], - 12244: [[40860], 256], - 12245: [[40864], 256] - }, - 12288: { - 12288: [[32], 256], - 12330: [, 218], - 12331: [, 228], - 12332: [, 232], - 12333: [, 222], - 12334: [, 224], - 12335: [, 224], - 12342: [[12306], 256], - 12344: [[21313], 256], - 12345: [[21316], 256], - 12346: [[21317], 256], - 12358: [, , { 12441: 12436 }], - 12363: [, , { 12441: 12364 }], - 12364: [[12363, 12441]], - 12365: [, , { 12441: 12366 }], - 12366: [[12365, 12441]], - 12367: [, , { 12441: 12368 }], - 12368: [[12367, 12441]], - 12369: [, , { 12441: 12370 }], - 12370: [[12369, 12441]], - 12371: [, , { 12441: 12372 }], - 12372: [[12371, 12441]], - 12373: [, , { 12441: 12374 }], - 12374: [[12373, 12441]], - 12375: [, , { 12441: 12376 }], - 12376: [[12375, 12441]], - 12377: [, , { 12441: 12378 }], - 12378: [[12377, 12441]], - 12379: [, , { 12441: 12380 }], - 12380: [[12379, 12441]], - 12381: [, , { 12441: 12382 }], - 12382: [[12381, 12441]], - 12383: [, , { 12441: 12384 }], - 12384: [[12383, 12441]], - 12385: [, , { 12441: 12386 }], - 12386: [[12385, 12441]], - 12388: [, , { 12441: 12389 }], - 12389: [[12388, 12441]], - 12390: [, , { 12441: 12391 }], - 12391: [[12390, 12441]], - 12392: [, , { 12441: 12393 }], - 12393: [[12392, 12441]], - 12399: [, , { 12441: 12400, 12442: 12401 }], - 12400: [[12399, 12441]], - 12401: [[12399, 12442]], - 12402: [, , { 12441: 12403, 12442: 12404 }], - 12403: [[12402, 12441]], - 12404: [[12402, 12442]], - 12405: [, , { 12441: 12406, 12442: 12407 }], - 12406: [[12405, 12441]], - 12407: [[12405, 12442]], - 12408: [, , { 12441: 12409, 12442: 12410 }], - 12409: [[12408, 12441]], - 12410: [[12408, 12442]], - 12411: [, , { 12441: 12412, 12442: 12413 }], - 12412: [[12411, 12441]], - 12413: [[12411, 12442]], - 12436: [[12358, 12441]], - 12441: [, 8], - 12442: [, 8], - 12443: [[32, 12441], 256], - 12444: [[32, 12442], 256], - 12445: [, , { 12441: 12446 }], - 12446: [[12445, 12441]], - 12447: [[12424, 12426], 256], - 12454: [, , { 12441: 12532 }], - 12459: [, , { 12441: 12460 }], - 12460: [[12459, 12441]], - 12461: [, , { 12441: 12462 }], - 12462: [[12461, 12441]], - 12463: [, , { 12441: 12464 }], - 12464: [[12463, 12441]], - 12465: [, , { 12441: 12466 }], - 12466: [[12465, 12441]], - 12467: [, , { 12441: 12468 }], - 12468: [[12467, 12441]], - 12469: [, , { 12441: 12470 }], - 12470: [[12469, 12441]], - 12471: [, , { 12441: 12472 }], - 12472: [[12471, 12441]], - 12473: [, , { 12441: 12474 }], - 12474: [[12473, 12441]], - 12475: [, , { 12441: 12476 }], - 12476: [[12475, 12441]], - 12477: [, , { 12441: 12478 }], - 12478: [[12477, 12441]], - 12479: [, , { 12441: 12480 }], - 12480: [[12479, 12441]], - 12481: [, , { 12441: 12482 }], - 12482: [[12481, 12441]], - 12484: [, , { 12441: 12485 }], - 12485: [[12484, 12441]], - 12486: [, , { 12441: 12487 }], - 12487: [[12486, 12441]], - 12488: [, , { 12441: 12489 }], - 12489: [[12488, 12441]], - 12495: [, , { 12441: 12496, 12442: 12497 }], - 12496: [[12495, 12441]], - 12497: [[12495, 12442]], - 12498: [, , { 12441: 12499, 12442: 12500 }], - 12499: [[12498, 12441]], - 12500: [[12498, 12442]], - 12501: [, , { 12441: 12502, 12442: 12503 }], - 12502: [[12501, 12441]], - 12503: [[12501, 12442]], - 12504: [, , { 12441: 12505, 12442: 12506 }], - 12505: [[12504, 12441]], - 12506: [[12504, 12442]], - 12507: [, , { 12441: 12508, 12442: 12509 }], - 12508: [[12507, 12441]], - 12509: [[12507, 12442]], - 12527: [, , { 12441: 12535 }], - 12528: [, , { 12441: 12536 }], - 12529: [, , { 12441: 12537 }], - 12530: [, , { 12441: 12538 }], - 12532: [[12454, 12441]], - 12535: [[12527, 12441]], - 12536: [[12528, 12441]], - 12537: [[12529, 12441]], - 12538: [[12530, 12441]], - 12541: [, , { 12441: 12542 }], - 12542: [[12541, 12441]], - 12543: [[12467, 12488], 256] - }, - 12544: { - 12593: [[4352], 256], - 12594: [[4353], 256], - 12595: [[4522], 256], - 12596: [[4354], 256], - 12597: [[4524], 256], - 12598: [[4525], 256], - 12599: [[4355], 256], - 12600: [[4356], 256], - 12601: [[4357], 256], - 12602: [[4528], 256], - 12603: [[4529], 256], - 12604: [[4530], 256], - 12605: [[4531], 256], - 12606: [[4532], 256], - 12607: [[4533], 256], - 12608: [[4378], 256], - 12609: [[4358], 256], - 12610: [[4359], 256], - 12611: [[4360], 256], - 12612: [[4385], 256], - 12613: [[4361], 256], - 12614: [[4362], 256], - 12615: [[4363], 256], - 12616: [[4364], 256], - 12617: [[4365], 256], - 12618: [[4366], 256], - 12619: [[4367], 256], - 12620: [[4368], 256], - 12621: [[4369], 256], - 12622: [[4370], 256], - 12623: [[4449], 256], - 12624: [[4450], 256], - 12625: [[4451], 256], - 12626: [[4452], 256], - 12627: [[4453], 256], - 12628: [[4454], 256], - 12629: [[4455], 256], - 12630: [[4456], 256], - 12631: [[4457], 256], - 12632: [[4458], 256], - 12633: [[4459], 256], - 12634: [[4460], 256], - 12635: [[4461], 256], - 12636: [[4462], 256], - 12637: [[4463], 256], - 12638: [[4464], 256], - 12639: [[4465], 256], - 12640: [[4466], 256], - 12641: [[4467], 256], - 12642: [[4468], 256], - 12643: [[4469], 256], - 12644: [[4448], 256], - 12645: [[4372], 256], - 12646: [[4373], 256], - 12647: [[4551], 256], - 12648: [[4552], 256], - 12649: [[4556], 256], - 12650: [[4558], 256], - 12651: [[4563], 256], - 12652: [[4567], 256], - 12653: [[4569], 256], - 12654: [[4380], 256], - 12655: [[4573], 256], - 12656: [[4575], 256], - 12657: [[4381], 256], - 12658: [[4382], 256], - 12659: [[4384], 256], - 12660: [[4386], 256], - 12661: [[4387], 256], - 12662: [[4391], 256], - 12663: [[4393], 256], - 12664: [[4395], 256], - 12665: [[4396], 256], - 12666: [[4397], 256], - 12667: [[4398], 256], - 12668: [[4399], 256], - 12669: [[4402], 256], - 12670: [[4406], 256], - 12671: [[4416], 256], - 12672: [[4423], 256], - 12673: [[4428], 256], - 12674: [[4593], 256], - 12675: [[4594], 256], - 12676: [[4439], 256], - 12677: [[4440], 256], - 12678: [[4441], 256], - 12679: [[4484], 256], - 12680: [[4485], 256], - 12681: [[4488], 256], - 12682: [[4497], 256], - 12683: [[4498], 256], - 12684: [[4500], 256], - 12685: [[4510], 256], - 12686: [[4513], 256], - 12690: [[19968], 256], - 12691: [[20108], 256], - 12692: [[19977], 256], - 12693: [[22235], 256], - 12694: [[19978], 256], - 12695: [[20013], 256], - 12696: [[19979], 256], - 12697: [[30002], 256], - 12698: [[20057], 256], - 12699: [[19993], 256], - 12700: [[19969], 256], - 12701: [[22825], 256], - 12702: [[22320], 256], - 12703: [[20154], 256] - }, - 12800: { - 12800: [[40, 4352, 41], 256], - 12801: [[40, 4354, 41], 256], - 12802: [[40, 4355, 41], 256], - 12803: [[40, 4357, 41], 256], - 12804: [[40, 4358, 41], 256], - 12805: [[40, 4359, 41], 256], - 12806: [[40, 4361, 41], 256], - 12807: [[40, 4363, 41], 256], - 12808: [[40, 4364, 41], 256], - 12809: [[40, 4366, 41], 256], - 12810: [[40, 4367, 41], 256], - 12811: [[40, 4368, 41], 256], - 12812: [[40, 4369, 41], 256], - 12813: [[40, 4370, 41], 256], - 12814: [[40, 4352, 4449, 41], 256], - 12815: [[40, 4354, 4449, 41], 256], - 12816: [[40, 4355, 4449, 41], 256], - 12817: [[40, 4357, 4449, 41], 256], - 12818: [[40, 4358, 4449, 41], 256], - 12819: [[40, 4359, 4449, 41], 256], - 12820: [[40, 4361, 4449, 41], 256], - 12821: [[40, 4363, 4449, 41], 256], - 12822: [[40, 4364, 4449, 41], 256], - 12823: [[40, 4366, 4449, 41], 256], - 12824: [[40, 4367, 4449, 41], 256], - 12825: [[40, 4368, 4449, 41], 256], - 12826: [[40, 4369, 4449, 41], 256], - 12827: [[40, 4370, 4449, 41], 256], - 12828: [[40, 4364, 4462, 41], 256], - 12829: [[40, 4363, 4457, 4364, 4453, 4523, 41], 256], - 12830: [[40, 4363, 4457, 4370, 4462, 41], 256], - 12832: [[40, 19968, 41], 256], - 12833: [[40, 20108, 41], 256], - 12834: [[40, 19977, 41], 256], - 12835: [[40, 22235, 41], 256], - 12836: [[40, 20116, 41], 256], - 12837: [[40, 20845, 41], 256], - 12838: [[40, 19971, 41], 256], - 12839: [[40, 20843, 41], 256], - 12840: [[40, 20061, 41], 256], - 12841: [[40, 21313, 41], 256], - 12842: [[40, 26376, 41], 256], - 12843: [[40, 28779, 41], 256], - 12844: [[40, 27700, 41], 256], - 12845: [[40, 26408, 41], 256], - 12846: [[40, 37329, 41], 256], - 12847: [[40, 22303, 41], 256], - 12848: [[40, 26085, 41], 256], - 12849: [[40, 26666, 41], 256], - 12850: [[40, 26377, 41], 256], - 12851: [[40, 31038, 41], 256], - 12852: [[40, 21517, 41], 256], - 12853: [[40, 29305, 41], 256], - 12854: [[40, 36001, 41], 256], - 12855: [[40, 31069, 41], 256], - 12856: [[40, 21172, 41], 256], - 12857: [[40, 20195, 41], 256], - 12858: [[40, 21628, 41], 256], - 12859: [[40, 23398, 41], 256], - 12860: [[40, 30435, 41], 256], - 12861: [[40, 20225, 41], 256], - 12862: [[40, 36039, 41], 256], - 12863: [[40, 21332, 41], 256], - 12864: [[40, 31085, 41], 256], - 12865: [[40, 20241, 41], 256], - 12866: [[40, 33258, 41], 256], - 12867: [[40, 33267, 41], 256], - 12868: [[21839], 256], - 12869: [[24188], 256], - 12870: [[25991], 256], - 12871: [[31631], 256], - 12880: [[80, 84, 69], 256], - 12881: [[50, 49], 256], - 12882: [[50, 50], 256], - 12883: [[50, 51], 256], - 12884: [[50, 52], 256], - 12885: [[50, 53], 256], - 12886: [[50, 54], 256], - 12887: [[50, 55], 256], - 12888: [[50, 56], 256], - 12889: [[50, 57], 256], - 12890: [[51, 48], 256], - 12891: [[51, 49], 256], - 12892: [[51, 50], 256], - 12893: [[51, 51], 256], - 12894: [[51, 52], 256], - 12895: [[51, 53], 256], - 12896: [[4352], 256], - 12897: [[4354], 256], - 12898: [[4355], 256], - 12899: [[4357], 256], - 12900: [[4358], 256], - 12901: [[4359], 256], - 12902: [[4361], 256], - 12903: [[4363], 256], - 12904: [[4364], 256], - 12905: [[4366], 256], - 12906: [[4367], 256], - 12907: [[4368], 256], - 12908: [[4369], 256], - 12909: [[4370], 256], - 12910: [[4352, 4449], 256], - 12911: [[4354, 4449], 256], - 12912: [[4355, 4449], 256], - 12913: [[4357, 4449], 256], - 12914: [[4358, 4449], 256], - 12915: [[4359, 4449], 256], - 12916: [[4361, 4449], 256], - 12917: [[4363, 4449], 256], - 12918: [[4364, 4449], 256], - 12919: [[4366, 4449], 256], - 12920: [[4367, 4449], 256], - 12921: [[4368, 4449], 256], - 12922: [[4369, 4449], 256], - 12923: [[4370, 4449], 256], - 12924: [[4366, 4449, 4535, 4352, 4457], 256], - 12925: [[4364, 4462, 4363, 4468], 256], - 12926: [[4363, 4462], 256], - 12928: [[19968], 256], - 12929: [[20108], 256], - 12930: [[19977], 256], - 12931: [[22235], 256], - 12932: [[20116], 256], - 12933: [[20845], 256], - 12934: [[19971], 256], - 12935: [[20843], 256], - 12936: [[20061], 256], - 12937: [[21313], 256], - 12938: [[26376], 256], - 12939: [[28779], 256], - 12940: [[27700], 256], - 12941: [[26408], 256], - 12942: [[37329], 256], - 12943: [[22303], 256], - 12944: [[26085], 256], - 12945: [[26666], 256], - 12946: [[26377], 256], - 12947: [[31038], 256], - 12948: [[21517], 256], - 12949: [[29305], 256], - 12950: [[36001], 256], - 12951: [[31069], 256], - 12952: [[21172], 256], - 12953: [[31192], 256], - 12954: [[30007], 256], - 12955: [[22899], 256], - 12956: [[36969], 256], - 12957: [[20778], 256], - 12958: [[21360], 256], - 12959: [[27880], 256], - 12960: [[38917], 256], - 12961: [[20241], 256], - 12962: [[20889], 256], - 12963: [[27491], 256], - 12964: [[19978], 256], - 12965: [[20013], 256], - 12966: [[19979], 256], - 12967: [[24038], 256], - 12968: [[21491], 256], - 12969: [[21307], 256], - 12970: [[23447], 256], - 12971: [[23398], 256], - 12972: [[30435], 256], - 12973: [[20225], 256], - 12974: [[36039], 256], - 12975: [[21332], 256], - 12976: [[22812], 256], - 12977: [[51, 54], 256], - 12978: [[51, 55], 256], - 12979: [[51, 56], 256], - 12980: [[51, 57], 256], - 12981: [[52, 48], 256], - 12982: [[52, 49], 256], - 12983: [[52, 50], 256], - 12984: [[52, 51], 256], - 12985: [[52, 52], 256], - 12986: [[52, 53], 256], - 12987: [[52, 54], 256], - 12988: [[52, 55], 256], - 12989: [[52, 56], 256], - 12990: [[52, 57], 256], - 12991: [[53, 48], 256], - 12992: [[49, 26376], 256], - 12993: [[50, 26376], 256], - 12994: [[51, 26376], 256], - 12995: [[52, 26376], 256], - 12996: [[53, 26376], 256], - 12997: [[54, 26376], 256], - 12998: [[55, 26376], 256], - 12999: [[56, 26376], 256], - 13000: [[57, 26376], 256], - 13001: [[49, 48, 26376], 256], - 13002: [[49, 49, 26376], 256], - 13003: [[49, 50, 26376], 256], - 13004: [[72, 103], 256], - 13005: [[101, 114, 103], 256], - 13006: [[101, 86], 256], - 13007: [[76, 84, 68], 256], - 13008: [[12450], 256], - 13009: [[12452], 256], - 13010: [[12454], 256], - 13011: [[12456], 256], - 13012: [[12458], 256], - 13013: [[12459], 256], - 13014: [[12461], 256], - 13015: [[12463], 256], - 13016: [[12465], 256], - 13017: [[12467], 256], - 13018: [[12469], 256], - 13019: [[12471], 256], - 13020: [[12473], 256], - 13021: [[12475], 256], - 13022: [[12477], 256], - 13023: [[12479], 256], - 13024: [[12481], 256], - 13025: [[12484], 256], - 13026: [[12486], 256], - 13027: [[12488], 256], - 13028: [[12490], 256], - 13029: [[12491], 256], - 13030: [[12492], 256], - 13031: [[12493], 256], - 13032: [[12494], 256], - 13033: [[12495], 256], - 13034: [[12498], 256], - 13035: [[12501], 256], - 13036: [[12504], 256], - 13037: [[12507], 256], - 13038: [[12510], 256], - 13039: [[12511], 256], - 13040: [[12512], 256], - 13041: [[12513], 256], - 13042: [[12514], 256], - 13043: [[12516], 256], - 13044: [[12518], 256], - 13045: [[12520], 256], - 13046: [[12521], 256], - 13047: [[12522], 256], - 13048: [[12523], 256], - 13049: [[12524], 256], - 13050: [[12525], 256], - 13051: [[12527], 256], - 13052: [[12528], 256], - 13053: [[12529], 256], - 13054: [[12530], 256] - }, - 13056: { - 13056: [[12450, 12497, 12540, 12488], 256], - 13057: [[12450, 12523, 12501, 12449], 256], - 13058: [[12450, 12531, 12506, 12450], 256], - 13059: [[12450, 12540, 12523], 256], - 13060: [[12452, 12491, 12531, 12464], 256], - 13061: [[12452, 12531, 12481], 256], - 13062: [[12454, 12457, 12531], 256], - 13063: [[12456, 12473, 12463, 12540, 12489], 256], - 13064: [[12456, 12540, 12459, 12540], 256], - 13065: [[12458, 12531, 12473], 256], - 13066: [[12458, 12540, 12512], 256], - 13067: [[12459, 12452, 12522], 256], - 13068: [[12459, 12521, 12483, 12488], 256], - 13069: [[12459, 12525, 12522, 12540], 256], - 13070: [[12460, 12525, 12531], 256], - 13071: [[12460, 12531, 12510], 256], - 13072: [[12462, 12460], 256], - 13073: [[12462, 12491, 12540], 256], - 13074: [[12461, 12517, 12522, 12540], 256], - 13075: [[12462, 12523, 12480, 12540], 256], - 13076: [[12461, 12525], 256], - 13077: [[12461, 12525, 12464, 12521, 12512], 256], - 13078: [[12461, 12525, 12513, 12540, 12488, 12523], 256], - 13079: [[12461, 12525, 12527, 12483, 12488], 256], - 13080: [[12464, 12521, 12512], 256], - 13081: [[12464, 12521, 12512, 12488, 12531], 256], - 13082: [[12463, 12523, 12476, 12452, 12525], 256], - 13083: [[12463, 12525, 12540, 12493], 256], - 13084: [[12465, 12540, 12473], 256], - 13085: [[12467, 12523, 12490], 256], - 13086: [[12467, 12540, 12509], 256], - 13087: [[12469, 12452, 12463, 12523], 256], - 13088: [[12469, 12531, 12481, 12540, 12512], 256], - 13089: [[12471, 12522, 12531, 12464], 256], - 13090: [[12475, 12531, 12481], 256], - 13091: [[12475, 12531, 12488], 256], - 13092: [[12480, 12540, 12473], 256], - 13093: [[12487, 12471], 256], - 13094: [[12489, 12523], 256], - 13095: [[12488, 12531], 256], - 13096: [[12490, 12494], 256], - 13097: [[12494, 12483, 12488], 256], - 13098: [[12495, 12452, 12484], 256], - 13099: [[12497, 12540, 12475, 12531, 12488], 256], - 13100: [[12497, 12540, 12484], 256], - 13101: [[12496, 12540, 12524, 12523], 256], - 13102: [[12500, 12450, 12473, 12488, 12523], 256], - 13103: [[12500, 12463, 12523], 256], - 13104: [[12500, 12467], 256], - 13105: [[12499, 12523], 256], - 13106: [[12501, 12449, 12521, 12483, 12489], 256], - 13107: [[12501, 12451, 12540, 12488], 256], - 13108: [[12502, 12483, 12471, 12455, 12523], 256], - 13109: [[12501, 12521, 12531], 256], - 13110: [[12504, 12463, 12479, 12540, 12523], 256], - 13111: [[12506, 12477], 256], - 13112: [[12506, 12491, 12498], 256], - 13113: [[12504, 12523, 12484], 256], - 13114: [[12506, 12531, 12473], 256], - 13115: [[12506, 12540, 12472], 256], - 13116: [[12505, 12540, 12479], 256], - 13117: [[12509, 12452, 12531, 12488], 256], - 13118: [[12508, 12523, 12488], 256], - 13119: [[12507, 12531], 256], - 13120: [[12509, 12531, 12489], 256], - 13121: [[12507, 12540, 12523], 256], - 13122: [[12507, 12540, 12531], 256], - 13123: [[12510, 12452, 12463, 12525], 256], - 13124: [[12510, 12452, 12523], 256], - 13125: [[12510, 12483, 12495], 256], - 13126: [[12510, 12523, 12463], 256], - 13127: [[12510, 12531, 12471, 12519, 12531], 256], - 13128: [[12511, 12463, 12525, 12531], 256], - 13129: [[12511, 12522], 256], - 13130: [[12511, 12522, 12496, 12540, 12523], 256], - 13131: [[12513, 12460], 256], - 13132: [[12513, 12460, 12488, 12531], 256], - 13133: [[12513, 12540, 12488, 12523], 256], - 13134: [[12516, 12540, 12489], 256], - 13135: [[12516, 12540, 12523], 256], - 13136: [[12518, 12450, 12531], 256], - 13137: [[12522, 12483, 12488, 12523], 256], - 13138: [[12522, 12521], 256], - 13139: [[12523, 12500, 12540], 256], - 13140: [[12523, 12540, 12502, 12523], 256], - 13141: [[12524, 12512], 256], - 13142: [[12524, 12531, 12488, 12466, 12531], 256], - 13143: [[12527, 12483, 12488], 256], - 13144: [[48, 28857], 256], - 13145: [[49, 28857], 256], - 13146: [[50, 28857], 256], - 13147: [[51, 28857], 256], - 13148: [[52, 28857], 256], - 13149: [[53, 28857], 256], - 13150: [[54, 28857], 256], - 13151: [[55, 28857], 256], - 13152: [[56, 28857], 256], - 13153: [[57, 28857], 256], - 13154: [[49, 48, 28857], 256], - 13155: [[49, 49, 28857], 256], - 13156: [[49, 50, 28857], 256], - 13157: [[49, 51, 28857], 256], - 13158: [[49, 52, 28857], 256], - 13159: [[49, 53, 28857], 256], - 13160: [[49, 54, 28857], 256], - 13161: [[49, 55, 28857], 256], - 13162: [[49, 56, 28857], 256], - 13163: [[49, 57, 28857], 256], - 13164: [[50, 48, 28857], 256], - 13165: [[50, 49, 28857], 256], - 13166: [[50, 50, 28857], 256], - 13167: [[50, 51, 28857], 256], - 13168: [[50, 52, 28857], 256], - 13169: [[104, 80, 97], 256], - 13170: [[100, 97], 256], - 13171: [[65, 85], 256], - 13172: [[98, 97, 114], 256], - 13173: [[111, 86], 256], - 13174: [[112, 99], 256], - 13175: [[100, 109], 256], - 13176: [[100, 109, 178], 256], - 13177: [[100, 109, 179], 256], - 13178: [[73, 85], 256], - 13179: [[24179, 25104], 256], - 13180: [[26157, 21644], 256], - 13181: [[22823, 27491], 256], - 13182: [[26126, 27835], 256], - 13183: [[26666, 24335, 20250, 31038], 256], - 13184: [[112, 65], 256], - 13185: [[110, 65], 256], - 13186: [[956, 65], 256], - 13187: [[109, 65], 256], - 13188: [[107, 65], 256], - 13189: [[75, 66], 256], - 13190: [[77, 66], 256], - 13191: [[71, 66], 256], - 13192: [[99, 97, 108], 256], - 13193: [[107, 99, 97, 108], 256], - 13194: [[112, 70], 256], - 13195: [[110, 70], 256], - 13196: [[956, 70], 256], - 13197: [[956, 103], 256], - 13198: [[109, 103], 256], - 13199: [[107, 103], 256], - 13200: [[72, 122], 256], - 13201: [[107, 72, 122], 256], - 13202: [[77, 72, 122], 256], - 13203: [[71, 72, 122], 256], - 13204: [[84, 72, 122], 256], - 13205: [[956, 8467], 256], - 13206: [[109, 8467], 256], - 13207: [[100, 8467], 256], - 13208: [[107, 8467], 256], - 13209: [[102, 109], 256], - 13210: [[110, 109], 256], - 13211: [[956, 109], 256], - 13212: [[109, 109], 256], - 13213: [[99, 109], 256], - 13214: [[107, 109], 256], - 13215: [[109, 109, 178], 256], - 13216: [[99, 109, 178], 256], - 13217: [[109, 178], 256], - 13218: [[107, 109, 178], 256], - 13219: [[109, 109, 179], 256], - 13220: [[99, 109, 179], 256], - 13221: [[109, 179], 256], - 13222: [[107, 109, 179], 256], - 13223: [[109, 8725, 115], 256], - 13224: [[109, 8725, 115, 178], 256], - 13225: [[80, 97], 256], - 13226: [[107, 80, 97], 256], - 13227: [[77, 80, 97], 256], - 13228: [[71, 80, 97], 256], - 13229: [[114, 97, 100], 256], - 13230: [[114, 97, 100, 8725, 115], 256], - 13231: [[114, 97, 100, 8725, 115, 178], 256], - 13232: [[112, 115], 256], - 13233: [[110, 115], 256], - 13234: [[956, 115], 256], - 13235: [[109, 115], 256], - 13236: [[112, 86], 256], - 13237: [[110, 86], 256], - 13238: [[956, 86], 256], - 13239: [[109, 86], 256], - 13240: [[107, 86], 256], - 13241: [[77, 86], 256], - 13242: [[112, 87], 256], - 13243: [[110, 87], 256], - 13244: [[956, 87], 256], - 13245: [[109, 87], 256], - 13246: [[107, 87], 256], - 13247: [[77, 87], 256], - 13248: [[107, 937], 256], - 13249: [[77, 937], 256], - 13250: [[97, 46, 109, 46], 256], - 13251: [[66, 113], 256], - 13252: [[99, 99], 256], - 13253: [[99, 100], 256], - 13254: [[67, 8725, 107, 103], 256], - 13255: [[67, 111, 46], 256], - 13256: [[100, 66], 256], - 13257: [[71, 121], 256], - 13258: [[104, 97], 256], - 13259: [[72, 80], 256], - 13260: [[105, 110], 256], - 13261: [[75, 75], 256], - 13262: [[75, 77], 256], - 13263: [[107, 116], 256], - 13264: [[108, 109], 256], - 13265: [[108, 110], 256], - 13266: [[108, 111, 103], 256], - 13267: [[108, 120], 256], - 13268: [[109, 98], 256], - 13269: [[109, 105, 108], 256], - 13270: [[109, 111, 108], 256], - 13271: [[80, 72], 256], - 13272: [[112, 46, 109, 46], 256], - 13273: [[80, 80, 77], 256], - 13274: [[80, 82], 256], - 13275: [[115, 114], 256], - 13276: [[83, 118], 256], - 13277: [[87, 98], 256], - 13278: [[86, 8725, 109], 256], - 13279: [[65, 8725, 109], 256], - 13280: [[49, 26085], 256], - 13281: [[50, 26085], 256], - 13282: [[51, 26085], 256], - 13283: [[52, 26085], 256], - 13284: [[53, 26085], 256], - 13285: [[54, 26085], 256], - 13286: [[55, 26085], 256], - 13287: [[56, 26085], 256], - 13288: [[57, 26085], 256], - 13289: [[49, 48, 26085], 256], - 13290: [[49, 49, 26085], 256], - 13291: [[49, 50, 26085], 256], - 13292: [[49, 51, 26085], 256], - 13293: [[49, 52, 26085], 256], - 13294: [[49, 53, 26085], 256], - 13295: [[49, 54, 26085], 256], - 13296: [[49, 55, 26085], 256], - 13297: [[49, 56, 26085], 256], - 13298: [[49, 57, 26085], 256], - 13299: [[50, 48, 26085], 256], - 13300: [[50, 49, 26085], 256], - 13301: [[50, 50, 26085], 256], - 13302: [[50, 51, 26085], 256], - 13303: [[50, 52, 26085], 256], - 13304: [[50, 53, 26085], 256], - 13305: [[50, 54, 26085], 256], - 13306: [[50, 55, 26085], 256], - 13307: [[50, 56, 26085], 256], - 13308: [[50, 57, 26085], 256], - 13309: [[51, 48, 26085], 256], - 13310: [[51, 49, 26085], 256], - 13311: [[103, 97, 108], 256] - }, - 42496: { - 42607: [, 230], - 42612: [, 230], - 42613: [, 230], - 42614: [, 230], - 42615: [, 230], - 42616: [, 230], - 42617: [, 230], - 42618: [, 230], - 42619: [, 230], - 42620: [, 230], - 42621: [, 230], - 42655: [, 230], - 42736: [, 230], - 42737: [, 230] - }, - 42752: { 42864: [[42863], 256], 43000: [[294], 256], 43001: [[339], 256] }, - 43008: { - 43014: [, 9], - 43204: [, 9], - 43232: [, 230], - 43233: [, 230], - 43234: [, 230], - 43235: [, 230], - 43236: [, 230], - 43237: [, 230], - 43238: [, 230], - 43239: [, 230], - 43240: [, 230], - 43241: [, 230], - 43242: [, 230], - 43243: [, 230], - 43244: [, 230], - 43245: [, 230], - 43246: [, 230], - 43247: [, 230], - 43248: [, 230], - 43249: [, 230] - }, - 43264: { - 43307: [, 220], - 43308: [, 220], - 43309: [, 220], - 43347: [, 9], - 43443: [, 7], - 43456: [, 9] - }, - 43520: { - 43696: [, 230], - 43698: [, 230], - 43699: [, 230], - 43700: [, 220], - 43703: [, 230], - 43704: [, 230], - 43710: [, 230], - 43711: [, 230], - 43713: [, 230], - 43766: [, 9] - }, - 43776: { 44013: [, 9] }, - 53504: { - 119134: [[119127, 119141], 512], - 119135: [[119128, 119141], 512], - 119136: [[119135, 119150], 512], - 119137: [[119135, 119151], 512], - 119138: [[119135, 119152], 512], - 119139: [[119135, 119153], 512], - 119140: [[119135, 119154], 512], - 119141: [, 216], - 119142: [, 216], - 119143: [, 1], - 119144: [, 1], - 119145: [, 1], - 119149: [, 226], - 119150: [, 216], - 119151: [, 216], - 119152: [, 216], - 119153: [, 216], - 119154: [, 216], - 119163: [, 220], - 119164: [, 220], - 119165: [, 220], - 119166: [, 220], - 119167: [, 220], - 119168: [, 220], - 119169: [, 220], - 119170: [, 220], - 119173: [, 230], - 119174: [, 230], - 119175: [, 230], - 119176: [, 230], - 119177: [, 230], - 119178: [, 220], - 119179: [, 220], - 119210: [, 230], - 119211: [, 230], - 119212: [, 230], - 119213: [, 230], - 119227: [[119225, 119141], 512], - 119228: [[119226, 119141], 512], - 119229: [[119227, 119150], 512], - 119230: [[119228, 119150], 512], - 119231: [[119227, 119151], 512], - 119232: [[119228, 119151], 512] - }, - 53760: { 119362: [, 230], 119363: [, 230], 119364: [, 230] }, - 54272: { - 119808: [[65], 256], - 119809: [[66], 256], - 119810: [[67], 256], - 119811: [[68], 256], - 119812: [[69], 256], - 119813: [[70], 256], - 119814: [[71], 256], - 119815: [[72], 256], - 119816: [[73], 256], - 119817: [[74], 256], - 119818: [[75], 256], - 119819: [[76], 256], - 119820: [[77], 256], - 119821: [[78], 256], - 119822: [[79], 256], - 119823: [[80], 256], - 119824: [[81], 256], - 119825: [[82], 256], - 119826: [[83], 256], - 119827: [[84], 256], - 119828: [[85], 256], - 119829: [[86], 256], - 119830: [[87], 256], - 119831: [[88], 256], - 119832: [[89], 256], - 119833: [[90], 256], - 119834: [[97], 256], - 119835: [[98], 256], - 119836: [[99], 256], - 119837: [[100], 256], - 119838: [[101], 256], - 119839: [[102], 256], - 119840: [[103], 256], - 119841: [[104], 256], - 119842: [[105], 256], - 119843: [[106], 256], - 119844: [[107], 256], - 119845: [[108], 256], - 119846: [[109], 256], - 119847: [[110], 256], - 119848: [[111], 256], - 119849: [[112], 256], - 119850: [[113], 256], - 119851: [[114], 256], - 119852: [[115], 256], - 119853: [[116], 256], - 119854: [[117], 256], - 119855: [[118], 256], - 119856: [[119], 256], - 119857: [[120], 256], - 119858: [[121], 256], - 119859: [[122], 256], - 119860: [[65], 256], - 119861: [[66], 256], - 119862: [[67], 256], - 119863: [[68], 256], - 119864: [[69], 256], - 119865: [[70], 256], - 119866: [[71], 256], - 119867: [[72], 256], - 119868: [[73], 256], - 119869: [[74], 256], - 119870: [[75], 256], - 119871: [[76], 256], - 119872: [[77], 256], - 119873: [[78], 256], - 119874: [[79], 256], - 119875: [[80], 256], - 119876: [[81], 256], - 119877: [[82], 256], - 119878: [[83], 256], - 119879: [[84], 256], - 119880: [[85], 256], - 119881: [[86], 256], - 119882: [[87], 256], - 119883: [[88], 256], - 119884: [[89], 256], - 119885: [[90], 256], - 119886: [[97], 256], - 119887: [[98], 256], - 119888: [[99], 256], - 119889: [[100], 256], - 119890: [[101], 256], - 119891: [[102], 256], - 119892: [[103], 256], - 119894: [[105], 256], - 119895: [[106], 256], - 119896: [[107], 256], - 119897: [[108], 256], - 119898: [[109], 256], - 119899: [[110], 256], - 119900: [[111], 256], - 119901: [[112], 256], - 119902: [[113], 256], - 119903: [[114], 256], - 119904: [[115], 256], - 119905: [[116], 256], - 119906: [[117], 256], - 119907: [[118], 256], - 119908: [[119], 256], - 119909: [[120], 256], - 119910: [[121], 256], - 119911: [[122], 256], - 119912: [[65], 256], - 119913: [[66], 256], - 119914: [[67], 256], - 119915: [[68], 256], - 119916: [[69], 256], - 119917: [[70], 256], - 119918: [[71], 256], - 119919: [[72], 256], - 119920: [[73], 256], - 119921: [[74], 256], - 119922: [[75], 256], - 119923: [[76], 256], - 119924: [[77], 256], - 119925: [[78], 256], - 119926: [[79], 256], - 119927: [[80], 256], - 119928: [[81], 256], - 119929: [[82], 256], - 119930: [[83], 256], - 119931: [[84], 256], - 119932: [[85], 256], - 119933: [[86], 256], - 119934: [[87], 256], - 119935: [[88], 256], - 119936: [[89], 256], - 119937: [[90], 256], - 119938: [[97], 256], - 119939: [[98], 256], - 119940: [[99], 256], - 119941: [[100], 256], - 119942: [[101], 256], - 119943: [[102], 256], - 119944: [[103], 256], - 119945: [[104], 256], - 119946: [[105], 256], - 119947: [[106], 256], - 119948: [[107], 256], - 119949: [[108], 256], - 119950: [[109], 256], - 119951: [[110], 256], - 119952: [[111], 256], - 119953: [[112], 256], - 119954: [[113], 256], - 119955: [[114], 256], - 119956: [[115], 256], - 119957: [[116], 256], - 119958: [[117], 256], - 119959: [[118], 256], - 119960: [[119], 256], - 119961: [[120], 256], - 119962: [[121], 256], - 119963: [[122], 256], - 119964: [[65], 256], - 119966: [[67], 256], - 119967: [[68], 256], - 119970: [[71], 256], - 119973: [[74], 256], - 119974: [[75], 256], - 119977: [[78], 256], - 119978: [[79], 256], - 119979: [[80], 256], - 119980: [[81], 256], - 119982: [[83], 256], - 119983: [[84], 256], - 119984: [[85], 256], - 119985: [[86], 256], - 119986: [[87], 256], - 119987: [[88], 256], - 119988: [[89], 256], - 119989: [[90], 256], - 119990: [[97], 256], - 119991: [[98], 256], - 119992: [[99], 256], - 119993: [[100], 256], - 119995: [[102], 256], - 119997: [[104], 256], - 119998: [[105], 256], - 119999: [[106], 256], - 120000: [[107], 256], - 120001: [[108], 256], - 120002: [[109], 256], - 120003: [[110], 256], - 120005: [[112], 256], - 120006: [[113], 256], - 120007: [[114], 256], - 120008: [[115], 256], - 120009: [[116], 256], - 120010: [[117], 256], - 120011: [[118], 256], - 120012: [[119], 256], - 120013: [[120], 256], - 120014: [[121], 256], - 120015: [[122], 256], - 120016: [[65], 256], - 120017: [[66], 256], - 120018: [[67], 256], - 120019: [[68], 256], - 120020: [[69], 256], - 120021: [[70], 256], - 120022: [[71], 256], - 120023: [[72], 256], - 120024: [[73], 256], - 120025: [[74], 256], - 120026: [[75], 256], - 120027: [[76], 256], - 120028: [[77], 256], - 120029: [[78], 256], - 120030: [[79], 256], - 120031: [[80], 256], - 120032: [[81], 256], - 120033: [[82], 256], - 120034: [[83], 256], - 120035: [[84], 256], - 120036: [[85], 256], - 120037: [[86], 256], - 120038: [[87], 256], - 120039: [[88], 256], - 120040: [[89], 256], - 120041: [[90], 256], - 120042: [[97], 256], - 120043: [[98], 256], - 120044: [[99], 256], - 120045: [[100], 256], - 120046: [[101], 256], - 120047: [[102], 256], - 120048: [[103], 256], - 120049: [[104], 256], - 120050: [[105], 256], - 120051: [[106], 256], - 120052: [[107], 256], - 120053: [[108], 256], - 120054: [[109], 256], - 120055: [[110], 256], - 120056: [[111], 256], - 120057: [[112], 256], - 120058: [[113], 256], - 120059: [[114], 256], - 120060: [[115], 256], - 120061: [[116], 256], - 120062: [[117], 256], - 120063: [[118], 256] - }, - 54528: { - 120064: [[119], 256], - 120065: [[120], 256], - 120066: [[121], 256], - 120067: [[122], 256], - 120068: [[65], 256], - 120069: [[66], 256], - 120071: [[68], 256], - 120072: [[69], 256], - 120073: [[70], 256], - 120074: [[71], 256], - 120077: [[74], 256], - 120078: [[75], 256], - 120079: [[76], 256], - 120080: [[77], 256], - 120081: [[78], 256], - 120082: [[79], 256], - 120083: [[80], 256], - 120084: [[81], 256], - 120086: [[83], 256], - 120087: [[84], 256], - 120088: [[85], 256], - 120089: [[86], 256], - 120090: [[87], 256], - 120091: [[88], 256], - 120092: [[89], 256], - 120094: [[97], 256], - 120095: [[98], 256], - 120096: [[99], 256], - 120097: [[100], 256], - 120098: [[101], 256], - 120099: [[102], 256], - 120100: [[103], 256], - 120101: [[104], 256], - 120102: [[105], 256], - 120103: [[106], 256], - 120104: [[107], 256], - 120105: [[108], 256], - 120106: [[109], 256], - 120107: [[110], 256], - 120108: [[111], 256], - 120109: [[112], 256], - 120110: [[113], 256], - 120111: [[114], 256], - 120112: [[115], 256], - 120113: [[116], 256], - 120114: [[117], 256], - 120115: [[118], 256], - 120116: [[119], 256], - 120117: [[120], 256], - 120118: [[121], 256], - 120119: [[122], 256], - 120120: [[65], 256], - 120121: [[66], 256], - 120123: [[68], 256], - 120124: [[69], 256], - 120125: [[70], 256], - 120126: [[71], 256], - 120128: [[73], 256], - 120129: [[74], 256], - 120130: [[75], 256], - 120131: [[76], 256], - 120132: [[77], 256], - 120134: [[79], 256], - 120138: [[83], 256], - 120139: [[84], 256], - 120140: [[85], 256], - 120141: [[86], 256], - 120142: [[87], 256], - 120143: [[88], 256], - 120144: [[89], 256], - 120146: [[97], 256], - 120147: [[98], 256], - 120148: [[99], 256], - 120149: [[100], 256], - 120150: [[101], 256], - 120151: [[102], 256], - 120152: [[103], 256], - 120153: [[104], 256], - 120154: [[105], 256], - 120155: [[106], 256], - 120156: [[107], 256], - 120157: [[108], 256], - 120158: [[109], 256], - 120159: [[110], 256], - 120160: [[111], 256], - 120161: [[112], 256], - 120162: [[113], 256], - 120163: [[114], 256], - 120164: [[115], 256], - 120165: [[116], 256], - 120166: [[117], 256], - 120167: [[118], 256], - 120168: [[119], 256], - 120169: [[120], 256], - 120170: [[121], 256], - 120171: [[122], 256], - 120172: [[65], 256], - 120173: [[66], 256], - 120174: [[67], 256], - 120175: [[68], 256], - 120176: [[69], 256], - 120177: [[70], 256], - 120178: [[71], 256], - 120179: [[72], 256], - 120180: [[73], 256], - 120181: [[74], 256], - 120182: [[75], 256], - 120183: [[76], 256], - 120184: [[77], 256], - 120185: [[78], 256], - 120186: [[79], 256], - 120187: [[80], 256], - 120188: [[81], 256], - 120189: [[82], 256], - 120190: [[83], 256], - 120191: [[84], 256], - 120192: [[85], 256], - 120193: [[86], 256], - 120194: [[87], 256], - 120195: [[88], 256], - 120196: [[89], 256], - 120197: [[90], 256], - 120198: [[97], 256], - 120199: [[98], 256], - 120200: [[99], 256], - 120201: [[100], 256], - 120202: [[101], 256], - 120203: [[102], 256], - 120204: [[103], 256], - 120205: [[104], 256], - 120206: [[105], 256], - 120207: [[106], 256], - 120208: [[107], 256], - 120209: [[108], 256], - 120210: [[109], 256], - 120211: [[110], 256], - 120212: [[111], 256], - 120213: [[112], 256], - 120214: [[113], 256], - 120215: [[114], 256], - 120216: [[115], 256], - 120217: [[116], 256], - 120218: [[117], 256], - 120219: [[118], 256], - 120220: [[119], 256], - 120221: [[120], 256], - 120222: [[121], 256], - 120223: [[122], 256], - 120224: [[65], 256], - 120225: [[66], 256], - 120226: [[67], 256], - 120227: [[68], 256], - 120228: [[69], 256], - 120229: [[70], 256], - 120230: [[71], 256], - 120231: [[72], 256], - 120232: [[73], 256], - 120233: [[74], 256], - 120234: [[75], 256], - 120235: [[76], 256], - 120236: [[77], 256], - 120237: [[78], 256], - 120238: [[79], 256], - 120239: [[80], 256], - 120240: [[81], 256], - 120241: [[82], 256], - 120242: [[83], 256], - 120243: [[84], 256], - 120244: [[85], 256], - 120245: [[86], 256], - 120246: [[87], 256], - 120247: [[88], 256], - 120248: [[89], 256], - 120249: [[90], 256], - 120250: [[97], 256], - 120251: [[98], 256], - 120252: [[99], 256], - 120253: [[100], 256], - 120254: [[101], 256], - 120255: [[102], 256], - 120256: [[103], 256], - 120257: [[104], 256], - 120258: [[105], 256], - 120259: [[106], 256], - 120260: [[107], 256], - 120261: [[108], 256], - 120262: [[109], 256], - 120263: [[110], 256], - 120264: [[111], 256], - 120265: [[112], 256], - 120266: [[113], 256], - 120267: [[114], 256], - 120268: [[115], 256], - 120269: [[116], 256], - 120270: [[117], 256], - 120271: [[118], 256], - 120272: [[119], 256], - 120273: [[120], 256], - 120274: [[121], 256], - 120275: [[122], 256], - 120276: [[65], 256], - 120277: [[66], 256], - 120278: [[67], 256], - 120279: [[68], 256], - 120280: [[69], 256], - 120281: [[70], 256], - 120282: [[71], 256], - 120283: [[72], 256], - 120284: [[73], 256], - 120285: [[74], 256], - 120286: [[75], 256], - 120287: [[76], 256], - 120288: [[77], 256], - 120289: [[78], 256], - 120290: [[79], 256], - 120291: [[80], 256], - 120292: [[81], 256], - 120293: [[82], 256], - 120294: [[83], 256], - 120295: [[84], 256], - 120296: [[85], 256], - 120297: [[86], 256], - 120298: [[87], 256], - 120299: [[88], 256], - 120300: [[89], 256], - 120301: [[90], 256], - 120302: [[97], 256], - 120303: [[98], 256], - 120304: [[99], 256], - 120305: [[100], 256], - 120306: [[101], 256], - 120307: [[102], 256], - 120308: [[103], 256], - 120309: [[104], 256], - 120310: [[105], 256], - 120311: [[106], 256], - 120312: [[107], 256], - 120313: [[108], 256], - 120314: [[109], 256], - 120315: [[110], 256], - 120316: [[111], 256], - 120317: [[112], 256], - 120318: [[113], 256], - 120319: [[114], 256] - }, - 54784: { - 120320: [[115], 256], - 120321: [[116], 256], - 120322: [[117], 256], - 120323: [[118], 256], - 120324: [[119], 256], - 120325: [[120], 256], - 120326: [[121], 256], - 120327: [[122], 256], - 120328: [[65], 256], - 120329: [[66], 256], - 120330: [[67], 256], - 120331: [[68], 256], - 120332: [[69], 256], - 120333: [[70], 256], - 120334: [[71], 256], - 120335: [[72], 256], - 120336: [[73], 256], - 120337: [[74], 256], - 120338: [[75], 256], - 120339: [[76], 256], - 120340: [[77], 256], - 120341: [[78], 256], - 120342: [[79], 256], - 120343: [[80], 256], - 120344: [[81], 256], - 120345: [[82], 256], - 120346: [[83], 256], - 120347: [[84], 256], - 120348: [[85], 256], - 120349: [[86], 256], - 120350: [[87], 256], - 120351: [[88], 256], - 120352: [[89], 256], - 120353: [[90], 256], - 120354: [[97], 256], - 120355: [[98], 256], - 120356: [[99], 256], - 120357: [[100], 256], - 120358: [[101], 256], - 120359: [[102], 256], - 120360: [[103], 256], - 120361: [[104], 256], - 120362: [[105], 256], - 120363: [[106], 256], - 120364: [[107], 256], - 120365: [[108], 256], - 120366: [[109], 256], - 120367: [[110], 256], - 120368: [[111], 256], - 120369: [[112], 256], - 120370: [[113], 256], - 120371: [[114], 256], - 120372: [[115], 256], - 120373: [[116], 256], - 120374: [[117], 256], - 120375: [[118], 256], - 120376: [[119], 256], - 120377: [[120], 256], - 120378: [[121], 256], - 120379: [[122], 256], - 120380: [[65], 256], - 120381: [[66], 256], - 120382: [[67], 256], - 120383: [[68], 256], - 120384: [[69], 256], - 120385: [[70], 256], - 120386: [[71], 256], - 120387: [[72], 256], - 120388: [[73], 256], - 120389: [[74], 256], - 120390: [[75], 256], - 120391: [[76], 256], - 120392: [[77], 256], - 120393: [[78], 256], - 120394: [[79], 256], - 120395: [[80], 256], - 120396: [[81], 256], - 120397: [[82], 256], - 120398: [[83], 256], - 120399: [[84], 256], - 120400: [[85], 256], - 120401: [[86], 256], - 120402: [[87], 256], - 120403: [[88], 256], - 120404: [[89], 256], - 120405: [[90], 256], - 120406: [[97], 256], - 120407: [[98], 256], - 120408: [[99], 256], - 120409: [[100], 256], - 120410: [[101], 256], - 120411: [[102], 256], - 120412: [[103], 256], - 120413: [[104], 256], - 120414: [[105], 256], - 120415: [[106], 256], - 120416: [[107], 256], - 120417: [[108], 256], - 120418: [[109], 256], - 120419: [[110], 256], - 120420: [[111], 256], - 120421: [[112], 256], - 120422: [[113], 256], - 120423: [[114], 256], - 120424: [[115], 256], - 120425: [[116], 256], - 120426: [[117], 256], - 120427: [[118], 256], - 120428: [[119], 256], - 120429: [[120], 256], - 120430: [[121], 256], - 120431: [[122], 256], - 120432: [[65], 256], - 120433: [[66], 256], - 120434: [[67], 256], - 120435: [[68], 256], - 120436: [[69], 256], - 120437: [[70], 256], - 120438: [[71], 256], - 120439: [[72], 256], - 120440: [[73], 256], - 120441: [[74], 256], - 120442: [[75], 256], - 120443: [[76], 256], - 120444: [[77], 256], - 120445: [[78], 256], - 120446: [[79], 256], - 120447: [[80], 256], - 120448: [[81], 256], - 120449: [[82], 256], - 120450: [[83], 256], - 120451: [[84], 256], - 120452: [[85], 256], - 120453: [[86], 256], - 120454: [[87], 256], - 120455: [[88], 256], - 120456: [[89], 256], - 120457: [[90], 256], - 120458: [[97], 256], - 120459: [[98], 256], - 120460: [[99], 256], - 120461: [[100], 256], - 120462: [[101], 256], - 120463: [[102], 256], - 120464: [[103], 256], - 120465: [[104], 256], - 120466: [[105], 256], - 120467: [[106], 256], - 120468: [[107], 256], - 120469: [[108], 256], - 120470: [[109], 256], - 120471: [[110], 256], - 120472: [[111], 256], - 120473: [[112], 256], - 120474: [[113], 256], - 120475: [[114], 256], - 120476: [[115], 256], - 120477: [[116], 256], - 120478: [[117], 256], - 120479: [[118], 256], - 120480: [[119], 256], - 120481: [[120], 256], - 120482: [[121], 256], - 120483: [[122], 256], - 120484: [[305], 256], - 120485: [[567], 256], - 120488: [[913], 256], - 120489: [[914], 256], - 120490: [[915], 256], - 120491: [[916], 256], - 120492: [[917], 256], - 120493: [[918], 256], - 120494: [[919], 256], - 120495: [[920], 256], - 120496: [[921], 256], - 120497: [[922], 256], - 120498: [[923], 256], - 120499: [[924], 256], - 120500: [[925], 256], - 120501: [[926], 256], - 120502: [[927], 256], - 120503: [[928], 256], - 120504: [[929], 256], - 120505: [[1012], 256], - 120506: [[931], 256], - 120507: [[932], 256], - 120508: [[933], 256], - 120509: [[934], 256], - 120510: [[935], 256], - 120511: [[936], 256], - 120512: [[937], 256], - 120513: [[8711], 256], - 120514: [[945], 256], - 120515: [[946], 256], - 120516: [[947], 256], - 120517: [[948], 256], - 120518: [[949], 256], - 120519: [[950], 256], - 120520: [[951], 256], - 120521: [[952], 256], - 120522: [[953], 256], - 120523: [[954], 256], - 120524: [[955], 256], - 120525: [[956], 256], - 120526: [[957], 256], - 120527: [[958], 256], - 120528: [[959], 256], - 120529: [[960], 256], - 120530: [[961], 256], - 120531: [[962], 256], - 120532: [[963], 256], - 120533: [[964], 256], - 120534: [[965], 256], - 120535: [[966], 256], - 120536: [[967], 256], - 120537: [[968], 256], - 120538: [[969], 256], - 120539: [[8706], 256], - 120540: [[1013], 256], - 120541: [[977], 256], - 120542: [[1008], 256], - 120543: [[981], 256], - 120544: [[1009], 256], - 120545: [[982], 256], - 120546: [[913], 256], - 120547: [[914], 256], - 120548: [[915], 256], - 120549: [[916], 256], - 120550: [[917], 256], - 120551: [[918], 256], - 120552: [[919], 256], - 120553: [[920], 256], - 120554: [[921], 256], - 120555: [[922], 256], - 120556: [[923], 256], - 120557: [[924], 256], - 120558: [[925], 256], - 120559: [[926], 256], - 120560: [[927], 256], - 120561: [[928], 256], - 120562: [[929], 256], - 120563: [[1012], 256], - 120564: [[931], 256], - 120565: [[932], 256], - 120566: [[933], 256], - 120567: [[934], 256], - 120568: [[935], 256], - 120569: [[936], 256], - 120570: [[937], 256], - 120571: [[8711], 256], - 120572: [[945], 256], - 120573: [[946], 256], - 120574: [[947], 256], - 120575: [[948], 256] - }, - 55040: { - 120576: [[949], 256], - 120577: [[950], 256], - 120578: [[951], 256], - 120579: [[952], 256], - 120580: [[953], 256], - 120581: [[954], 256], - 120582: [[955], 256], - 120583: [[956], 256], - 120584: [[957], 256], - 120585: [[958], 256], - 120586: [[959], 256], - 120587: [[960], 256], - 120588: [[961], 256], - 120589: [[962], 256], - 120590: [[963], 256], - 120591: [[964], 256], - 120592: [[965], 256], - 120593: [[966], 256], - 120594: [[967], 256], - 120595: [[968], 256], - 120596: [[969], 256], - 120597: [[8706], 256], - 120598: [[1013], 256], - 120599: [[977], 256], - 120600: [[1008], 256], - 120601: [[981], 256], - 120602: [[1009], 256], - 120603: [[982], 256], - 120604: [[913], 256], - 120605: [[914], 256], - 120606: [[915], 256], - 120607: [[916], 256], - 120608: [[917], 256], - 120609: [[918], 256], - 120610: [[919], 256], - 120611: [[920], 256], - 120612: [[921], 256], - 120613: [[922], 256], - 120614: [[923], 256], - 120615: [[924], 256], - 120616: [[925], 256], - 120617: [[926], 256], - 120618: [[927], 256], - 120619: [[928], 256], - 120620: [[929], 256], - 120621: [[1012], 256], - 120622: [[931], 256], - 120623: [[932], 256], - 120624: [[933], 256], - 120625: [[934], 256], - 120626: [[935], 256], - 120627: [[936], 256], - 120628: [[937], 256], - 120629: [[8711], 256], - 120630: [[945], 256], - 120631: [[946], 256], - 120632: [[947], 256], - 120633: [[948], 256], - 120634: [[949], 256], - 120635: [[950], 256], - 120636: [[951], 256], - 120637: [[952], 256], - 120638: [[953], 256], - 120639: [[954], 256], - 120640: [[955], 256], - 120641: [[956], 256], - 120642: [[957], 256], - 120643: [[958], 256], - 120644: [[959], 256], - 120645: [[960], 256], - 120646: [[961], 256], - 120647: [[962], 256], - 120648: [[963], 256], - 120649: [[964], 256], - 120650: [[965], 256], - 120651: [[966], 256], - 120652: [[967], 256], - 120653: [[968], 256], - 120654: [[969], 256], - 120655: [[8706], 256], - 120656: [[1013], 256], - 120657: [[977], 256], - 120658: [[1008], 256], - 120659: [[981], 256], - 120660: [[1009], 256], - 120661: [[982], 256], - 120662: [[913], 256], - 120663: [[914], 256], - 120664: [[915], 256], - 120665: [[916], 256], - 120666: [[917], 256], - 120667: [[918], 256], - 120668: [[919], 256], - 120669: [[920], 256], - 120670: [[921], 256], - 120671: [[922], 256], - 120672: [[923], 256], - 120673: [[924], 256], - 120674: [[925], 256], - 120675: [[926], 256], - 120676: [[927], 256], - 120677: [[928], 256], - 120678: [[929], 256], - 120679: [[1012], 256], - 120680: [[931], 256], - 120681: [[932], 256], - 120682: [[933], 256], - 120683: [[934], 256], - 120684: [[935], 256], - 120685: [[936], 256], - 120686: [[937], 256], - 120687: [[8711], 256], - 120688: [[945], 256], - 120689: [[946], 256], - 120690: [[947], 256], - 120691: [[948], 256], - 120692: [[949], 256], - 120693: [[950], 256], - 120694: [[951], 256], - 120695: [[952], 256], - 120696: [[953], 256], - 120697: [[954], 256], - 120698: [[955], 256], - 120699: [[956], 256], - 120700: [[957], 256], - 120701: [[958], 256], - 120702: [[959], 256], - 120703: [[960], 256], - 120704: [[961], 256], - 120705: [[962], 256], - 120706: [[963], 256], - 120707: [[964], 256], - 120708: [[965], 256], - 120709: [[966], 256], - 120710: [[967], 256], - 120711: [[968], 256], - 120712: [[969], 256], - 120713: [[8706], 256], - 120714: [[1013], 256], - 120715: [[977], 256], - 120716: [[1008], 256], - 120717: [[981], 256], - 120718: [[1009], 256], - 120719: [[982], 256], - 120720: [[913], 256], - 120721: [[914], 256], - 120722: [[915], 256], - 120723: [[916], 256], - 120724: [[917], 256], - 120725: [[918], 256], - 120726: [[919], 256], - 120727: [[920], 256], - 120728: [[921], 256], - 120729: [[922], 256], - 120730: [[923], 256], - 120731: [[924], 256], - 120732: [[925], 256], - 120733: [[926], 256], - 120734: [[927], 256], - 120735: [[928], 256], - 120736: [[929], 256], - 120737: [[1012], 256], - 120738: [[931], 256], - 120739: [[932], 256], - 120740: [[933], 256], - 120741: [[934], 256], - 120742: [[935], 256], - 120743: [[936], 256], - 120744: [[937], 256], - 120745: [[8711], 256], - 120746: [[945], 256], - 120747: [[946], 256], - 120748: [[947], 256], - 120749: [[948], 256], - 120750: [[949], 256], - 120751: [[950], 256], - 120752: [[951], 256], - 120753: [[952], 256], - 120754: [[953], 256], - 120755: [[954], 256], - 120756: [[955], 256], - 120757: [[956], 256], - 120758: [[957], 256], - 120759: [[958], 256], - 120760: [[959], 256], - 120761: [[960], 256], - 120762: [[961], 256], - 120763: [[962], 256], - 120764: [[963], 256], - 120765: [[964], 256], - 120766: [[965], 256], - 120767: [[966], 256], - 120768: [[967], 256], - 120769: [[968], 256], - 120770: [[969], 256], - 120771: [[8706], 256], - 120772: [[1013], 256], - 120773: [[977], 256], - 120774: [[1008], 256], - 120775: [[981], 256], - 120776: [[1009], 256], - 120777: [[982], 256], - 120778: [[988], 256], - 120779: [[989], 256], - 120782: [[48], 256], - 120783: [[49], 256], - 120784: [[50], 256], - 120785: [[51], 256], - 120786: [[52], 256], - 120787: [[53], 256], - 120788: [[54], 256], - 120789: [[55], 256], - 120790: [[56], 256], - 120791: [[57], 256], - 120792: [[48], 256], - 120793: [[49], 256], - 120794: [[50], 256], - 120795: [[51], 256], - 120796: [[52], 256], - 120797: [[53], 256], - 120798: [[54], 256], - 120799: [[55], 256], - 120800: [[56], 256], - 120801: [[57], 256], - 120802: [[48], 256], - 120803: [[49], 256], - 120804: [[50], 256], - 120805: [[51], 256], - 120806: [[52], 256], - 120807: [[53], 256], - 120808: [[54], 256], - 120809: [[55], 256], - 120810: [[56], 256], - 120811: [[57], 256], - 120812: [[48], 256], - 120813: [[49], 256], - 120814: [[50], 256], - 120815: [[51], 256], - 120816: [[52], 256], - 120817: [[53], 256], - 120818: [[54], 256], - 120819: [[55], 256], - 120820: [[56], 256], - 120821: [[57], 256], - 120822: [[48], 256], - 120823: [[49], 256], - 120824: [[50], 256], - 120825: [[51], 256], - 120826: [[52], 256], - 120827: [[53], 256], - 120828: [[54], 256], - 120829: [[55], 256], - 120830: [[56], 256], - 120831: [[57], 256] - }, - 60928: { - 126464: [[1575], 256], - 126465: [[1576], 256], - 126466: [[1580], 256], - 126467: [[1583], 256], - 126469: [[1608], 256], - 126470: [[1586], 256], - 126471: [[1581], 256], - 126472: [[1591], 256], - 126473: [[1610], 256], - 126474: [[1603], 256], - 126475: [[1604], 256], - 126476: [[1605], 256], - 126477: [[1606], 256], - 126478: [[1587], 256], - 126479: [[1593], 256], - 126480: [[1601], 256], - 126481: [[1589], 256], - 126482: [[1602], 256], - 126483: [[1585], 256], - 126484: [[1588], 256], - 126485: [[1578], 256], - 126486: [[1579], 256], - 126487: [[1582], 256], - 126488: [[1584], 256], - 126489: [[1590], 256], - 126490: [[1592], 256], - 126491: [[1594], 256], - 126492: [[1646], 256], - 126493: [[1722], 256], - 126494: [[1697], 256], - 126495: [[1647], 256], - 126497: [[1576], 256], - 126498: [[1580], 256], - 126500: [[1607], 256], - 126503: [[1581], 256], - 126505: [[1610], 256], - 126506: [[1603], 256], - 126507: [[1604], 256], - 126508: [[1605], 256], - 126509: [[1606], 256], - 126510: [[1587], 256], - 126511: [[1593], 256], - 126512: [[1601], 256], - 126513: [[1589], 256], - 126514: [[1602], 256], - 126516: [[1588], 256], - 126517: [[1578], 256], - 126518: [[1579], 256], - 126519: [[1582], 256], - 126521: [[1590], 256], - 126523: [[1594], 256], - 126530: [[1580], 256], - 126535: [[1581], 256], - 126537: [[1610], 256], - 126539: [[1604], 256], - 126541: [[1606], 256], - 126542: [[1587], 256], - 126543: [[1593], 256], - 126545: [[1589], 256], - 126546: [[1602], 256], - 126548: [[1588], 256], - 126551: [[1582], 256], - 126553: [[1590], 256], - 126555: [[1594], 256], - 126557: [[1722], 256], - 126559: [[1647], 256], - 126561: [[1576], 256], - 126562: [[1580], 256], - 126564: [[1607], 256], - 126567: [[1581], 256], - 126568: [[1591], 256], - 126569: [[1610], 256], - 126570: [[1603], 256], - 126572: [[1605], 256], - 126573: [[1606], 256], - 126574: [[1587], 256], - 126575: [[1593], 256], - 126576: [[1601], 256], - 126577: [[1589], 256], - 126578: [[1602], 256], - 126580: [[1588], 256], - 126581: [[1578], 256], - 126582: [[1579], 256], - 126583: [[1582], 256], - 126585: [[1590], 256], - 126586: [[1592], 256], - 126587: [[1594], 256], - 126588: [[1646], 256], - 126590: [[1697], 256], - 126592: [[1575], 256], - 126593: [[1576], 256], - 126594: [[1580], 256], - 126595: [[1583], 256], - 126596: [[1607], 256], - 126597: [[1608], 256], - 126598: [[1586], 256], - 126599: [[1581], 256], - 126600: [[1591], 256], - 126601: [[1610], 256], - 126603: [[1604], 256], - 126604: [[1605], 256], - 126605: [[1606], 256], - 126606: [[1587], 256], - 126607: [[1593], 256], - 126608: [[1601], 256], - 126609: [[1589], 256], - 126610: [[1602], 256], - 126611: [[1585], 256], - 126612: [[1588], 256], - 126613: [[1578], 256], - 126614: [[1579], 256], - 126615: [[1582], 256], - 126616: [[1584], 256], - 126617: [[1590], 256], - 126618: [[1592], 256], - 126619: [[1594], 256], - 126625: [[1576], 256], - 126626: [[1580], 256], - 126627: [[1583], 256], - 126629: [[1608], 256], - 126630: [[1586], 256], - 126631: [[1581], 256], - 126632: [[1591], 256], - 126633: [[1610], 256], - 126635: [[1604], 256], - 126636: [[1605], 256], - 126637: [[1606], 256], - 126638: [[1587], 256], - 126639: [[1593], 256], - 126640: [[1601], 256], - 126641: [[1589], 256], - 126642: [[1602], 256], - 126643: [[1585], 256], - 126644: [[1588], 256], - 126645: [[1578], 256], - 126646: [[1579], 256], - 126647: [[1582], 256], - 126648: [[1584], 256], - 126649: [[1590], 256], - 126650: [[1592], 256], - 126651: [[1594], 256] - }, - 61696: { - 127232: [[48, 46], 256], - 127233: [[48, 44], 256], - 127234: [[49, 44], 256], - 127235: [[50, 44], 256], - 127236: [[51, 44], 256], - 127237: [[52, 44], 256], - 127238: [[53, 44], 256], - 127239: [[54, 44], 256], - 127240: [[55, 44], 256], - 127241: [[56, 44], 256], - 127242: [[57, 44], 256], - 127248: [[40, 65, 41], 256], - 127249: [[40, 66, 41], 256], - 127250: [[40, 67, 41], 256], - 127251: [[40, 68, 41], 256], - 127252: [[40, 69, 41], 256], - 127253: [[40, 70, 41], 256], - 127254: [[40, 71, 41], 256], - 127255: [[40, 72, 41], 256], - 127256: [[40, 73, 41], 256], - 127257: [[40, 74, 41], 256], - 127258: [[40, 75, 41], 256], - 127259: [[40, 76, 41], 256], - 127260: [[40, 77, 41], 256], - 127261: [[40, 78, 41], 256], - 127262: [[40, 79, 41], 256], - 127263: [[40, 80, 41], 256], - 127264: [[40, 81, 41], 256], - 127265: [[40, 82, 41], 256], - 127266: [[40, 83, 41], 256], - 127267: [[40, 84, 41], 256], - 127268: [[40, 85, 41], 256], - 127269: [[40, 86, 41], 256], - 127270: [[40, 87, 41], 256], - 127271: [[40, 88, 41], 256], - 127272: [[40, 89, 41], 256], - 127273: [[40, 90, 41], 256], - 127274: [[12308, 83, 12309], 256], - 127275: [[67], 256], - 127276: [[82], 256], - 127277: [[67, 68], 256], - 127278: [[87, 90], 256], - 127280: [[65], 256], - 127281: [[66], 256], - 127282: [[67], 256], - 127283: [[68], 256], - 127284: [[69], 256], - 127285: [[70], 256], - 127286: [[71], 256], - 127287: [[72], 256], - 127288: [[73], 256], - 127289: [[74], 256], - 127290: [[75], 256], - 127291: [[76], 256], - 127292: [[77], 256], - 127293: [[78], 256], - 127294: [[79], 256], - 127295: [[80], 256], - 127296: [[81], 256], - 127297: [[82], 256], - 127298: [[83], 256], - 127299: [[84], 256], - 127300: [[85], 256], - 127301: [[86], 256], - 127302: [[87], 256], - 127303: [[88], 256], - 127304: [[89], 256], - 127305: [[90], 256], - 127306: [[72, 86], 256], - 127307: [[77, 86], 256], - 127308: [[83, 68], 256], - 127309: [[83, 83], 256], - 127310: [[80, 80, 86], 256], - 127311: [[87, 67], 256], - 127338: [[77, 67], 256], - 127339: [[77, 68], 256], - 127376: [[68, 74], 256] - }, - 61952: { - 127488: [[12411, 12363], 256], - 127489: [[12467, 12467], 256], - 127490: [[12469], 256], - 127504: [[25163], 256], - 127505: [[23383], 256], - 127506: [[21452], 256], - 127507: [[12487], 256], - 127508: [[20108], 256], - 127509: [[22810], 256], - 127510: [[35299], 256], - 127511: [[22825], 256], - 127512: [[20132], 256], - 127513: [[26144], 256], - 127514: [[28961], 256], - 127515: [[26009], 256], - 127516: [[21069], 256], - 127517: [[24460], 256], - 127518: [[20877], 256], - 127519: [[26032], 256], - 127520: [[21021], 256], - 127521: [[32066], 256], - 127522: [[29983], 256], - 127523: [[36009], 256], - 127524: [[22768], 256], - 127525: [[21561], 256], - 127526: [[28436], 256], - 127527: [[25237], 256], - 127528: [[25429], 256], - 127529: [[19968], 256], - 127530: [[19977], 256], - 127531: [[36938], 256], - 127532: [[24038], 256], - 127533: [[20013], 256], - 127534: [[21491], 256], - 127535: [[25351], 256], - 127536: [[36208], 256], - 127537: [[25171], 256], - 127538: [[31105], 256], - 127539: [[31354], 256], - 127540: [[21512], 256], - 127541: [[28288], 256], - 127542: [[26377], 256], - 127543: [[26376], 256], - 127544: [[30003], 256], - 127545: [[21106], 256], - 127546: [[21942], 256], - 127552: [[12308, 26412, 12309], 256], - 127553: [[12308, 19977, 12309], 256], - 127554: [[12308, 20108, 12309], 256], - 127555: [[12308, 23433, 12309], 256], - 127556: [[12308, 28857, 12309], 256], - 127557: [[12308, 25171, 12309], 256], - 127558: [[12308, 30423, 12309], 256], - 127559: [[12308, 21213, 12309], 256], - 127560: [[12308, 25943, 12309], 256], - 127568: [[24471], 256], - 127569: [[21487], 256] - }, - 63488: { - 194560: [[20029]], - 194561: [[20024]], - 194562: [[20033]], - 194563: [[131362]], - 194564: [[20320]], - 194565: [[20398]], - 194566: [[20411]], - 194567: [[20482]], - 194568: [[20602]], - 194569: [[20633]], - 194570: [[20711]], - 194571: [[20687]], - 194572: [[13470]], - 194573: [[132666]], - 194574: [[20813]], - 194575: [[20820]], - 194576: [[20836]], - 194577: [[20855]], - 194578: [[132380]], - 194579: [[13497]], - 194580: [[20839]], - 194581: [[20877]], - 194582: [[132427]], - 194583: [[20887]], - 194584: [[20900]], - 194585: [[20172]], - 194586: [[20908]], - 194587: [[20917]], - 194588: [[168415]], - 194589: [[20981]], - 194590: [[20995]], - 194591: [[13535]], - 194592: [[21051]], - 194593: [[21062]], - 194594: [[21106]], - 194595: [[21111]], - 194596: [[13589]], - 194597: [[21191]], - 194598: [[21193]], - 194599: [[21220]], - 194600: [[21242]], - 194601: [[21253]], - 194602: [[21254]], - 194603: [[21271]], - 194604: [[21321]], - 194605: [[21329]], - 194606: [[21338]], - 194607: [[21363]], - 194608: [[21373]], - 194609: [[21375]], - 194610: [[21375]], - 194611: [[21375]], - 194612: [[133676]], - 194613: [[28784]], - 194614: [[21450]], - 194615: [[21471]], - 194616: [[133987]], - 194617: [[21483]], - 194618: [[21489]], - 194619: [[21510]], - 194620: [[21662]], - 194621: [[21560]], - 194622: [[21576]], - 194623: [[21608]], - 194624: [[21666]], - 194625: [[21750]], - 194626: [[21776]], - 194627: [[21843]], - 194628: [[21859]], - 194629: [[21892]], - 194630: [[21892]], - 194631: [[21913]], - 194632: [[21931]], - 194633: [[21939]], - 194634: [[21954]], - 194635: [[22294]], - 194636: [[22022]], - 194637: [[22295]], - 194638: [[22097]], - 194639: [[22132]], - 194640: [[20999]], - 194641: [[22766]], - 194642: [[22478]], - 194643: [[22516]], - 194644: [[22541]], - 194645: [[22411]], - 194646: [[22578]], - 194647: [[22577]], - 194648: [[22700]], - 194649: [[136420]], - 194650: [[22770]], - 194651: [[22775]], - 194652: [[22790]], - 194653: [[22810]], - 194654: [[22818]], - 194655: [[22882]], - 194656: [[136872]], - 194657: [[136938]], - 194658: [[23020]], - 194659: [[23067]], - 194660: [[23079]], - 194661: [[23000]], - 194662: [[23142]], - 194663: [[14062]], - 194664: [[14076]], - 194665: [[23304]], - 194666: [[23358]], - 194667: [[23358]], - 194668: [[137672]], - 194669: [[23491]], - 194670: [[23512]], - 194671: [[23527]], - 194672: [[23539]], - 194673: [[138008]], - 194674: [[23551]], - 194675: [[23558]], - 194676: [[24403]], - 194677: [[23586]], - 194678: [[14209]], - 194679: [[23648]], - 194680: [[23662]], - 194681: [[23744]], - 194682: [[23693]], - 194683: [[138724]], - 194684: [[23875]], - 194685: [[138726]], - 194686: [[23918]], - 194687: [[23915]], - 194688: [[23932]], - 194689: [[24033]], - 194690: [[24034]], - 194691: [[14383]], - 194692: [[24061]], - 194693: [[24104]], - 194694: [[24125]], - 194695: [[24169]], - 194696: [[14434]], - 194697: [[139651]], - 194698: [[14460]], - 194699: [[24240]], - 194700: [[24243]], - 194701: [[24246]], - 194702: [[24266]], - 194703: [[172946]], - 194704: [[24318]], - 194705: [[140081]], - 194706: [[140081]], - 194707: [[33281]], - 194708: [[24354]], - 194709: [[24354]], - 194710: [[14535]], - 194711: [[144056]], - 194712: [[156122]], - 194713: [[24418]], - 194714: [[24427]], - 194715: [[14563]], - 194716: [[24474]], - 194717: [[24525]], - 194718: [[24535]], - 194719: [[24569]], - 194720: [[24705]], - 194721: [[14650]], - 194722: [[14620]], - 194723: [[24724]], - 194724: [[141012]], - 194725: [[24775]], - 194726: [[24904]], - 194727: [[24908]], - 194728: [[24910]], - 194729: [[24908]], - 194730: [[24954]], - 194731: [[24974]], - 194732: [[25010]], - 194733: [[24996]], - 194734: [[25007]], - 194735: [[25054]], - 194736: [[25074]], - 194737: [[25078]], - 194738: [[25104]], - 194739: [[25115]], - 194740: [[25181]], - 194741: [[25265]], - 194742: [[25300]], - 194743: [[25424]], - 194744: [[142092]], - 194745: [[25405]], - 194746: [[25340]], - 194747: [[25448]], - 194748: [[25475]], - 194749: [[25572]], - 194750: [[142321]], - 194751: [[25634]], - 194752: [[25541]], - 194753: [[25513]], - 194754: [[14894]], - 194755: [[25705]], - 194756: [[25726]], - 194757: [[25757]], - 194758: [[25719]], - 194759: [[14956]], - 194760: [[25935]], - 194761: [[25964]], - 194762: [[143370]], - 194763: [[26083]], - 194764: [[26360]], - 194765: [[26185]], - 194766: [[15129]], - 194767: [[26257]], - 194768: [[15112]], - 194769: [[15076]], - 194770: [[20882]], - 194771: [[20885]], - 194772: [[26368]], - 194773: [[26268]], - 194774: [[32941]], - 194775: [[17369]], - 194776: [[26391]], - 194777: [[26395]], - 194778: [[26401]], - 194779: [[26462]], - 194780: [[26451]], - 194781: [[144323]], - 194782: [[15177]], - 194783: [[26618]], - 194784: [[26501]], - 194785: [[26706]], - 194786: [[26757]], - 194787: [[144493]], - 194788: [[26766]], - 194789: [[26655]], - 194790: [[26900]], - 194791: [[15261]], - 194792: [[26946]], - 194793: [[27043]], - 194794: [[27114]], - 194795: [[27304]], - 194796: [[145059]], - 194797: [[27355]], - 194798: [[15384]], - 194799: [[27425]], - 194800: [[145575]], - 194801: [[27476]], - 194802: [[15438]], - 194803: [[27506]], - 194804: [[27551]], - 194805: [[27578]], - 194806: [[27579]], - 194807: [[146061]], - 194808: [[138507]], - 194809: [[146170]], - 194810: [[27726]], - 194811: [[146620]], - 194812: [[27839]], - 194813: [[27853]], - 194814: [[27751]], - 194815: [[27926]] - }, - 63744: { - 63744: [[35912]], - 63745: [[26356]], - 63746: [[36554]], - 63747: [[36040]], - 63748: [[28369]], - 63749: [[20018]], - 63750: [[21477]], - 63751: [[40860]], - 63752: [[40860]], - 63753: [[22865]], - 63754: [[37329]], - 63755: [[21895]], - 63756: [[22856]], - 63757: [[25078]], - 63758: [[30313]], - 63759: [[32645]], - 63760: [[34367]], - 63761: [[34746]], - 63762: [[35064]], - 63763: [[37007]], - 63764: [[27138]], - 63765: [[27931]], - 63766: [[28889]], - 63767: [[29662]], - 63768: [[33853]], - 63769: [[37226]], - 63770: [[39409]], - 63771: [[20098]], - 63772: [[21365]], - 63773: [[27396]], - 63774: [[29211]], - 63775: [[34349]], - 63776: [[40478]], - 63777: [[23888]], - 63778: [[28651]], - 63779: [[34253]], - 63780: [[35172]], - 63781: [[25289]], - 63782: [[33240]], - 63783: [[34847]], - 63784: [[24266]], - 63785: [[26391]], - 63786: [[28010]], - 63787: [[29436]], - 63788: [[37070]], - 63789: [[20358]], - 63790: [[20919]], - 63791: [[21214]], - 63792: [[25796]], - 63793: [[27347]], - 63794: [[29200]], - 63795: [[30439]], - 63796: [[32769]], - 63797: [[34310]], - 63798: [[34396]], - 63799: [[36335]], - 63800: [[38706]], - 63801: [[39791]], - 63802: [[40442]], - 63803: [[30860]], - 63804: [[31103]], - 63805: [[32160]], - 63806: [[33737]], - 63807: [[37636]], - 63808: [[40575]], - 63809: [[35542]], - 63810: [[22751]], - 63811: [[24324]], - 63812: [[31840]], - 63813: [[32894]], - 63814: [[29282]], - 63815: [[30922]], - 63816: [[36034]], - 63817: [[38647]], - 63818: [[22744]], - 63819: [[23650]], - 63820: [[27155]], - 63821: [[28122]], - 63822: [[28431]], - 63823: [[32047]], - 63824: [[32311]], - 63825: [[38475]], - 63826: [[21202]], - 63827: [[32907]], - 63828: [[20956]], - 63829: [[20940]], - 63830: [[31260]], - 63831: [[32190]], - 63832: [[33777]], - 63833: [[38517]], - 63834: [[35712]], - 63835: [[25295]], - 63836: [[27138]], - 63837: [[35582]], - 63838: [[20025]], - 63839: [[23527]], - 63840: [[24594]], - 63841: [[29575]], - 63842: [[30064]], - 63843: [[21271]], - 63844: [[30971]], - 63845: [[20415]], - 63846: [[24489]], - 63847: [[19981]], - 63848: [[27852]], - 63849: [[25976]], - 63850: [[32034]], - 63851: [[21443]], - 63852: [[22622]], - 63853: [[30465]], - 63854: [[33865]], - 63855: [[35498]], - 63856: [[27578]], - 63857: [[36784]], - 63858: [[27784]], - 63859: [[25342]], - 63860: [[33509]], - 63861: [[25504]], - 63862: [[30053]], - 63863: [[20142]], - 63864: [[20841]], - 63865: [[20937]], - 63866: [[26753]], - 63867: [[31975]], - 63868: [[33391]], - 63869: [[35538]], - 63870: [[37327]], - 63871: [[21237]], - 63872: [[21570]], - 63873: [[22899]], - 63874: [[24300]], - 63875: [[26053]], - 63876: [[28670]], - 63877: [[31018]], - 63878: [[38317]], - 63879: [[39530]], - 63880: [[40599]], - 63881: [[40654]], - 63882: [[21147]], - 63883: [[26310]], - 63884: [[27511]], - 63885: [[36706]], - 63886: [[24180]], - 63887: [[24976]], - 63888: [[25088]], - 63889: [[25754]], - 63890: [[28451]], - 63891: [[29001]], - 63892: [[29833]], - 63893: [[31178]], - 63894: [[32244]], - 63895: [[32879]], - 63896: [[36646]], - 63897: [[34030]], - 63898: [[36899]], - 63899: [[37706]], - 63900: [[21015]], - 63901: [[21155]], - 63902: [[21693]], - 63903: [[28872]], - 63904: [[35010]], - 63905: [[35498]], - 63906: [[24265]], - 63907: [[24565]], - 63908: [[25467]], - 63909: [[27566]], - 63910: [[31806]], - 63911: [[29557]], - 63912: [[20196]], - 63913: [[22265]], - 63914: [[23527]], - 63915: [[23994]], - 63916: [[24604]], - 63917: [[29618]], - 63918: [[29801]], - 63919: [[32666]], - 63920: [[32838]], - 63921: [[37428]], - 63922: [[38646]], - 63923: [[38728]], - 63924: [[38936]], - 63925: [[20363]], - 63926: [[31150]], - 63927: [[37300]], - 63928: [[38584]], - 63929: [[24801]], - 63930: [[20102]], - 63931: [[20698]], - 63932: [[23534]], - 63933: [[23615]], - 63934: [[26009]], - 63935: [[27138]], - 63936: [[29134]], - 63937: [[30274]], - 63938: [[34044]], - 63939: [[36988]], - 63940: [[40845]], - 63941: [[26248]], - 63942: [[38446]], - 63943: [[21129]], - 63944: [[26491]], - 63945: [[26611]], - 63946: [[27969]], - 63947: [[28316]], - 63948: [[29705]], - 63949: [[30041]], - 63950: [[30827]], - 63951: [[32016]], - 63952: [[39006]], - 63953: [[20845]], - 63954: [[25134]], - 63955: [[38520]], - 63956: [[20523]], - 63957: [[23833]], - 63958: [[28138]], - 63959: [[36650]], - 63960: [[24459]], - 63961: [[24900]], - 63962: [[26647]], - 63963: [[29575]], - 63964: [[38534]], - 63965: [[21033]], - 63966: [[21519]], - 63967: [[23653]], - 63968: [[26131]], - 63969: [[26446]], - 63970: [[26792]], - 63971: [[27877]], - 63972: [[29702]], - 63973: [[30178]], - 63974: [[32633]], - 63975: [[35023]], - 63976: [[35041]], - 63977: [[37324]], - 63978: [[38626]], - 63979: [[21311]], - 63980: [[28346]], - 63981: [[21533]], - 63982: [[29136]], - 63983: [[29848]], - 63984: [[34298]], - 63985: [[38563]], - 63986: [[40023]], - 63987: [[40607]], - 63988: [[26519]], - 63989: [[28107]], - 63990: [[33256]], - 63991: [[31435]], - 63992: [[31520]], - 63993: [[31890]], - 63994: [[29376]], - 63995: [[28825]], - 63996: [[35672]], - 63997: [[20160]], - 63998: [[33590]], - 63999: [[21050]], - 194816: [[27966]], - 194817: [[28023]], - 194818: [[27969]], - 194819: [[28009]], - 194820: [[28024]], - 194821: [[28037]], - 194822: [[146718]], - 194823: [[27956]], - 194824: [[28207]], - 194825: [[28270]], - 194826: [[15667]], - 194827: [[28363]], - 194828: [[28359]], - 194829: [[147153]], - 194830: [[28153]], - 194831: [[28526]], - 194832: [[147294]], - 194833: [[147342]], - 194834: [[28614]], - 194835: [[28729]], - 194836: [[28702]], - 194837: [[28699]], - 194838: [[15766]], - 194839: [[28746]], - 194840: [[28797]], - 194841: [[28791]], - 194842: [[28845]], - 194843: [[132389]], - 194844: [[28997]], - 194845: [[148067]], - 194846: [[29084]], - 194847: [[148395]], - 194848: [[29224]], - 194849: [[29237]], - 194850: [[29264]], - 194851: [[149000]], - 194852: [[29312]], - 194853: [[29333]], - 194854: [[149301]], - 194855: [[149524]], - 194856: [[29562]], - 194857: [[29579]], - 194858: [[16044]], - 194859: [[29605]], - 194860: [[16056]], - 194861: [[16056]], - 194862: [[29767]], - 194863: [[29788]], - 194864: [[29809]], - 194865: [[29829]], - 194866: [[29898]], - 194867: [[16155]], - 194868: [[29988]], - 194869: [[150582]], - 194870: [[30014]], - 194871: [[150674]], - 194872: [[30064]], - 194873: [[139679]], - 194874: [[30224]], - 194875: [[151457]], - 194876: [[151480]], - 194877: [[151620]], - 194878: [[16380]], - 194879: [[16392]], - 194880: [[30452]], - 194881: [[151795]], - 194882: [[151794]], - 194883: [[151833]], - 194884: [[151859]], - 194885: [[30494]], - 194886: [[30495]], - 194887: [[30495]], - 194888: [[30538]], - 194889: [[16441]], - 194890: [[30603]], - 194891: [[16454]], - 194892: [[16534]], - 194893: [[152605]], - 194894: [[30798]], - 194895: [[30860]], - 194896: [[30924]], - 194897: [[16611]], - 194898: [[153126]], - 194899: [[31062]], - 194900: [[153242]], - 194901: [[153285]], - 194902: [[31119]], - 194903: [[31211]], - 194904: [[16687]], - 194905: [[31296]], - 194906: [[31306]], - 194907: [[31311]], - 194908: [[153980]], - 194909: [[154279]], - 194910: [[154279]], - 194911: [[31470]], - 194912: [[16898]], - 194913: [[154539]], - 194914: [[31686]], - 194915: [[31689]], - 194916: [[16935]], - 194917: [[154752]], - 194918: [[31954]], - 194919: [[17056]], - 194920: [[31976]], - 194921: [[31971]], - 194922: [[32000]], - 194923: [[155526]], - 194924: [[32099]], - 194925: [[17153]], - 194926: [[32199]], - 194927: [[32258]], - 194928: [[32325]], - 194929: [[17204]], - 194930: [[156200]], - 194931: [[156231]], - 194932: [[17241]], - 194933: [[156377]], - 194934: [[32634]], - 194935: [[156478]], - 194936: [[32661]], - 194937: [[32762]], - 194938: [[32773]], - 194939: [[156890]], - 194940: [[156963]], - 194941: [[32864]], - 194942: [[157096]], - 194943: [[32880]], - 194944: [[144223]], - 194945: [[17365]], - 194946: [[32946]], - 194947: [[33027]], - 194948: [[17419]], - 194949: [[33086]], - 194950: [[23221]], - 194951: [[157607]], - 194952: [[157621]], - 194953: [[144275]], - 194954: [[144284]], - 194955: [[33281]], - 194956: [[33284]], - 194957: [[36766]], - 194958: [[17515]], - 194959: [[33425]], - 194960: [[33419]], - 194961: [[33437]], - 194962: [[21171]], - 194963: [[33457]], - 194964: [[33459]], - 194965: [[33469]], - 194966: [[33510]], - 194967: [[158524]], - 194968: [[33509]], - 194969: [[33565]], - 194970: [[33635]], - 194971: [[33709]], - 194972: [[33571]], - 194973: [[33725]], - 194974: [[33767]], - 194975: [[33879]], - 194976: [[33619]], - 194977: [[33738]], - 194978: [[33740]], - 194979: [[33756]], - 194980: [[158774]], - 194981: [[159083]], - 194982: [[158933]], - 194983: [[17707]], - 194984: [[34033]], - 194985: [[34035]], - 194986: [[34070]], - 194987: [[160714]], - 194988: [[34148]], - 194989: [[159532]], - 194990: [[17757]], - 194991: [[17761]], - 194992: [[159665]], - 194993: [[159954]], - 194994: [[17771]], - 194995: [[34384]], - 194996: [[34396]], - 194997: [[34407]], - 194998: [[34409]], - 194999: [[34473]], - 195000: [[34440]], - 195001: [[34574]], - 195002: [[34530]], - 195003: [[34681]], - 195004: [[34600]], - 195005: [[34667]], - 195006: [[34694]], - 195007: [[17879]], - 195008: [[34785]], - 195009: [[34817]], - 195010: [[17913]], - 195011: [[34912]], - 195012: [[34915]], - 195013: [[161383]], - 195014: [[35031]], - 195015: [[35038]], - 195016: [[17973]], - 195017: [[35066]], - 195018: [[13499]], - 195019: [[161966]], - 195020: [[162150]], - 195021: [[18110]], - 195022: [[18119]], - 195023: [[35488]], - 195024: [[35565]], - 195025: [[35722]], - 195026: [[35925]], - 195027: [[162984]], - 195028: [[36011]], - 195029: [[36033]], - 195030: [[36123]], - 195031: [[36215]], - 195032: [[163631]], - 195033: [[133124]], - 195034: [[36299]], - 195035: [[36284]], - 195036: [[36336]], - 195037: [[133342]], - 195038: [[36564]], - 195039: [[36664]], - 195040: [[165330]], - 195041: [[165357]], - 195042: [[37012]], - 195043: [[37105]], - 195044: [[37137]], - 195045: [[165678]], - 195046: [[37147]], - 195047: [[37432]], - 195048: [[37591]], - 195049: [[37592]], - 195050: [[37500]], - 195051: [[37881]], - 195052: [[37909]], - 195053: [[166906]], - 195054: [[38283]], - 195055: [[18837]], - 195056: [[38327]], - 195057: [[167287]], - 195058: [[18918]], - 195059: [[38595]], - 195060: [[23986]], - 195061: [[38691]], - 195062: [[168261]], - 195063: [[168474]], - 195064: [[19054]], - 195065: [[19062]], - 195066: [[38880]], - 195067: [[168970]], - 195068: [[19122]], - 195069: [[169110]], - 195070: [[38923]], - 195071: [[38923]] - }, - 64000: { - 64000: [[20999]], - 64001: [[24230]], - 64002: [[25299]], - 64003: [[31958]], - 64004: [[23429]], - 64005: [[27934]], - 64006: [[26292]], - 64007: [[36667]], - 64008: [[34892]], - 64009: [[38477]], - 64010: [[35211]], - 64011: [[24275]], - 64012: [[20800]], - 64013: [[21952]], - 64016: [[22618]], - 64018: [[26228]], - 64021: [[20958]], - 64022: [[29482]], - 64023: [[30410]], - 64024: [[31036]], - 64025: [[31070]], - 64026: [[31077]], - 64027: [[31119]], - 64028: [[38742]], - 64029: [[31934]], - 64030: [[32701]], - 64032: [[34322]], - 64034: [[35576]], - 64037: [[36920]], - 64038: [[37117]], - 64042: [[39151]], - 64043: [[39164]], - 64044: [[39208]], - 64045: [[40372]], - 64046: [[37086]], - 64047: [[38583]], - 64048: [[20398]], - 64049: [[20711]], - 64050: [[20813]], - 64051: [[21193]], - 64052: [[21220]], - 64053: [[21329]], - 64054: [[21917]], - 64055: [[22022]], - 64056: [[22120]], - 64057: [[22592]], - 64058: [[22696]], - 64059: [[23652]], - 64060: [[23662]], - 64061: [[24724]], - 64062: [[24936]], - 64063: [[24974]], - 64064: [[25074]], - 64065: [[25935]], - 64066: [[26082]], - 64067: [[26257]], - 64068: [[26757]], - 64069: [[28023]], - 64070: [[28186]], - 64071: [[28450]], - 64072: [[29038]], - 64073: [[29227]], - 64074: [[29730]], - 64075: [[30865]], - 64076: [[31038]], - 64077: [[31049]], - 64078: [[31048]], - 64079: [[31056]], - 64080: [[31062]], - 64081: [[31069]], - 64082: [[31117]], - 64083: [[31118]], - 64084: [[31296]], - 64085: [[31361]], - 64086: [[31680]], - 64087: [[32244]], - 64088: [[32265]], - 64089: [[32321]], - 64090: [[32626]], - 64091: [[32773]], - 64092: [[33261]], - 64093: [[33401]], - 64094: [[33401]], - 64095: [[33879]], - 64096: [[35088]], - 64097: [[35222]], - 64098: [[35585]], - 64099: [[35641]], - 64100: [[36051]], - 64101: [[36104]], - 64102: [[36790]], - 64103: [[36920]], - 64104: [[38627]], - 64105: [[38911]], - 64106: [[38971]], - 64107: [[24693]], - 64108: [[148206]], - 64109: [[33304]], - 64112: [[20006]], - 64113: [[20917]], - 64114: [[20840]], - 64115: [[20352]], - 64116: [[20805]], - 64117: [[20864]], - 64118: [[21191]], - 64119: [[21242]], - 64120: [[21917]], - 64121: [[21845]], - 64122: [[21913]], - 64123: [[21986]], - 64124: [[22618]], - 64125: [[22707]], - 64126: [[22852]], - 64127: [[22868]], - 64128: [[23138]], - 64129: [[23336]], - 64130: [[24274]], - 64131: [[24281]], - 64132: [[24425]], - 64133: [[24493]], - 64134: [[24792]], - 64135: [[24910]], - 64136: [[24840]], - 64137: [[24974]], - 64138: [[24928]], - 64139: [[25074]], - 64140: [[25140]], - 64141: [[25540]], - 64142: [[25628]], - 64143: [[25682]], - 64144: [[25942]], - 64145: [[26228]], - 64146: [[26391]], - 64147: [[26395]], - 64148: [[26454]], - 64149: [[27513]], - 64150: [[27578]], - 64151: [[27969]], - 64152: [[28379]], - 64153: [[28363]], - 64154: [[28450]], - 64155: [[28702]], - 64156: [[29038]], - 64157: [[30631]], - 64158: [[29237]], - 64159: [[29359]], - 64160: [[29482]], - 64161: [[29809]], - 64162: [[29958]], - 64163: [[30011]], - 64164: [[30237]], - 64165: [[30239]], - 64166: [[30410]], - 64167: [[30427]], - 64168: [[30452]], - 64169: [[30538]], - 64170: [[30528]], - 64171: [[30924]], - 64172: [[31409]], - 64173: [[31680]], - 64174: [[31867]], - 64175: [[32091]], - 64176: [[32244]], - 64177: [[32574]], - 64178: [[32773]], - 64179: [[33618]], - 64180: [[33775]], - 64181: [[34681]], - 64182: [[35137]], - 64183: [[35206]], - 64184: [[35222]], - 64185: [[35519]], - 64186: [[35576]], - 64187: [[35531]], - 64188: [[35585]], - 64189: [[35582]], - 64190: [[35565]], - 64191: [[35641]], - 64192: [[35722]], - 64193: [[36104]], - 64194: [[36664]], - 64195: [[36978]], - 64196: [[37273]], - 64197: [[37494]], - 64198: [[38524]], - 64199: [[38627]], - 64200: [[38742]], - 64201: [[38875]], - 64202: [[38911]], - 64203: [[38923]], - 64204: [[38971]], - 64205: [[39698]], - 64206: [[40860]], - 64207: [[141386]], - 64208: [[141380]], - 64209: [[144341]], - 64210: [[15261]], - 64211: [[16408]], - 64212: [[16441]], - 64213: [[152137]], - 64214: [[154832]], - 64215: [[163539]], - 64216: [[40771]], - 64217: [[40846]], - 195072: [[38953]], - 195073: [[169398]], - 195074: [[39138]], - 195075: [[19251]], - 195076: [[39209]], - 195077: [[39335]], - 195078: [[39362]], - 195079: [[39422]], - 195080: [[19406]], - 195081: [[170800]], - 195082: [[39698]], - 195083: [[40000]], - 195084: [[40189]], - 195085: [[19662]], - 195086: [[19693]], - 195087: [[40295]], - 195088: [[172238]], - 195089: [[19704]], - 195090: [[172293]], - 195091: [[172558]], - 195092: [[172689]], - 195093: [[40635]], - 195094: [[19798]], - 195095: [[40697]], - 195096: [[40702]], - 195097: [[40709]], - 195098: [[40719]], - 195099: [[40726]], - 195100: [[40763]], - 195101: [[173568]] - }, - 64256: { - 64256: [[102, 102], 256], - 64257: [[102, 105], 256], - 64258: [[102, 108], 256], - 64259: [[102, 102, 105], 256], - 64260: [[102, 102, 108], 256], - 64261: [[383, 116], 256], - 64262: [[115, 116], 256], - 64275: [[1396, 1398], 256], - 64276: [[1396, 1381], 256], - 64277: [[1396, 1387], 256], - 64278: [[1406, 1398], 256], - 64279: [[1396, 1389], 256], - 64285: [[1497, 1460], 512], - 64286: [, 26], - 64287: [[1522, 1463], 512], - 64288: [[1506], 256], - 64289: [[1488], 256], - 64290: [[1491], 256], - 64291: [[1492], 256], - 64292: [[1499], 256], - 64293: [[1500], 256], - 64294: [[1501], 256], - 64295: [[1512], 256], - 64296: [[1514], 256], - 64297: [[43], 256], - 64298: [[1513, 1473], 512], - 64299: [[1513, 1474], 512], - 64300: [[64329, 1473], 512], - 64301: [[64329, 1474], 512], - 64302: [[1488, 1463], 512], - 64303: [[1488, 1464], 512], - 64304: [[1488, 1468], 512], - 64305: [[1489, 1468], 512], - 64306: [[1490, 1468], 512], - 64307: [[1491, 1468], 512], - 64308: [[1492, 1468], 512], - 64309: [[1493, 1468], 512], - 64310: [[1494, 1468], 512], - 64312: [[1496, 1468], 512], - 64313: [[1497, 1468], 512], - 64314: [[1498, 1468], 512], - 64315: [[1499, 1468], 512], - 64316: [[1500, 1468], 512], - 64318: [[1502, 1468], 512], - 64320: [[1504, 1468], 512], - 64321: [[1505, 1468], 512], - 64323: [[1507, 1468], 512], - 64324: [[1508, 1468], 512], - 64326: [[1510, 1468], 512], - 64327: [[1511, 1468], 512], - 64328: [[1512, 1468], 512], - 64329: [[1513, 1468], 512], - 64330: [[1514, 1468], 512], - 64331: [[1493, 1465], 512], - 64332: [[1489, 1471], 512], - 64333: [[1499, 1471], 512], - 64334: [[1508, 1471], 512], - 64335: [[1488, 1500], 256], - 64336: [[1649], 256], - 64337: [[1649], 256], - 64338: [[1659], 256], - 64339: [[1659], 256], - 64340: [[1659], 256], - 64341: [[1659], 256], - 64342: [[1662], 256], - 64343: [[1662], 256], - 64344: [[1662], 256], - 64345: [[1662], 256], - 64346: [[1664], 256], - 64347: [[1664], 256], - 64348: [[1664], 256], - 64349: [[1664], 256], - 64350: [[1658], 256], - 64351: [[1658], 256], - 64352: [[1658], 256], - 64353: [[1658], 256], - 64354: [[1663], 256], - 64355: [[1663], 256], - 64356: [[1663], 256], - 64357: [[1663], 256], - 64358: [[1657], 256], - 64359: [[1657], 256], - 64360: [[1657], 256], - 64361: [[1657], 256], - 64362: [[1700], 256], - 64363: [[1700], 256], - 64364: [[1700], 256], - 64365: [[1700], 256], - 64366: [[1702], 256], - 64367: [[1702], 256], - 64368: [[1702], 256], - 64369: [[1702], 256], - 64370: [[1668], 256], - 64371: [[1668], 256], - 64372: [[1668], 256], - 64373: [[1668], 256], - 64374: [[1667], 256], - 64375: [[1667], 256], - 64376: [[1667], 256], - 64377: [[1667], 256], - 64378: [[1670], 256], - 64379: [[1670], 256], - 64380: [[1670], 256], - 64381: [[1670], 256], - 64382: [[1671], 256], - 64383: [[1671], 256], - 64384: [[1671], 256], - 64385: [[1671], 256], - 64386: [[1677], 256], - 64387: [[1677], 256], - 64388: [[1676], 256], - 64389: [[1676], 256], - 64390: [[1678], 256], - 64391: [[1678], 256], - 64392: [[1672], 256], - 64393: [[1672], 256], - 64394: [[1688], 256], - 64395: [[1688], 256], - 64396: [[1681], 256], - 64397: [[1681], 256], - 64398: [[1705], 256], - 64399: [[1705], 256], - 64400: [[1705], 256], - 64401: [[1705], 256], - 64402: [[1711], 256], - 64403: [[1711], 256], - 64404: [[1711], 256], - 64405: [[1711], 256], - 64406: [[1715], 256], - 64407: [[1715], 256], - 64408: [[1715], 256], - 64409: [[1715], 256], - 64410: [[1713], 256], - 64411: [[1713], 256], - 64412: [[1713], 256], - 64413: [[1713], 256], - 64414: [[1722], 256], - 64415: [[1722], 256], - 64416: [[1723], 256], - 64417: [[1723], 256], - 64418: [[1723], 256], - 64419: [[1723], 256], - 64420: [[1728], 256], - 64421: [[1728], 256], - 64422: [[1729], 256], - 64423: [[1729], 256], - 64424: [[1729], 256], - 64425: [[1729], 256], - 64426: [[1726], 256], - 64427: [[1726], 256], - 64428: [[1726], 256], - 64429: [[1726], 256], - 64430: [[1746], 256], - 64431: [[1746], 256], - 64432: [[1747], 256], - 64433: [[1747], 256], - 64467: [[1709], 256], - 64468: [[1709], 256], - 64469: [[1709], 256], - 64470: [[1709], 256], - 64471: [[1735], 256], - 64472: [[1735], 256], - 64473: [[1734], 256], - 64474: [[1734], 256], - 64475: [[1736], 256], - 64476: [[1736], 256], - 64477: [[1655], 256], - 64478: [[1739], 256], - 64479: [[1739], 256], - 64480: [[1733], 256], - 64481: [[1733], 256], - 64482: [[1737], 256], - 64483: [[1737], 256], - 64484: [[1744], 256], - 64485: [[1744], 256], - 64486: [[1744], 256], - 64487: [[1744], 256], - 64488: [[1609], 256], - 64489: [[1609], 256], - 64490: [[1574, 1575], 256], - 64491: [[1574, 1575], 256], - 64492: [[1574, 1749], 256], - 64493: [[1574, 1749], 256], - 64494: [[1574, 1608], 256], - 64495: [[1574, 1608], 256], - 64496: [[1574, 1735], 256], - 64497: [[1574, 1735], 256], - 64498: [[1574, 1734], 256], - 64499: [[1574, 1734], 256], - 64500: [[1574, 1736], 256], - 64501: [[1574, 1736], 256], - 64502: [[1574, 1744], 256], - 64503: [[1574, 1744], 256], - 64504: [[1574, 1744], 256], - 64505: [[1574, 1609], 256], - 64506: [[1574, 1609], 256], - 64507: [[1574, 1609], 256], - 64508: [[1740], 256], - 64509: [[1740], 256], - 64510: [[1740], 256], - 64511: [[1740], 256] - }, - 64512: { - 64512: [[1574, 1580], 256], - 64513: [[1574, 1581], 256], - 64514: [[1574, 1605], 256], - 64515: [[1574, 1609], 256], - 64516: [[1574, 1610], 256], - 64517: [[1576, 1580], 256], - 64518: [[1576, 1581], 256], - 64519: [[1576, 1582], 256], - 64520: [[1576, 1605], 256], - 64521: [[1576, 1609], 256], - 64522: [[1576, 1610], 256], - 64523: [[1578, 1580], 256], - 64524: [[1578, 1581], 256], - 64525: [[1578, 1582], 256], - 64526: [[1578, 1605], 256], - 64527: [[1578, 1609], 256], - 64528: [[1578, 1610], 256], - 64529: [[1579, 1580], 256], - 64530: [[1579, 1605], 256], - 64531: [[1579, 1609], 256], - 64532: [[1579, 1610], 256], - 64533: [[1580, 1581], 256], - 64534: [[1580, 1605], 256], - 64535: [[1581, 1580], 256], - 64536: [[1581, 1605], 256], - 64537: [[1582, 1580], 256], - 64538: [[1582, 1581], 256], - 64539: [[1582, 1605], 256], - 64540: [[1587, 1580], 256], - 64541: [[1587, 1581], 256], - 64542: [[1587, 1582], 256], - 64543: [[1587, 1605], 256], - 64544: [[1589, 1581], 256], - 64545: [[1589, 1605], 256], - 64546: [[1590, 1580], 256], - 64547: [[1590, 1581], 256], - 64548: [[1590, 1582], 256], - 64549: [[1590, 1605], 256], - 64550: [[1591, 1581], 256], - 64551: [[1591, 1605], 256], - 64552: [[1592, 1605], 256], - 64553: [[1593, 1580], 256], - 64554: [[1593, 1605], 256], - 64555: [[1594, 1580], 256], - 64556: [[1594, 1605], 256], - 64557: [[1601, 1580], 256], - 64558: [[1601, 1581], 256], - 64559: [[1601, 1582], 256], - 64560: [[1601, 1605], 256], - 64561: [[1601, 1609], 256], - 64562: [[1601, 1610], 256], - 64563: [[1602, 1581], 256], - 64564: [[1602, 1605], 256], - 64565: [[1602, 1609], 256], - 64566: [[1602, 1610], 256], - 64567: [[1603, 1575], 256], - 64568: [[1603, 1580], 256], - 64569: [[1603, 1581], 256], - 64570: [[1603, 1582], 256], - 64571: [[1603, 1604], 256], - 64572: [[1603, 1605], 256], - 64573: [[1603, 1609], 256], - 64574: [[1603, 1610], 256], - 64575: [[1604, 1580], 256], - 64576: [[1604, 1581], 256], - 64577: [[1604, 1582], 256], - 64578: [[1604, 1605], 256], - 64579: [[1604, 1609], 256], - 64580: [[1604, 1610], 256], - 64581: [[1605, 1580], 256], - 64582: [[1605, 1581], 256], - 64583: [[1605, 1582], 256], - 64584: [[1605, 1605], 256], - 64585: [[1605, 1609], 256], - 64586: [[1605, 1610], 256], - 64587: [[1606, 1580], 256], - 64588: [[1606, 1581], 256], - 64589: [[1606, 1582], 256], - 64590: [[1606, 1605], 256], - 64591: [[1606, 1609], 256], - 64592: [[1606, 1610], 256], - 64593: [[1607, 1580], 256], - 64594: [[1607, 1605], 256], - 64595: [[1607, 1609], 256], - 64596: [[1607, 1610], 256], - 64597: [[1610, 1580], 256], - 64598: [[1610, 1581], 256], - 64599: [[1610, 1582], 256], - 64600: [[1610, 1605], 256], - 64601: [[1610, 1609], 256], - 64602: [[1610, 1610], 256], - 64603: [[1584, 1648], 256], - 64604: [[1585, 1648], 256], - 64605: [[1609, 1648], 256], - 64606: [[32, 1612, 1617], 256], - 64607: [[32, 1613, 1617], 256], - 64608: [[32, 1614, 1617], 256], - 64609: [[32, 1615, 1617], 256], - 64610: [[32, 1616, 1617], 256], - 64611: [[32, 1617, 1648], 256], - 64612: [[1574, 1585], 256], - 64613: [[1574, 1586], 256], - 64614: [[1574, 1605], 256], - 64615: [[1574, 1606], 256], - 64616: [[1574, 1609], 256], - 64617: [[1574, 1610], 256], - 64618: [[1576, 1585], 256], - 64619: [[1576, 1586], 256], - 64620: [[1576, 1605], 256], - 64621: [[1576, 1606], 256], - 64622: [[1576, 1609], 256], - 64623: [[1576, 1610], 256], - 64624: [[1578, 1585], 256], - 64625: [[1578, 1586], 256], - 64626: [[1578, 1605], 256], - 64627: [[1578, 1606], 256], - 64628: [[1578, 1609], 256], - 64629: [[1578, 1610], 256], - 64630: [[1579, 1585], 256], - 64631: [[1579, 1586], 256], - 64632: [[1579, 1605], 256], - 64633: [[1579, 1606], 256], - 64634: [[1579, 1609], 256], - 64635: [[1579, 1610], 256], - 64636: [[1601, 1609], 256], - 64637: [[1601, 1610], 256], - 64638: [[1602, 1609], 256], - 64639: [[1602, 1610], 256], - 64640: [[1603, 1575], 256], - 64641: [[1603, 1604], 256], - 64642: [[1603, 1605], 256], - 64643: [[1603, 1609], 256], - 64644: [[1603, 1610], 256], - 64645: [[1604, 1605], 256], - 64646: [[1604, 1609], 256], - 64647: [[1604, 1610], 256], - 64648: [[1605, 1575], 256], - 64649: [[1605, 1605], 256], - 64650: [[1606, 1585], 256], - 64651: [[1606, 1586], 256], - 64652: [[1606, 1605], 256], - 64653: [[1606, 1606], 256], - 64654: [[1606, 1609], 256], - 64655: [[1606, 1610], 256], - 64656: [[1609, 1648], 256], - 64657: [[1610, 1585], 256], - 64658: [[1610, 1586], 256], - 64659: [[1610, 1605], 256], - 64660: [[1610, 1606], 256], - 64661: [[1610, 1609], 256], - 64662: [[1610, 1610], 256], - 64663: [[1574, 1580], 256], - 64664: [[1574, 1581], 256], - 64665: [[1574, 1582], 256], - 64666: [[1574, 1605], 256], - 64667: [[1574, 1607], 256], - 64668: [[1576, 1580], 256], - 64669: [[1576, 1581], 256], - 64670: [[1576, 1582], 256], - 64671: [[1576, 1605], 256], - 64672: [[1576, 1607], 256], - 64673: [[1578, 1580], 256], - 64674: [[1578, 1581], 256], - 64675: [[1578, 1582], 256], - 64676: [[1578, 1605], 256], - 64677: [[1578, 1607], 256], - 64678: [[1579, 1605], 256], - 64679: [[1580, 1581], 256], - 64680: [[1580, 1605], 256], - 64681: [[1581, 1580], 256], - 64682: [[1581, 1605], 256], - 64683: [[1582, 1580], 256], - 64684: [[1582, 1605], 256], - 64685: [[1587, 1580], 256], - 64686: [[1587, 1581], 256], - 64687: [[1587, 1582], 256], - 64688: [[1587, 1605], 256], - 64689: [[1589, 1581], 256], - 64690: [[1589, 1582], 256], - 64691: [[1589, 1605], 256], - 64692: [[1590, 1580], 256], - 64693: [[1590, 1581], 256], - 64694: [[1590, 1582], 256], - 64695: [[1590, 1605], 256], - 64696: [[1591, 1581], 256], - 64697: [[1592, 1605], 256], - 64698: [[1593, 1580], 256], - 64699: [[1593, 1605], 256], - 64700: [[1594, 1580], 256], - 64701: [[1594, 1605], 256], - 64702: [[1601, 1580], 256], - 64703: [[1601, 1581], 256], - 64704: [[1601, 1582], 256], - 64705: [[1601, 1605], 256], - 64706: [[1602, 1581], 256], - 64707: [[1602, 1605], 256], - 64708: [[1603, 1580], 256], - 64709: [[1603, 1581], 256], - 64710: [[1603, 1582], 256], - 64711: [[1603, 1604], 256], - 64712: [[1603, 1605], 256], - 64713: [[1604, 1580], 256], - 64714: [[1604, 1581], 256], - 64715: [[1604, 1582], 256], - 64716: [[1604, 1605], 256], - 64717: [[1604, 1607], 256], - 64718: [[1605, 1580], 256], - 64719: [[1605, 1581], 256], - 64720: [[1605, 1582], 256], - 64721: [[1605, 1605], 256], - 64722: [[1606, 1580], 256], - 64723: [[1606, 1581], 256], - 64724: [[1606, 1582], 256], - 64725: [[1606, 1605], 256], - 64726: [[1606, 1607], 256], - 64727: [[1607, 1580], 256], - 64728: [[1607, 1605], 256], - 64729: [[1607, 1648], 256], - 64730: [[1610, 1580], 256], - 64731: [[1610, 1581], 256], - 64732: [[1610, 1582], 256], - 64733: [[1610, 1605], 256], - 64734: [[1610, 1607], 256], - 64735: [[1574, 1605], 256], - 64736: [[1574, 1607], 256], - 64737: [[1576, 1605], 256], - 64738: [[1576, 1607], 256], - 64739: [[1578, 1605], 256], - 64740: [[1578, 1607], 256], - 64741: [[1579, 1605], 256], - 64742: [[1579, 1607], 256], - 64743: [[1587, 1605], 256], - 64744: [[1587, 1607], 256], - 64745: [[1588, 1605], 256], - 64746: [[1588, 1607], 256], - 64747: [[1603, 1604], 256], - 64748: [[1603, 1605], 256], - 64749: [[1604, 1605], 256], - 64750: [[1606, 1605], 256], - 64751: [[1606, 1607], 256], - 64752: [[1610, 1605], 256], - 64753: [[1610, 1607], 256], - 64754: [[1600, 1614, 1617], 256], - 64755: [[1600, 1615, 1617], 256], - 64756: [[1600, 1616, 1617], 256], - 64757: [[1591, 1609], 256], - 64758: [[1591, 1610], 256], - 64759: [[1593, 1609], 256], - 64760: [[1593, 1610], 256], - 64761: [[1594, 1609], 256], - 64762: [[1594, 1610], 256], - 64763: [[1587, 1609], 256], - 64764: [[1587, 1610], 256], - 64765: [[1588, 1609], 256], - 64766: [[1588, 1610], 256], - 64767: [[1581, 1609], 256] - }, - 64768: { - 64768: [[1581, 1610], 256], - 64769: [[1580, 1609], 256], - 64770: [[1580, 1610], 256], - 64771: [[1582, 1609], 256], - 64772: [[1582, 1610], 256], - 64773: [[1589, 1609], 256], - 64774: [[1589, 1610], 256], - 64775: [[1590, 1609], 256], - 64776: [[1590, 1610], 256], - 64777: [[1588, 1580], 256], - 64778: [[1588, 1581], 256], - 64779: [[1588, 1582], 256], - 64780: [[1588, 1605], 256], - 64781: [[1588, 1585], 256], - 64782: [[1587, 1585], 256], - 64783: [[1589, 1585], 256], - 64784: [[1590, 1585], 256], - 64785: [[1591, 1609], 256], - 64786: [[1591, 1610], 256], - 64787: [[1593, 1609], 256], - 64788: [[1593, 1610], 256], - 64789: [[1594, 1609], 256], - 64790: [[1594, 1610], 256], - 64791: [[1587, 1609], 256], - 64792: [[1587, 1610], 256], - 64793: [[1588, 1609], 256], - 64794: [[1588, 1610], 256], - 64795: [[1581, 1609], 256], - 64796: [[1581, 1610], 256], - 64797: [[1580, 1609], 256], - 64798: [[1580, 1610], 256], - 64799: [[1582, 1609], 256], - 64800: [[1582, 1610], 256], - 64801: [[1589, 1609], 256], - 64802: [[1589, 1610], 256], - 64803: [[1590, 1609], 256], - 64804: [[1590, 1610], 256], - 64805: [[1588, 1580], 256], - 64806: [[1588, 1581], 256], - 64807: [[1588, 1582], 256], - 64808: [[1588, 1605], 256], - 64809: [[1588, 1585], 256], - 64810: [[1587, 1585], 256], - 64811: [[1589, 1585], 256], - 64812: [[1590, 1585], 256], - 64813: [[1588, 1580], 256], - 64814: [[1588, 1581], 256], - 64815: [[1588, 1582], 256], - 64816: [[1588, 1605], 256], - 64817: [[1587, 1607], 256], - 64818: [[1588, 1607], 256], - 64819: [[1591, 1605], 256], - 64820: [[1587, 1580], 256], - 64821: [[1587, 1581], 256], - 64822: [[1587, 1582], 256], - 64823: [[1588, 1580], 256], - 64824: [[1588, 1581], 256], - 64825: [[1588, 1582], 256], - 64826: [[1591, 1605], 256], - 64827: [[1592, 1605], 256], - 64828: [[1575, 1611], 256], - 64829: [[1575, 1611], 256], - 64848: [[1578, 1580, 1605], 256], - 64849: [[1578, 1581, 1580], 256], - 64850: [[1578, 1581, 1580], 256], - 64851: [[1578, 1581, 1605], 256], - 64852: [[1578, 1582, 1605], 256], - 64853: [[1578, 1605, 1580], 256], - 64854: [[1578, 1605, 1581], 256], - 64855: [[1578, 1605, 1582], 256], - 64856: [[1580, 1605, 1581], 256], - 64857: [[1580, 1605, 1581], 256], - 64858: [[1581, 1605, 1610], 256], - 64859: [[1581, 1605, 1609], 256], - 64860: [[1587, 1581, 1580], 256], - 64861: [[1587, 1580, 1581], 256], - 64862: [[1587, 1580, 1609], 256], - 64863: [[1587, 1605, 1581], 256], - 64864: [[1587, 1605, 1581], 256], - 64865: [[1587, 1605, 1580], 256], - 64866: [[1587, 1605, 1605], 256], - 64867: [[1587, 1605, 1605], 256], - 64868: [[1589, 1581, 1581], 256], - 64869: [[1589, 1581, 1581], 256], - 64870: [[1589, 1605, 1605], 256], - 64871: [[1588, 1581, 1605], 256], - 64872: [[1588, 1581, 1605], 256], - 64873: [[1588, 1580, 1610], 256], - 64874: [[1588, 1605, 1582], 256], - 64875: [[1588, 1605, 1582], 256], - 64876: [[1588, 1605, 1605], 256], - 64877: [[1588, 1605, 1605], 256], - 64878: [[1590, 1581, 1609], 256], - 64879: [[1590, 1582, 1605], 256], - 64880: [[1590, 1582, 1605], 256], - 64881: [[1591, 1605, 1581], 256], - 64882: [[1591, 1605, 1581], 256], - 64883: [[1591, 1605, 1605], 256], - 64884: [[1591, 1605, 1610], 256], - 64885: [[1593, 1580, 1605], 256], - 64886: [[1593, 1605, 1605], 256], - 64887: [[1593, 1605, 1605], 256], - 64888: [[1593, 1605, 1609], 256], - 64889: [[1594, 1605, 1605], 256], - 64890: [[1594, 1605, 1610], 256], - 64891: [[1594, 1605, 1609], 256], - 64892: [[1601, 1582, 1605], 256], - 64893: [[1601, 1582, 1605], 256], - 64894: [[1602, 1605, 1581], 256], - 64895: [[1602, 1605, 1605], 256], - 64896: [[1604, 1581, 1605], 256], - 64897: [[1604, 1581, 1610], 256], - 64898: [[1604, 1581, 1609], 256], - 64899: [[1604, 1580, 1580], 256], - 64900: [[1604, 1580, 1580], 256], - 64901: [[1604, 1582, 1605], 256], - 64902: [[1604, 1582, 1605], 256], - 64903: [[1604, 1605, 1581], 256], - 64904: [[1604, 1605, 1581], 256], - 64905: [[1605, 1581, 1580], 256], - 64906: [[1605, 1581, 1605], 256], - 64907: [[1605, 1581, 1610], 256], - 64908: [[1605, 1580, 1581], 256], - 64909: [[1605, 1580, 1605], 256], - 64910: [[1605, 1582, 1580], 256], - 64911: [[1605, 1582, 1605], 256], - 64914: [[1605, 1580, 1582], 256], - 64915: [[1607, 1605, 1580], 256], - 64916: [[1607, 1605, 1605], 256], - 64917: [[1606, 1581, 1605], 256], - 64918: [[1606, 1581, 1609], 256], - 64919: [[1606, 1580, 1605], 256], - 64920: [[1606, 1580, 1605], 256], - 64921: [[1606, 1580, 1609], 256], - 64922: [[1606, 1605, 1610], 256], - 64923: [[1606, 1605, 1609], 256], - 64924: [[1610, 1605, 1605], 256], - 64925: [[1610, 1605, 1605], 256], - 64926: [[1576, 1582, 1610], 256], - 64927: [[1578, 1580, 1610], 256], - 64928: [[1578, 1580, 1609], 256], - 64929: [[1578, 1582, 1610], 256], - 64930: [[1578, 1582, 1609], 256], - 64931: [[1578, 1605, 1610], 256], - 64932: [[1578, 1605, 1609], 256], - 64933: [[1580, 1605, 1610], 256], - 64934: [[1580, 1581, 1609], 256], - 64935: [[1580, 1605, 1609], 256], - 64936: [[1587, 1582, 1609], 256], - 64937: [[1589, 1581, 1610], 256], - 64938: [[1588, 1581, 1610], 256], - 64939: [[1590, 1581, 1610], 256], - 64940: [[1604, 1580, 1610], 256], - 64941: [[1604, 1605, 1610], 256], - 64942: [[1610, 1581, 1610], 256], - 64943: [[1610, 1580, 1610], 256], - 64944: [[1610, 1605, 1610], 256], - 64945: [[1605, 1605, 1610], 256], - 64946: [[1602, 1605, 1610], 256], - 64947: [[1606, 1581, 1610], 256], - 64948: [[1602, 1605, 1581], 256], - 64949: [[1604, 1581, 1605], 256], - 64950: [[1593, 1605, 1610], 256], - 64951: [[1603, 1605, 1610], 256], - 64952: [[1606, 1580, 1581], 256], - 64953: [[1605, 1582, 1610], 256], - 64954: [[1604, 1580, 1605], 256], - 64955: [[1603, 1605, 1605], 256], - 64956: [[1604, 1580, 1605], 256], - 64957: [[1606, 1580, 1581], 256], - 64958: [[1580, 1581, 1610], 256], - 64959: [[1581, 1580, 1610], 256], - 64960: [[1605, 1580, 1610], 256], - 64961: [[1601, 1605, 1610], 256], - 64962: [[1576, 1581, 1610], 256], - 64963: [[1603, 1605, 1605], 256], - 64964: [[1593, 1580, 1605], 256], - 64965: [[1589, 1605, 1605], 256], - 64966: [[1587, 1582, 1610], 256], - 64967: [[1606, 1580, 1610], 256], - 65008: [[1589, 1604, 1746], 256], - 65009: [[1602, 1604, 1746], 256], - 65010: [[1575, 1604, 1604, 1607], 256], - 65011: [[1575, 1603, 1576, 1585], 256], - 65012: [[1605, 1581, 1605, 1583], 256], - 65013: [[1589, 1604, 1593, 1605], 256], - 65014: [[1585, 1587, 1608, 1604], 256], - 65015: [[1593, 1604, 1610, 1607], 256], - 65016: [[1608, 1587, 1604, 1605], 256], - 65017: [[1589, 1604, 1609], 256], - 65018: [ - [ - 1589, 1604, 1609, 32, 1575, 1604, 1604, 1607, 32, 1593, 1604, 1610, 1607, 32, 1608, - 1587, 1604, 1605 - ], - 256 - ], - 65019: [[1580, 1604, 32, 1580, 1604, 1575, 1604, 1607], 256], - 65020: [[1585, 1740, 1575, 1604], 256] - }, - 65024: { - 65040: [[44], 256], - 65041: [[12289], 256], - 65042: [[12290], 256], - 65043: [[58], 256], - 65044: [[59], 256], - 65045: [[33], 256], - 65046: [[63], 256], - 65047: [[12310], 256], - 65048: [[12311], 256], - 65049: [[8230], 256], - 65056: [, 230], - 65057: [, 230], - 65058: [, 230], - 65059: [, 230], - 65060: [, 230], - 65061: [, 230], - 65062: [, 230], - 65072: [[8229], 256], - 65073: [[8212], 256], - 65074: [[8211], 256], - 65075: [[95], 256], - 65076: [[95], 256], - 65077: [[40], 256], - 65078: [[41], 256], - 65079: [[123], 256], - 65080: [[125], 256], - 65081: [[12308], 256], - 65082: [[12309], 256], - 65083: [[12304], 256], - 65084: [[12305], 256], - 65085: [[12298], 256], - 65086: [[12299], 256], - 65087: [[12296], 256], - 65088: [[12297], 256], - 65089: [[12300], 256], - 65090: [[12301], 256], - 65091: [[12302], 256], - 65092: [[12303], 256], - 65095: [[91], 256], - 65096: [[93], 256], - 65097: [[8254], 256], - 65098: [[8254], 256], - 65099: [[8254], 256], - 65100: [[8254], 256], - 65101: [[95], 256], - 65102: [[95], 256], - 65103: [[95], 256], - 65104: [[44], 256], - 65105: [[12289], 256], - 65106: [[46], 256], - 65108: [[59], 256], - 65109: [[58], 256], - 65110: [[63], 256], - 65111: [[33], 256], - 65112: [[8212], 256], - 65113: [[40], 256], - 65114: [[41], 256], - 65115: [[123], 256], - 65116: [[125], 256], - 65117: [[12308], 256], - 65118: [[12309], 256], - 65119: [[35], 256], - 65120: [[38], 256], - 65121: [[42], 256], - 65122: [[43], 256], - 65123: [[45], 256], - 65124: [[60], 256], - 65125: [[62], 256], - 65126: [[61], 256], - 65128: [[92], 256], - 65129: [[36], 256], - 65130: [[37], 256], - 65131: [[64], 256], - 65136: [[32, 1611], 256], - 65137: [[1600, 1611], 256], - 65138: [[32, 1612], 256], - 65140: [[32, 1613], 256], - 65142: [[32, 1614], 256], - 65143: [[1600, 1614], 256], - 65144: [[32, 1615], 256], - 65145: [[1600, 1615], 256], - 65146: [[32, 1616], 256], - 65147: [[1600, 1616], 256], - 65148: [[32, 1617], 256], - 65149: [[1600, 1617], 256], - 65150: [[32, 1618], 256], - 65151: [[1600, 1618], 256], - 65152: [[1569], 256], - 65153: [[1570], 256], - 65154: [[1570], 256], - 65155: [[1571], 256], - 65156: [[1571], 256], - 65157: [[1572], 256], - 65158: [[1572], 256], - 65159: [[1573], 256], - 65160: [[1573], 256], - 65161: [[1574], 256], - 65162: [[1574], 256], - 65163: [[1574], 256], - 65164: [[1574], 256], - 65165: [[1575], 256], - 65166: [[1575], 256], - 65167: [[1576], 256], - 65168: [[1576], 256], - 65169: [[1576], 256], - 65170: [[1576], 256], - 65171: [[1577], 256], - 65172: [[1577], 256], - 65173: [[1578], 256], - 65174: [[1578], 256], - 65175: [[1578], 256], - 65176: [[1578], 256], - 65177: [[1579], 256], - 65178: [[1579], 256], - 65179: [[1579], 256], - 65180: [[1579], 256], - 65181: [[1580], 256], - 65182: [[1580], 256], - 65183: [[1580], 256], - 65184: [[1580], 256], - 65185: [[1581], 256], - 65186: [[1581], 256], - 65187: [[1581], 256], - 65188: [[1581], 256], - 65189: [[1582], 256], - 65190: [[1582], 256], - 65191: [[1582], 256], - 65192: [[1582], 256], - 65193: [[1583], 256], - 65194: [[1583], 256], - 65195: [[1584], 256], - 65196: [[1584], 256], - 65197: [[1585], 256], - 65198: [[1585], 256], - 65199: [[1586], 256], - 65200: [[1586], 256], - 65201: [[1587], 256], - 65202: [[1587], 256], - 65203: [[1587], 256], - 65204: [[1587], 256], - 65205: [[1588], 256], - 65206: [[1588], 256], - 65207: [[1588], 256], - 65208: [[1588], 256], - 65209: [[1589], 256], - 65210: [[1589], 256], - 65211: [[1589], 256], - 65212: [[1589], 256], - 65213: [[1590], 256], - 65214: [[1590], 256], - 65215: [[1590], 256], - 65216: [[1590], 256], - 65217: [[1591], 256], - 65218: [[1591], 256], - 65219: [[1591], 256], - 65220: [[1591], 256], - 65221: [[1592], 256], - 65222: [[1592], 256], - 65223: [[1592], 256], - 65224: [[1592], 256], - 65225: [[1593], 256], - 65226: [[1593], 256], - 65227: [[1593], 256], - 65228: [[1593], 256], - 65229: [[1594], 256], - 65230: [[1594], 256], - 65231: [[1594], 256], - 65232: [[1594], 256], - 65233: [[1601], 256], - 65234: [[1601], 256], - 65235: [[1601], 256], - 65236: [[1601], 256], - 65237: [[1602], 256], - 65238: [[1602], 256], - 65239: [[1602], 256], - 65240: [[1602], 256], - 65241: [[1603], 256], - 65242: [[1603], 256], - 65243: [[1603], 256], - 65244: [[1603], 256], - 65245: [[1604], 256], - 65246: [[1604], 256], - 65247: [[1604], 256], - 65248: [[1604], 256], - 65249: [[1605], 256], - 65250: [[1605], 256], - 65251: [[1605], 256], - 65252: [[1605], 256], - 65253: [[1606], 256], - 65254: [[1606], 256], - 65255: [[1606], 256], - 65256: [[1606], 256], - 65257: [[1607], 256], - 65258: [[1607], 256], - 65259: [[1607], 256], - 65260: [[1607], 256], - 65261: [[1608], 256], - 65262: [[1608], 256], - 65263: [[1609], 256], - 65264: [[1609], 256], - 65265: [[1610], 256], - 65266: [[1610], 256], - 65267: [[1610], 256], - 65268: [[1610], 256], - 65269: [[1604, 1570], 256], - 65270: [[1604, 1570], 256], - 65271: [[1604, 1571], 256], - 65272: [[1604, 1571], 256], - 65273: [[1604, 1573], 256], - 65274: [[1604, 1573], 256], - 65275: [[1604, 1575], 256], - 65276: [[1604, 1575], 256] - }, - 65280: { - 65281: [[33], 256], - 65282: [[34], 256], - 65283: [[35], 256], - 65284: [[36], 256], - 65285: [[37], 256], - 65286: [[38], 256], - 65287: [[39], 256], - 65288: [[40], 256], - 65289: [[41], 256], - 65290: [[42], 256], - 65291: [[43], 256], - 65292: [[44], 256], - 65293: [[45], 256], - 65294: [[46], 256], - 65295: [[47], 256], - 65296: [[48], 256], - 65297: [[49], 256], - 65298: [[50], 256], - 65299: [[51], 256], - 65300: [[52], 256], - 65301: [[53], 256], - 65302: [[54], 256], - 65303: [[55], 256], - 65304: [[56], 256], - 65305: [[57], 256], - 65306: [[58], 256], - 65307: [[59], 256], - 65308: [[60], 256], - 65309: [[61], 256], - 65310: [[62], 256], - 65311: [[63], 256], - 65312: [[64], 256], - 65313: [[65], 256], - 65314: [[66], 256], - 65315: [[67], 256], - 65316: [[68], 256], - 65317: [[69], 256], - 65318: [[70], 256], - 65319: [[71], 256], - 65320: [[72], 256], - 65321: [[73], 256], - 65322: [[74], 256], - 65323: [[75], 256], - 65324: [[76], 256], - 65325: [[77], 256], - 65326: [[78], 256], - 65327: [[79], 256], - 65328: [[80], 256], - 65329: [[81], 256], - 65330: [[82], 256], - 65331: [[83], 256], - 65332: [[84], 256], - 65333: [[85], 256], - 65334: [[86], 256], - 65335: [[87], 256], - 65336: [[88], 256], - 65337: [[89], 256], - 65338: [[90], 256], - 65339: [[91], 256], - 65340: [[92], 256], - 65341: [[93], 256], - 65342: [[94], 256], - 65343: [[95], 256], - 65344: [[96], 256], - 65345: [[97], 256], - 65346: [[98], 256], - 65347: [[99], 256], - 65348: [[100], 256], - 65349: [[101], 256], - 65350: [[102], 256], - 65351: [[103], 256], - 65352: [[104], 256], - 65353: [[105], 256], - 65354: [[106], 256], - 65355: [[107], 256], - 65356: [[108], 256], - 65357: [[109], 256], - 65358: [[110], 256], - 65359: [[111], 256], - 65360: [[112], 256], - 65361: [[113], 256], - 65362: [[114], 256], - 65363: [[115], 256], - 65364: [[116], 256], - 65365: [[117], 256], - 65366: [[118], 256], - 65367: [[119], 256], - 65368: [[120], 256], - 65369: [[121], 256], - 65370: [[122], 256], - 65371: [[123], 256], - 65372: [[124], 256], - 65373: [[125], 256], - 65374: [[126], 256], - 65375: [[10629], 256], - 65376: [[10630], 256], - 65377: [[12290], 256], - 65378: [[12300], 256], - 65379: [[12301], 256], - 65380: [[12289], 256], - 65381: [[12539], 256], - 65382: [[12530], 256], - 65383: [[12449], 256], - 65384: [[12451], 256], - 65385: [[12453], 256], - 65386: [[12455], 256], - 65387: [[12457], 256], - 65388: [[12515], 256], - 65389: [[12517], 256], - 65390: [[12519], 256], - 65391: [[12483], 256], - 65392: [[12540], 256], - 65393: [[12450], 256], - 65394: [[12452], 256], - 65395: [[12454], 256], - 65396: [[12456], 256], - 65397: [[12458], 256], - 65398: [[12459], 256], - 65399: [[12461], 256], - 65400: [[12463], 256], - 65401: [[12465], 256], - 65402: [[12467], 256], - 65403: [[12469], 256], - 65404: [[12471], 256], - 65405: [[12473], 256], - 65406: [[12475], 256], - 65407: [[12477], 256], - 65408: [[12479], 256], - 65409: [[12481], 256], - 65410: [[12484], 256], - 65411: [[12486], 256], - 65412: [[12488], 256], - 65413: [[12490], 256], - 65414: [[12491], 256], - 65415: [[12492], 256], - 65416: [[12493], 256], - 65417: [[12494], 256], - 65418: [[12495], 256], - 65419: [[12498], 256], - 65420: [[12501], 256], - 65421: [[12504], 256], - 65422: [[12507], 256], - 65423: [[12510], 256], - 65424: [[12511], 256], - 65425: [[12512], 256], - 65426: [[12513], 256], - 65427: [[12514], 256], - 65428: [[12516], 256], - 65429: [[12518], 256], - 65430: [[12520], 256], - 65431: [[12521], 256], - 65432: [[12522], 256], - 65433: [[12523], 256], - 65434: [[12524], 256], - 65435: [[12525], 256], - 65436: [[12527], 256], - 65437: [[12531], 256], - 65438: [[12441], 256], - 65439: [[12442], 256], - 65440: [[12644], 256], - 65441: [[12593], 256], - 65442: [[12594], 256], - 65443: [[12595], 256], - 65444: [[12596], 256], - 65445: [[12597], 256], - 65446: [[12598], 256], - 65447: [[12599], 256], - 65448: [[12600], 256], - 65449: [[12601], 256], - 65450: [[12602], 256], - 65451: [[12603], 256], - 65452: [[12604], 256], - 65453: [[12605], 256], - 65454: [[12606], 256], - 65455: [[12607], 256], - 65456: [[12608], 256], - 65457: [[12609], 256], - 65458: [[12610], 256], - 65459: [[12611], 256], - 65460: [[12612], 256], - 65461: [[12613], 256], - 65462: [[12614], 256], - 65463: [[12615], 256], - 65464: [[12616], 256], - 65465: [[12617], 256], - 65466: [[12618], 256], - 65467: [[12619], 256], - 65468: [[12620], 256], - 65469: [[12621], 256], - 65470: [[12622], 256], - 65474: [[12623], 256], - 65475: [[12624], 256], - 65476: [[12625], 256], - 65477: [[12626], 256], - 65478: [[12627], 256], - 65479: [[12628], 256], - 65482: [[12629], 256], - 65483: [[12630], 256], - 65484: [[12631], 256], - 65485: [[12632], 256], - 65486: [[12633], 256], - 65487: [[12634], 256], - 65490: [[12635], 256], - 65491: [[12636], 256], - 65492: [[12637], 256], - 65493: [[12638], 256], - 65494: [[12639], 256], - 65495: [[12640], 256], - 65498: [[12641], 256], - 65499: [[12642], 256], - 65500: [[12643], 256], - 65504: [[162], 256], - 65505: [[163], 256], - 65506: [[172], 256], - 65507: [[175], 256], - 65508: [[166], 256], - 65509: [[165], 256], - 65510: [[8361], 256], - 65512: [[9474], 256], - 65513: [[8592], 256], - 65514: [[8593], 256], - 65515: [[8594], 256], - 65516: [[8595], 256], - 65517: [[9632], 256], - 65518: [[9675], 256] - } -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/normalize/implement.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/normalize/implement.js" deleted file mode 100644 index deb6089..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/normalize/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(String.prototype, "normalize", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/normalize/index.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/normalize/index.js" deleted file mode 100644 index a8c04db..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/normalize/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? String.prototype.normalize : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/normalize/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/normalize/is-implemented.js" deleted file mode 100644 index 01b48a9..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/normalize/is-implemented.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var str = "æøåäüö"; - -module.exports = function () { - if (typeof str.normalize !== "function") return false; - return str.normalize("NFKD") === "æøåäüö"; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/normalize/shim.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/normalize/shim.js" deleted file mode 100644 index 95bae26..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/normalize/shim.js" +++ /dev/null @@ -1,309 +0,0 @@ -/* eslint no-bitwise: "off", max-statements: "off", max-lines: "off" */ - -// Taken from: https://github.com/walling/unorm/blob/master/lib/unorm.js - -/* - * UnicodeNormalizer 1.0.0 - * Copyright (c) 2008 Matsuza - * Dual licensed under the MIT (MIT-LICENSE.txt) and - * GPL (GPL-LICENSE.txt) licenses. - * $Date: 2008-06-05 16:44:17 +0200 (Thu, 05 Jun 2008) $ - * $Rev: 13309 $ - */ - -"use strict"; - -var primitiveSet = require("../../../object/primitive-set") - , validValue = require("../../../object/valid-value") - , data = require("./_data"); - -var floor = Math.floor - , forms = primitiveSet("NFC", "NFD", "NFKC", "NFKD") - , DEFAULT_FEATURE = [null, 0, {}] - , CACHE_THRESHOLD = 10 - , SBase = 0xac00 - , LBase = 0x1100 - , VBase = 0x1161 - , TBase = 0x11a7 - , LCount = 19 - , VCount = 21 - , TCount = 28 - , NCount = VCount * TCount - , SCount = LCount * NCount - , UChar - , cache = {} - , cacheCounter = [] - , fromCache - , fromData - , fromCpOnly - , fromRuleBasedJamo - , fromCpFilter - , strategies - , UCharIterator - , RecursDecompIterator - , DecompIterator - , CompIterator - , createIterator - , normalize; - -UChar = function (cp, feature) { - this.codepoint = cp; - this.feature = feature; -}; - -// Strategies -(function () { for (var i = 0; i <= 0xff; ++i) cacheCounter[i] = 0; })(); - -fromCache = function (nextStep, cp, needFeature) { - var ret = cache[cp]; - if (!ret) { - ret = nextStep(cp, needFeature); - if (Boolean(ret.feature) && ++cacheCounter[(cp >> 8) & 0xff] > CACHE_THRESHOLD) { - cache[cp] = ret; - } - } - return ret; -}; - -fromData = function (next, cp) { - var hash = cp & 0xff00, dunit = UChar.udata[hash] || {}, feature = dunit[cp]; - return feature ? new UChar(cp, feature) : new UChar(cp, DEFAULT_FEATURE); -}; -fromCpOnly = function (next, cp, needFeature) { - return needFeature ? next(cp, needFeature) : new UChar(cp, null); -}; - -fromRuleBasedJamo = function (next, cp, needFeature) { - var char, base, i, arr, SIndex, TIndex, feature, j; - if (cp < LBase || (LBase + LCount <= cp && cp < SBase) || SBase + SCount < cp) { - return next(cp, needFeature); - } - if (LBase <= cp && cp < LBase + LCount) { - char = {}; - base = (cp - LBase) * VCount; - for (i = 0; i < VCount; ++i) { - char[VBase + i] = SBase + TCount * (i + base); - } - arr = new Array(3); - arr[2] = char; - return new UChar(cp, arr); - } - - SIndex = cp - SBase; - TIndex = SIndex % TCount; - feature = []; - if (TIndex === 0) { - feature[0] = [LBase + floor(SIndex / NCount), VBase + floor((SIndex % NCount) / TCount)]; - feature[2] = {}; - for (j = 1; j < TCount; ++j) { - feature[2][TBase + j] = cp + j; - } - } else { - feature[0] = [SBase + SIndex - TIndex, TBase + TIndex]; - } - return new UChar(cp, feature); -}; - -fromCpFilter = function (next, cp, needFeature) { - return cp < 60 || (cp > 13311 && cp < 42607) - ? new UChar(cp, DEFAULT_FEATURE) - : next(cp, needFeature); -}; - -strategies = [fromCpFilter, fromCache, fromCpOnly, fromRuleBasedJamo, fromData]; - -UChar.fromCharCode = strategies.reduceRight(function (next, strategy) { - return function (cp, needFeature) { return strategy(next, cp, needFeature); }; -}, null); - -UChar.isHighSurrogate = function (cp) { return cp >= 0xd800 && cp <= 0xdbff; }; -UChar.isLowSurrogate = function (cp) { return cp >= 0xdc00 && cp <= 0xdfff; }; - -UChar.prototype.prepFeature = function () { - if (!this.feature) { - this.feature = UChar.fromCharCode(this.codepoint, true).feature; - } -}; - -UChar.prototype.toString = function () { - var num; - if (this.codepoint < 0x10000) return String.fromCharCode(this.codepoint); - num = this.codepoint - 0x10000; - return String.fromCharCode(floor(num / 0x400) + 0xd800, (num % 0x400) + 0xdc00); -}; - -UChar.prototype.getDecomp = function () { - this.prepFeature(); - return this.feature[0] || null; -}; - -UChar.prototype.isCompatibility = function () { - this.prepFeature(); - return Boolean(this.feature[1]) && this.feature[1] & (1 << 8); -}; -UChar.prototype.isExclude = function () { - this.prepFeature(); - return Boolean(this.feature[1]) && this.feature[1] & (1 << 9); -}; -UChar.prototype.getCanonicalClass = function () { - this.prepFeature(); - return this.feature[1] ? this.feature[1] & 0xff : 0; -}; -UChar.prototype.getComposite = function (following) { - var cp; - this.prepFeature(); - if (!this.feature[2]) return null; - cp = this.feature[2][following.codepoint]; - return cp ? UChar.fromCharCode(cp) : null; -}; - -UCharIterator = function (str) { - this.str = str; - this.cursor = 0; -}; -UCharIterator.prototype.next = function () { - if (Boolean(this.str) && this.cursor < this.str.length) { - var cp = this.str.charCodeAt(this.cursor++), d; - if ( - UChar.isHighSurrogate(cp) && - this.cursor < this.str.length && - UChar.isLowSurrogate((d = this.str.charCodeAt(this.cursor))) - ) { - cp = (cp - 0xd800) * 0x400 + (d - 0xdc00) + 0x10000; - ++this.cursor; - } - return UChar.fromCharCode(cp); - } - this.str = null; - return null; -}; - -RecursDecompIterator = function (it, cano) { - this.it = it; - this.canonical = cano; - this.resBuf = []; -}; - -RecursDecompIterator.prototype.next = function () { - var recursiveDecomp, uchar; - recursiveDecomp = function (cano, ucharLoc) { - var decomp = ucharLoc.getDecomp(), ret, i, a, j; - if (Boolean(decomp) && !(cano && ucharLoc.isCompatibility())) { - ret = []; - for (i = 0; i < decomp.length; ++i) { - a = recursiveDecomp(cano, UChar.fromCharCode(decomp[i])); - // Ret.concat(a); //<-why does not this work? - // following block is a workaround. - for (j = 0; j < a.length; ++j) ret.push(a[j]); - } - return ret; - } - return [ucharLoc]; - }; - if (this.resBuf.length === 0) { - uchar = this.it.next(); - if (!uchar) return null; - this.resBuf = recursiveDecomp(this.canonical, uchar); - } - return this.resBuf.shift(); -}; - -DecompIterator = function (it) { - this.it = it; - this.resBuf = []; -}; - -DecompIterator.prototype.next = function () { - var cc, uchar, inspt, uchar2, cc2; - if (this.resBuf.length === 0) { - do { - uchar = this.it.next(); - if (!uchar) break; - cc = uchar.getCanonicalClass(); - inspt = this.resBuf.length; - if (cc !== 0) { - for (inspt; inspt > 0; --inspt) { - uchar2 = this.resBuf[inspt - 1]; - cc2 = uchar2.getCanonicalClass(); - // eslint-disable-next-line max-depth - if (cc2 <= cc) break; - } - } - this.resBuf.splice(inspt, 0, uchar); - } while (cc !== 0); - } - return this.resBuf.shift(); -}; - -CompIterator = function (it) { - this.it = it; - this.procBuf = []; - this.resBuf = []; - this.lastClass = null; -}; - -CompIterator.prototype.next = function () { - var uchar, starter, composite, cc; - while (this.resBuf.length === 0) { - uchar = this.it.next(); - if (!uchar) { - this.resBuf = this.procBuf; - this.procBuf = []; - break; - } - if (this.procBuf.length === 0) { - this.lastClass = uchar.getCanonicalClass(); - this.procBuf.push(uchar); - } else { - starter = this.procBuf[0]; - composite = starter.getComposite(uchar); - cc = uchar.getCanonicalClass(); - if (Boolean(composite) && (this.lastClass < cc || this.lastClass === 0)) { - this.procBuf[0] = composite; - } else { - if (cc === 0) { - this.resBuf = this.procBuf; - this.procBuf = []; - } - this.lastClass = cc; - this.procBuf.push(uchar); - } - } - } - return this.resBuf.shift(); -}; - -createIterator = function (mode, str) { - switch (mode) { - case "NFD": - return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)); - case "NFKD": - return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)); - case "NFC": - return new CompIterator( - new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)) - ); - case "NFKC": - return new CompIterator( - new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)) - ); - default: - throw new Error(mode + " is invalid"); - } -}; -normalize = function (mode, str) { - var it = createIterator(mode, str), ret = "", uchar; - while ((uchar = it.next())) ret += uchar.toString(); - return ret; -}; - -/* Unicode data */ -UChar.udata = data; - -module.exports = function (/* Form*/) { - var str = String(validValue(this)), form = arguments[0]; - if (form === undefined) form = "NFC"; - else form = String(form); - if (!forms[form]) throw new RangeError("Invalid normalization form: " + form); - return normalize(form, str); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/pad.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/pad.js" deleted file mode 100644 index ee0339f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/pad.js" +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -var toInteger = require("../../number/to-integer") - , value = require("../../object/valid-value") - , repeat = require("./repeat") - , abs = Math.abs - , max = Math.max; - -module.exports = function (fill /*, length*/) { - var self = String(value(this)), sLength = self.length, length = arguments[1]; - - length = isNaN(length) ? 1 : toInteger(length); - fill = repeat.call(String(fill), abs(length)); - if (length >= 0) return fill.slice(0, max(0, length - sLength)) + self; - return self + (sLength + length >= 0 ? "" : fill.slice(length + sLength)); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/plain-replace-all.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/plain-replace-all.js" deleted file mode 100644 index 9334fe0..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/plain-replace-all.js" +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -var value = require("../../object/valid-value"); - -module.exports = function (search, replace) { - var index, pos = 0, str = String(value(this)), sl, rl; - search = String(search); - replace = String(replace); - sl = search.length; - rl = replace.length; - while ((index = str.indexOf(search, pos)) !== -1) { - str = str.slice(0, index) + replace + str.slice(index + sl); - pos = index + rl; - } - return str; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/plain-replace.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/plain-replace.js" deleted file mode 100644 index b8bfe3d..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/plain-replace.js" +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var indexOf = String.prototype.indexOf, slice = String.prototype.slice; - -module.exports = function (search, replace) { - var index = indexOf.call(this, search); - if (index === -1) return String(this); - return slice.call(this, 0, index) + replace + slice.call(this, index + String(search).length); -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/repeat/implement.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/repeat/implement.js" deleted file mode 100644 index f237dcd..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/repeat/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(String.prototype, "repeat", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/repeat/index.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/repeat/index.js" deleted file mode 100644 index abcb601..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/repeat/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? String.prototype.repeat : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/repeat/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/repeat/is-implemented.js" deleted file mode 100644 index e8e0240..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/repeat/is-implemented.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var str = "foo"; - -module.exports = function () { - if (typeof str.repeat !== "function") return false; - return str.repeat(2) === "foofoo"; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/repeat/shim.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/repeat/shim.js" deleted file mode 100644 index ac259a8..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/repeat/shim.js" +++ /dev/null @@ -1,24 +0,0 @@ -// Thanks -// @rauchma http://www.2ality.com/2014/01/efficient-string-repeat.html -// @mathiasbynens https://github.com/mathiasbynens/String.prototype.repeat/blob/4a4b567def/repeat.js - -"use strict"; - -var value = require("../../../object/valid-value") - , toInteger = require("../../../number/to-integer"); - -module.exports = function (count) { - var str = String(value(this)), result; - count = toInteger(count); - if (count < 0) throw new RangeError("Count must be >= 0"); - if (!isFinite(count)) throw new RangeError("Count must be < ∞"); - - result = ""; - while (count) { - if (count % 2) result += str; - if (count > 1) str += str; - // eslint-disable-next-line no-bitwise - count >>= 1; - } - return result; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/starts-with/implement.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/starts-with/implement.js" deleted file mode 100644 index 62abadb..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/starts-with/implement.js" +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(String.prototype, "startsWith", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/starts-with/index.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/starts-with/index.js" deleted file mode 100644 index a0a368f..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/starts-with/index.js" +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? String.prototype.startsWith : require("./shim"); diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/starts-with/is-implemented.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/starts-with/is-implemented.js" deleted file mode 100644 index d1241bc..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/starts-with/is-implemented.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var str = "razdwatrzy"; - -module.exports = function () { - if (typeof str.startsWith !== "function") return false; - return str.startsWith("trzy") === false && str.startsWith("raz") === true; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/starts-with/shim.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/starts-with/shim.js" deleted file mode 100644 index c3fa3b0..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/starts-with/shim.js" +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var value = require("../../../object/valid-value") - , toInteger = require("../../../number/to-integer") - , max = Math.max - , min = Math.min; - -module.exports = function (searchString /*, position*/) { - var start, self = String(value(this)); - start = min(max(toInteger(arguments[1]), 0), self.length); - return self.indexOf(searchString, start) === start; -}; diff --git "a/system/websocket_test/node_modules/es5-ext/string/\043/uncapitalize.js" "b/system/websocket_test/node_modules/es5-ext/string/\043/uncapitalize.js" deleted file mode 100644 index 202dbb7..0000000 --- "a/system/websocket_test/node_modules/es5-ext/string/\043/uncapitalize.js" +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var ensureStringifiable = require("../../object/validate-stringifiable-value"); - -module.exports = function () { - var str = ensureStringifiable(this); - return str.charAt(0).toLowerCase() + str.slice(1); -}; diff --git a/system/websocket_test/node_modules/es5-ext/string/format-method.js b/system/websocket_test/node_modules/es5-ext/string/format-method.js deleted file mode 100644 index 91d8de9..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/format-method.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -var isCallable = require("../object/is-callable") - , value = require("../object/valid-value") - , call = Function.prototype.call; - -module.exports = function (fmap) { - fmap = Object(value(fmap)); - return function (pattern) { - var context = this; - value(context); - pattern = String(pattern); - return pattern.replace( - /%([a-zA-Z]+)|\\([\u0000-\uffff])/g, - function (match, token, escapeChar) { - var t, result; - if (escapeChar) return escapeChar; - t = token; - while (t && !(result = fmap[t])) t = t.slice(0, -1); - if (!result) return match; - if (isCallable(result)) result = call.call(result, context); - return result + token.slice(t.length); - } - ); - }; -}; diff --git a/system/websocket_test/node_modules/es5-ext/string/from-code-point/implement.js b/system/websocket_test/node_modules/es5-ext/string/from-code-point/implement.js deleted file mode 100644 index 71728bf..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/from-code-point/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(String, "fromCodePoint", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/string/from-code-point/index.js b/system/websocket_test/node_modules/es5-ext/string/from-code-point/index.js deleted file mode 100644 index 5a5fc5b..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/from-code-point/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? String.fromCodePoint : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/string/from-code-point/is-implemented.js b/system/websocket_test/node_modules/es5-ext/string/from-code-point/is-implemented.js deleted file mode 100644 index ae4b818..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/from-code-point/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - var fromCodePoint = String.fromCodePoint; - if (typeof fromCodePoint !== "function") return false; - return fromCodePoint(0x1d306, 0x61, 0x1d307) === "\ud834\udf06a\ud834\udf07"; -}; diff --git a/system/websocket_test/node_modules/es5-ext/string/from-code-point/shim.js b/system/websocket_test/node_modules/es5-ext/string/from-code-point/shim.js deleted file mode 100644 index c8214cf..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/from-code-point/shim.js +++ /dev/null @@ -1,37 +0,0 @@ -// Based on: -// http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/ -// and: -// https://github.com/mathiasbynens/String.fromCodePoint/blob/master -// /fromcodepoint.js - -"use strict"; - -var floor = Math.floor, fromCharCode = String.fromCharCode; - -// eslint-disable-next-line no-unused-vars -module.exports = function (codePoint1 /*, …codePoints*/) { - var chars = [], length = arguments.length, i, codePoint, result = ""; - for (i = 0; i < length; ++i) { - codePoint = Number(arguments[i]); - if ( - !isFinite(codePoint) || - codePoint < 0 || - codePoint > 0x10ffff || - floor(codePoint) !== codePoint - ) { - throw new RangeError("Invalid code point " + codePoint); - } - - if (codePoint < 0x10000) { - chars.push(codePoint); - } else { - codePoint -= 0x10000; - // eslint-disable-next-line no-bitwise - chars.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00); - } - if (i + 1 !== length && chars.length <= 0x4000) continue; - result += fromCharCode.apply(null, chars); - chars.length = 0; - } - return result; -}; diff --git a/system/websocket_test/node_modules/es5-ext/string/index.js b/system/websocket_test/node_modules/es5-ext/string/index.js deleted file mode 100644 index 4393588..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/index.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -module.exports = { - "#": require("./#"), - "formatMethod": require("./format-method"), - "fromCodePoint": require("./from-code-point"), - "isString": require("./is-string"), - "random": require("./random"), - "randomUniq": require("./random-uniq"), - "raw": require("./raw") -}; diff --git a/system/websocket_test/node_modules/es5-ext/string/is-string.js b/system/websocket_test/node_modules/es5-ext/string/is-string.js deleted file mode 100644 index 1b1e863..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/is-string.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var objToString = Object.prototype.toString, id = objToString.call(""); - -module.exports = function (value) { - return ( - typeof value === "string" || - (value && - typeof value === "object" && - (value instanceof String || objToString.call(value) === id)) || - false - ); -}; diff --git a/system/websocket_test/node_modules/es5-ext/string/random-uniq.js b/system/websocket_test/node_modules/es5-ext/string/random-uniq.js deleted file mode 100644 index ae57b29..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/random-uniq.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var generated = Object.create(null), random = Math.random; - -module.exports = function () { - var str; - do { - str = random().toString(36).slice(2); - } while (generated[str]); - return str; -}; diff --git a/system/websocket_test/node_modules/es5-ext/string/random.js b/system/websocket_test/node_modules/es5-ext/string/random.js deleted file mode 100644 index 8fda5de..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/random.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -var isValue = require("../object/is-value") - , toNaturalNumber = require("../number/to-pos-integer"); - -var generated = Object.create(null), random = Math.random, uniqTryLimit = 100; - -var getChunk = function () { return random().toString(36).slice(2); }; - -var getString = function (/* length */) { - var str = getChunk(), length = arguments[0]; - if (!isValue(length)) return str; - while (str.length < length) str += getChunk(); - return str.slice(0, length); -}; - -module.exports = function (/* options */) { - var options = Object(arguments[0]), length = options.length, isUnique = options.isUnique; - - if (isValue(length)) length = toNaturalNumber(length); - - var str = getString(length); - if (isUnique) { - var count = 0; - while (generated[str]) { - if (++count === uniqTryLimit) { - throw new Error( - "Cannot generate random string.\n" + - "String.random is not designed to effectively generate many short and " + - "unique random strings" - ); - } - str = getString(length); - } - generated[str] = true; - } - return str; -}; diff --git a/system/websocket_test/node_modules/es5-ext/string/raw/implement.js b/system/websocket_test/node_modules/es5-ext/string/raw/implement.js deleted file mode 100644 index 24f17c2..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/raw/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(String, "raw", { - value: require("./shim"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es5-ext/string/raw/index.js b/system/websocket_test/node_modules/es5-ext/string/raw/index.js deleted file mode 100644 index 39889e9..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/raw/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? String.raw : require("./shim"); diff --git a/system/websocket_test/node_modules/es5-ext/string/raw/is-implemented.js b/system/websocket_test/node_modules/es5-ext/string/raw/is-implemented.js deleted file mode 100644 index 8758108..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/raw/is-implemented.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -module.exports = function () { - var raw = String.raw, test; - if (typeof raw !== "function") return false; - test = ["foo\nbar", "marko\n"]; - test.raw = ["foo\\nbar", "marko\\n"]; - return raw(test, "INSE\nRT") === "foo\\nbarINSE\nRTmarko\\n"; -}; diff --git a/system/websocket_test/node_modules/es5-ext/string/raw/shim.js b/system/websocket_test/node_modules/es5-ext/string/raw/shim.js deleted file mode 100644 index 8c52bb5..0000000 --- a/system/websocket_test/node_modules/es5-ext/string/raw/shim.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var toPosInt = require("../../number/to-pos-integer") - , validValue = require("../../object/valid-value") - , reduce = Array.prototype.reduce; - -module.exports = function (callSite /*, …substitutions*/) { - var args, rawValue = Object(validValue(Object(validValue(callSite)).raw)); - if (!toPosInt(rawValue.length)) return ""; - args = arguments; - return reduce.call(rawValue, function (str1, str2, i) { - return str1 + String(args[i]) + str2; - }); -}; diff --git a/system/websocket_test/node_modules/es5-ext/to-short-string-representation.js b/system/websocket_test/node_modules/es5-ext/to-short-string-representation.js deleted file mode 100644 index 5aede53..0000000 --- a/system/websocket_test/node_modules/es5-ext/to-short-string-representation.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -var safeToString = require("./safe-to-string"); - -var reNewLine = /[\n\r\u2028\u2029]/g; - -module.exports = function (value) { - var string = safeToString(value); - // Trim if too long - if (string.length > 100) string = string.slice(0, 99) + "…"; - // Replace eventual new lines - string = string.replace(reNewLine, function (char) { - return JSON.stringify(char).slice(1, -1); - }); - return string; -}; diff --git "a/system/websocket_test/node_modules/es6-iterator/\043/chain.js" "b/system/websocket_test/node_modules/es6-iterator/\043/chain.js" deleted file mode 100644 index 190a346..0000000 --- "a/system/websocket_test/node_modules/es6-iterator/\043/chain.js" +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -var setPrototypeOf = require("es5-ext/object/set-prototype-of") - , d = require("d") - , Iterator = require("../") - , validIterable = require("../valid-iterable") - - , push = Array.prototype.push - , defineProperties = Object.defineProperties - , IteratorChain; - -IteratorChain = function (iterators) { - defineProperties(this, { - __iterators__: d("", iterators), - __current__: d("w", iterators.shift()) - }); -}; -if (setPrototypeOf) setPrototypeOf(IteratorChain, Iterator); - -IteratorChain.prototype = Object.create(Iterator.prototype, { - constructor: d(IteratorChain), - next: d(function () { - var result; - if (!this.__current__) return { done: true, value: undefined }; - result = this.__current__.next(); - while (result.done) { - this.__current__ = this.__iterators__.shift(); - if (!this.__current__) return { done: true, value: undefined }; - result = this.__current__.next(); - } - return result; - }) -}); - -module.exports = function () { - var iterators = [this]; - push.apply(iterators, arguments); - iterators.forEach(validIterable); - return new IteratorChain(iterators); -}; diff --git a/system/websocket_test/node_modules/es6-iterator/.editorconfig b/system/websocket_test/node_modules/es6-iterator/.editorconfig deleted file mode 100644 index c24a6cd..0000000 --- a/system/websocket_test/node_modules/es6-iterator/.editorconfig +++ /dev/null @@ -1,14 +0,0 @@ -# EditorConfig is awesome: http://EditorConfig.org - -# top-most EditorConfig file -root = true - -# Unix-style newlines with a newline ending every file -[*] -end_of_line = lf -insert_final_newline = true -indent_style = tab - -[{*.json,*.yml}] -indent_style = space -indent_size = 2 diff --git a/system/websocket_test/node_modules/es6-iterator/.npmignore b/system/websocket_test/node_modules/es6-iterator/.npmignore deleted file mode 100644 index a91db65..0000000 --- a/system/websocket_test/node_modules/es6-iterator/.npmignore +++ /dev/null @@ -1,12 +0,0 @@ -.DS_Store -Thumbs.db -/.idea -/.vscode -npm-debug.log -/wallaby.js -/node_modules -/.travis.yml -/.gitignore -/.circle.yml -/.circleci -/.appveyor.yml diff --git a/system/websocket_test/node_modules/es6-iterator/CHANGELOG.md b/system/websocket_test/node_modules/es6-iterator/CHANGELOG.md deleted file mode 100644 index 37eb16a..0000000 --- a/system/websocket_test/node_modules/es6-iterator/CHANGELOG.md +++ /dev/null @@ -1,27 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [2.0.3](https://github.com/medikoo/es6-iterator/compare/v2.0.2...v2.0.3) (2017-10-17) - - -### Bug Fixes - -* configurability of toStringTag ([b99f692](https://github.com/medikoo/es6-iterator/commit/b99f692)) - - - - -## [2.0.2](https://github.com/medikoo/es6-iterator/compare/v2.0.1...v2.0.2) (2017-10-17) - - -### Bug Fixes - -* constructor exposure ([dbc0c51](https://github.com/medikoo/es6-iterator/commit/dbc0c51)) -* do not allow non constructor calls ([1f2f800](https://github.com/medikoo/es6-iterator/commit/1f2f800)) -* toString and toStringTag symbol definitions. ([2d17786](https://github.com/medikoo/es6-iterator/commit/2d17786)), closes [#6](https://github.com/medikoo/es6-iterator/issues/6) - -## Changelog for previous versions - -See `CHANGES` file diff --git a/system/websocket_test/node_modules/es6-iterator/CHANGES b/system/websocket_test/node_modules/es6-iterator/CHANGES deleted file mode 100644 index 83095f7..0000000 --- a/system/websocket_test/node_modules/es6-iterator/CHANGES +++ /dev/null @@ -1,42 +0,0 @@ -For recent changelog see CHANGELOG.md - ------ - -v2.0.1 -- 2017.03.15 -* Update dependencies - -v2.0.0 -- 2015.10.02 -* Use es6-symbol at v3 - -v1.0.0 -- 2015.06.23 -* Implement support for arguments object -* Drop support for v0.8 node ('^' in package.json dependencies) - -v0.1.3 -- 2015.02.02 -* Update dependencies -* Fix spelling of LICENSE - -v0.1.2 -- 2014.11.19 -* Optimise internal `_next` to not verify internal's list length at all times - (#2 thanks @RReverser) -* Fix documentation examples -* Configure lint scripts - -v0.1.1 -- 2014.04.29 -* Fix es6-symbol dependency version - -v0.1.0 -- 2014.04.29 -* Assure strictly npm hosted dependencies -* Remove sparse arrays dedicated handling (as per spec) -* Add: isIterable, validIterable and chain (method) -* Remove toArray, it's addressed by Array.from (polyfil can be found in es5-ext/array/from) -* Add break possiblity to 'forOf' via 'doBreak' function argument -* Provide dedicated iterator for array-likes (ArrayIterator) and for strings (StringIterator) -* Provide @@toStringTag symbol -* When available rely on @@iterator symbol -* Remove 32bit integer maximum list length restriction -* Improve Iterator internals -* Update to use latest version of dependencies - -v0.0.0 -- 2013.10.12 -Initial (dev version) diff --git a/system/websocket_test/node_modules/es6-iterator/LICENSE b/system/websocket_test/node_modules/es6-iterator/LICENSE deleted file mode 100644 index d7c36d5..0000000 --- a/system/websocket_test/node_modules/es6-iterator/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2013-2017 Mariusz Nowak (www.medikoo.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/system/websocket_test/node_modules/es6-iterator/README.md b/system/websocket_test/node_modules/es6-iterator/README.md deleted file mode 100644 index 288373d..0000000 --- a/system/websocket_test/node_modules/es6-iterator/README.md +++ /dev/null @@ -1,148 +0,0 @@ -# es6-iterator -## ECMAScript 6 Iterator interface - -### Installation - - $ npm install es6-iterator - -To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) - -## API - -### Constructors - -#### Iterator(list) _(es6-iterator)_ - -Abstract Iterator interface. Meant for extensions and not to be used on its own. - -Accepts any _list_ object (technically object with numeric _length_ property). - -_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_ - -```javascript -var Iterator = require('es6-iterator') -var iterator = new Iterator([1, 2, 3]); - -iterator.next(); // { value: 1, done: false } -iterator.next(); // { value: 2, done: false } -iterator.next(); // { value: 3, done: false } -iterator.next(); // { value: undefined, done: true } -``` - - -#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_ - -Dedicated for arrays and array-likes. Supports three iteration kinds: -* __value__ _(default)_ - Iterates values -* __key__ - Iterates indexes -* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form. - - -```javascript -var ArrayIterator = require('es6-iterator/array') -var iterator = new ArrayIterator([1, 2, 3], 'key+value'); - -iterator.next(); // { value: [0, 1], done: false } -iterator.next(); // { value: [1, 2], done: false } -iterator.next(); // { value: [2, 3], done: false } -iterator.next(); // { value: undefined, done: true } -``` - -May also be used for _arguments_ objects: - -```javascript -(function () { - var iterator = new ArrayIterator(arguments); - - iterator.next(); // { value: 1, done: false } - iterator.next(); // { value: 2, done: false } - iterator.next(); // { value: 3, done: false } - iterator.next(); // { value: undefined, done: true } -}(1, 2, 3)); -``` - -#### StringIterator(str) _(es6-iterator/string)_ - -Assures proper iteration over unicode symbols. -See: http://mathiasbynens.be/notes/javascript-unicode - -```javascript -var StringIterator = require('es6-iterator/string'); -var iterator = new StringIterator('f🙈o🙉o🙊'); - -iterator.next(); // { value: 'f', done: false } -iterator.next(); // { value: '🙈', done: false } -iterator.next(); // { value: 'o', done: false } -iterator.next(); // { value: '🙉', done: false } -iterator.next(); // { value: 'o', done: false } -iterator.next(); // { value: '🙊', done: false } -iterator.next(); // { value: undefined, done: true } -``` - -### Function utilities - -#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_ - -Polyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement. - -``` -var forOf = require('es6-iterator/for-of'); -var result = []; - -forOf('🙈🙉🙊', function (monkey) { result.push(monkey); }); -console.log(result); // ['🙈', '🙉', '🙊']; -``` - -Optionally you can break iteration at any point: - -```javascript -var result = []; - -forOf([1,2,3,4]', function (val, doBreak) { - result.push(monkey); - if (val >= 3) doBreak(); -}); -console.log(result); // [1, 2, 3]; -``` - -#### get(obj) _(es6-iterator/get)_ - -Return iterator for any iterable object. - -```javascript -var getIterator = require('es6-iterator/get'); -var iterator = get([1,2,3]); - -iterator.next(); // { value: 1, done: false } -iterator.next(); // { value: 2, done: false } -iterator.next(); // { value: 3, done: false } -iterator.next(); // { value: undefined, done: true } -``` - -#### isIterable(obj) _(es6-iterator/is-iterable)_ - -Whether _obj_ is iterable - -```javascript -var isIterable = require('es6-iterator/is-iterable'); - -isIterable(null); // false -isIterable(true); // false -isIterable('str'); // true -isIterable(['a', 'r', 'r']); // true -isIterable(new ArrayIterator([])); // true -``` - -#### validIterable(obj) _(es6-iterator/valid-iterable)_ - -If _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown. - -### Method extensions - -#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_ - -Chain multiple iterators into one. - -### Tests [![Build Status](https://travis-ci.org/medikoo/es6-iterator.png)](https://travis-ci.org/medikoo/es6-iterator) - - $ npm test diff --git a/system/websocket_test/node_modules/es6-iterator/appveyor.yml b/system/websocket_test/node_modules/es6-iterator/appveyor.yml deleted file mode 100644 index 942ab82..0000000 --- a/system/websocket_test/node_modules/es6-iterator/appveyor.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Test against the latest version of this Node.js version -environment: - matrix: - # node.js - - nodejs_version: "0.12" - - nodejs_version: "4" - - nodejs_version: "6" - - nodejs_version: "8" - -# Install scripts. (runs after repo cloning) -install: - # Get the latest stable version of Node.js or io.js - - ps: Install-Product node $env:nodejs_version - # install modules - - npm install - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - npm --version - # run tests - - npm test - -# Don't actually build. -build: off diff --git a/system/websocket_test/node_modules/es6-iterator/array.js b/system/websocket_test/node_modules/es6-iterator/array.js deleted file mode 100644 index d7a46a4..0000000 --- a/system/websocket_test/node_modules/es6-iterator/array.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -var setPrototypeOf = require("es5-ext/object/set-prototype-of") - , contains = require("es5-ext/string/#/contains") - , d = require("d") - , Symbol = require("es6-symbol") - , Iterator = require("./"); - -var defineProperty = Object.defineProperty, ArrayIterator; - -ArrayIterator = module.exports = function (arr, kind) { - if (!(this instanceof ArrayIterator)) throw new TypeError("Constructor requires 'new'"); - Iterator.call(this, arr); - if (!kind) kind = "value"; - else if (contains.call(kind, "key+value")) kind = "key+value"; - else if (contains.call(kind, "key")) kind = "key"; - else kind = "value"; - defineProperty(this, "__kind__", d("", kind)); -}; -if (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator); - -// Internal %ArrayIteratorPrototype% doesn't expose its constructor -delete ArrayIterator.prototype.constructor; - -ArrayIterator.prototype = Object.create(Iterator.prototype, { - _resolve: d(function (i) { - if (this.__kind__ === "value") return this.__list__[i]; - if (this.__kind__ === "key+value") return [i, this.__list__[i]]; - return i; - }) -}); -defineProperty(ArrayIterator.prototype, Symbol.toStringTag, d("c", "Array Iterator")); diff --git a/system/websocket_test/node_modules/es6-iterator/for-of.js b/system/websocket_test/node_modules/es6-iterator/for-of.js deleted file mode 100644 index 5d15c34..0000000 --- a/system/websocket_test/node_modules/es6-iterator/for-of.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -var isArguments = require("es5-ext/function/is-arguments") - , callable = require("es5-ext/object/valid-callable") - , isString = require("es5-ext/string/is-string") - , get = require("./get"); - -var isArray = Array.isArray, call = Function.prototype.call, some = Array.prototype.some; - -module.exports = function (iterable, cb /*, thisArg*/) { - var mode, thisArg = arguments[2], result, doBreak, broken, i, length, char, code; - if (isArray(iterable) || isArguments(iterable)) mode = "array"; - else if (isString(iterable)) mode = "string"; - else iterable = get(iterable); - - callable(cb); - doBreak = function () { - broken = true; - }; - if (mode === "array") { - some.call(iterable, function (value) { - call.call(cb, thisArg, value, doBreak); - return broken; - }); - return; - } - if (mode === "string") { - length = iterable.length; - for (i = 0; i < length; ++i) { - char = iterable[i]; - if (i + 1 < length) { - code = char.charCodeAt(0); - if (code >= 0xd800 && code <= 0xdbff) char += iterable[++i]; - } - call.call(cb, thisArg, char, doBreak); - if (broken) break; - } - return; - } - result = iterable.next(); - - while (!result.done) { - call.call(cb, thisArg, result.value, doBreak); - if (broken) return; - result = iterable.next(); - } -}; diff --git a/system/websocket_test/node_modules/es6-iterator/get.js b/system/websocket_test/node_modules/es6-iterator/get.js deleted file mode 100644 index d36c9e2..0000000 --- a/system/websocket_test/node_modules/es6-iterator/get.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var isArguments = require("es5-ext/function/is-arguments") - , isString = require("es5-ext/string/is-string") - , ArrayIterator = require("./array") - , StringIterator = require("./string") - , iterable = require("./valid-iterable") - , iteratorSymbol = require("es6-symbol").iterator; - -module.exports = function (obj) { - if (typeof iterable(obj)[iteratorSymbol] === "function") return obj[iteratorSymbol](); - if (isArguments(obj)) return new ArrayIterator(obj); - if (isString(obj)) return new StringIterator(obj); - return new ArrayIterator(obj); -}; diff --git a/system/websocket_test/node_modules/es6-iterator/index.js b/system/websocket_test/node_modules/es6-iterator/index.js deleted file mode 100644 index 790475f..0000000 --- a/system/websocket_test/node_modules/es6-iterator/index.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; - -var clear = require("es5-ext/array/#/clear") - , assign = require("es5-ext/object/assign") - , callable = require("es5-ext/object/valid-callable") - , value = require("es5-ext/object/valid-value") - , d = require("d") - , autoBind = require("d/auto-bind") - , Symbol = require("es6-symbol"); - -var defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, Iterator; - -module.exports = Iterator = function (list, context) { - if (!(this instanceof Iterator)) throw new TypeError("Constructor requires 'new'"); - defineProperties(this, { - __list__: d("w", value(list)), - __context__: d("w", context), - __nextIndex__: d("w", 0) - }); - if (!context) return; - callable(context.on); - context.on("_add", this._onAdd); - context.on("_delete", this._onDelete); - context.on("_clear", this._onClear); -}; - -// Internal %IteratorPrototype% doesn't expose its constructor -delete Iterator.prototype.constructor; - -defineProperties( - Iterator.prototype, - assign( - { - _next: d(function () { - var i; - if (!this.__list__) return undefined; - if (this.__redo__) { - i = this.__redo__.shift(); - if (i !== undefined) return i; - } - if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++; - this._unBind(); - return undefined; - }), - next: d(function () { - return this._createResult(this._next()); - }), - _createResult: d(function (i) { - if (i === undefined) return { done: true, value: undefined }; - return { done: false, value: this._resolve(i) }; - }), - _resolve: d(function (i) { - return this.__list__[i]; - }), - _unBind: d(function () { - this.__list__ = null; - delete this.__redo__; - if (!this.__context__) return; - this.__context__.off("_add", this._onAdd); - this.__context__.off("_delete", this._onDelete); - this.__context__.off("_clear", this._onClear); - this.__context__ = null; - }), - toString: d(function () { - return "[object " + (this[Symbol.toStringTag] || "Object") + "]"; - }) - }, - autoBind({ - _onAdd: d(function (index) { - if (index >= this.__nextIndex__) return; - ++this.__nextIndex__; - if (!this.__redo__) { - defineProperty(this, "__redo__", d("c", [index])); - return; - } - this.__redo__.forEach(function (redo, i) { - if (redo >= index) this.__redo__[i] = ++redo; - }, this); - this.__redo__.push(index); - }), - _onDelete: d(function (index) { - var i; - if (index >= this.__nextIndex__) return; - --this.__nextIndex__; - if (!this.__redo__) return; - i = this.__redo__.indexOf(index); - if (i !== -1) this.__redo__.splice(i, 1); - this.__redo__.forEach(function (redo, j) { - if (redo > index) this.__redo__[j] = --redo; - }, this); - }), - _onClear: d(function () { - if (this.__redo__) clear.call(this.__redo__); - this.__nextIndex__ = 0; - }) - }) - ) -); - -defineProperty( - Iterator.prototype, - Symbol.iterator, - d(function () { - return this; - }) -); diff --git a/system/websocket_test/node_modules/es6-iterator/is-iterable.js b/system/websocket_test/node_modules/es6-iterator/is-iterable.js deleted file mode 100644 index cda7dfe..0000000 --- a/system/websocket_test/node_modules/es6-iterator/is-iterable.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -var isArguments = require("es5-ext/function/is-arguments") - , isValue = require("es5-ext/object/is-value") - , isString = require("es5-ext/string/is-string"); - -var iteratorSymbol = require("es6-symbol").iterator - , isArray = Array.isArray; - -module.exports = function (value) { - if (!isValue(value)) return false; - if (isArray(value)) return true; - if (isString(value)) return true; - if (isArguments(value)) return true; - return typeof value[iteratorSymbol] === "function"; -}; diff --git a/system/websocket_test/node_modules/es6-iterator/package.json b/system/websocket_test/node_modules/es6-iterator/package.json deleted file mode 100644 index bc2582a..0000000 --- a/system/websocket_test/node_modules/es6-iterator/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "es6-iterator", - "version": "2.0.3", - "description": "Iterator abstraction based on ES6 specification", - "author": "Mariusz Nowak (http://www.medikoo.com/)", - "keywords": [ - "iterator", - "array", - "list", - "set", - "map", - "generator" - ], - "repository": { - "type": "git", - "url": "git://github.com/medikoo/es6-iterator.git" - }, - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - }, - "devDependencies": { - "eslint": "^4.9", - "eslint-config-medikoo-es5": "^1.4.4", - "event-emitter": "^0.3.5", - "tad": "^0.2.7" - }, - "eslintConfig": { - "extends": "medikoo-es5", - "root": true, - "rules": { - "no-extend-native": "off" - } - }, - "scripts": { - "lint": "eslint --ignore-path=.gitignore .", - "test": "node ./node_modules/tad/bin/tad" - }, - "license": "MIT" -} diff --git a/system/websocket_test/node_modules/es6-iterator/string.js b/system/websocket_test/node_modules/es6-iterator/string.js deleted file mode 100644 index 4888225..0000000 --- a/system/websocket_test/node_modules/es6-iterator/string.js +++ /dev/null @@ -1,39 +0,0 @@ -// Thanks @mathiasbynens -// http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols - -"use strict"; - -var setPrototypeOf = require("es5-ext/object/set-prototype-of") - , d = require("d") - , Symbol = require("es6-symbol") - , Iterator = require("./"); - -var defineProperty = Object.defineProperty, StringIterator; - -StringIterator = module.exports = function (str) { - if (!(this instanceof StringIterator)) throw new TypeError("Constructor requires 'new'"); - str = String(str); - Iterator.call(this, str); - defineProperty(this, "__length__", d("", str.length)); -}; -if (setPrototypeOf) setPrototypeOf(StringIterator, Iterator); - -// Internal %ArrayIteratorPrototype% doesn't expose its constructor -delete StringIterator.prototype.constructor; - -StringIterator.prototype = Object.create(Iterator.prototype, { - _next: d(function () { - if (!this.__list__) return undefined; - if (this.__nextIndex__ < this.__length__) return this.__nextIndex__++; - this._unBind(); - return undefined; - }), - _resolve: d(function (i) { - var char = this.__list__[i], code; - if (this.__nextIndex__ === this.__length__) return char; - code = char.charCodeAt(0); - if (code >= 0xd800 && code <= 0xdbff) return char + this.__list__[this.__nextIndex__++]; - return char; - }) -}); -defineProperty(StringIterator.prototype, Symbol.toStringTag, d("c", "String Iterator")); diff --git "a/system/websocket_test/node_modules/es6-iterator/test/\043/chain.js" "b/system/websocket_test/node_modules/es6-iterator/test/\043/chain.js" deleted file mode 100644 index 457356f..0000000 --- "a/system/websocket_test/node_modules/es6-iterator/test/\043/chain.js" +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var Iterator = require("../../"); - -module.exports = function (t, a) { - var i1 = new Iterator(["raz", "dwa", "trzy"]) - , i2 = new Iterator(["cztery", "pięć", "sześć"]) - , i3 = new Iterator(["siedem", "osiem", "dziewięć"]) - - , iterator = t.call(i1, i2, i3); - - a.deep(iterator.next(), { done: false, value: "raz" }, "#1"); - a.deep(iterator.next(), { done: false, value: "dwa" }, "#2"); - a.deep(iterator.next(), { done: false, value: "trzy" }, "#3"); - a.deep(iterator.next(), { done: false, value: "cztery" }, "#4"); - a.deep(iterator.next(), { done: false, value: "pięć" }, "#5"); - a.deep(iterator.next(), { done: false, value: "sześć" }, "#6"); - a.deep(iterator.next(), { done: false, value: "siedem" }, "#7"); - a.deep(iterator.next(), { done: false, value: "osiem" }, "#8"); - a.deep(iterator.next(), { done: false, value: "dziewięć" }, "#9"); - a.deep(iterator.next(), { done: true, value: undefined }, "Done #1"); - a.deep(iterator.next(), { done: true, value: undefined }, "Done #2"); -}; diff --git a/system/websocket_test/node_modules/es6-iterator/test/.eslintrc.json b/system/websocket_test/node_modules/es6-iterator/test/.eslintrc.json deleted file mode 100644 index 99f0b65..0000000 --- a/system/websocket_test/node_modules/es6-iterator/test/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "rules": { - "id-length": "off" - } -} diff --git a/system/websocket_test/node_modules/es6-iterator/test/array.js b/system/websocket_test/node_modules/es6-iterator/test/array.js deleted file mode 100644 index 447dfa7..0000000 --- a/system/websocket_test/node_modules/es6-iterator/test/array.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; - -var iteratorSymbol = require("es6-symbol").iterator; - -module.exports = function (T) { - return { - "Values": function (a) { - var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; - - it = new T(x); - a(it[iteratorSymbol](), it, "@@iterator"); - a.deep(it.next(), { done: false, value: "raz" }, "#1"); - a.deep(it.next(), { done: false, value: "dwa" }, "#2"); - x.splice(1, 0, "elo"); - a.deep(it.next(), { done: false, value: "dwa" }, "Insert"); - a.deep(it.next(), { done: false, value: "trzy" }, "#3"); - a.deep(it.next(), { done: false, value: "cztery" }, "#4"); - x.pop(); - a.deep(it.next(), { done: false, value: "pięć" }, "#5"); - a.deep(it.next(), { done: true, value: undefined }, "End"); - }, - "Keys & Values": function (a) { - var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; - - it = new T(x, "key+value"); - a(it[iteratorSymbol](), it, "@@iterator"); - a.deep(it.next(), { done: false, value: [0, "raz"] }, "#1"); - a.deep(it.next(), { done: false, value: [1, "dwa"] }, "#2"); - x.splice(1, 0, "elo"); - a.deep(it.next(), { done: false, value: [2, "dwa"] }, "Insert"); - a.deep(it.next(), { done: false, value: [3, "trzy"] }, "#3"); - a.deep(it.next(), { done: false, value: [4, "cztery"] }, "#4"); - x.pop(); - a.deep(it.next(), { done: false, value: [5, "pięć"] }, "#5"); - a.deep(it.next(), { done: true, value: undefined }, "End"); - }, - "Keys": function (a) { - var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; - - it = new T(x, "key"); - a(it[iteratorSymbol](), it, "@@iterator"); - a.deep(it.next(), { done: false, value: 0 }, "#1"); - a.deep(it.next(), { done: false, value: 1 }, "#2"); - x.splice(1, 0, "elo"); - a.deep(it.next(), { done: false, value: 2 }, "Insert"); - a.deep(it.next(), { done: false, value: 3 }, "#3"); - a.deep(it.next(), { done: false, value: 4 }, "#4"); - x.pop(); - a.deep(it.next(), { done: false, value: 5 }, "#5"); - a.deep(it.next(), { done: true, value: undefined }, "End"); - }, - "Sparse": function (a) { - var x = new Array(6), it; - - x[2] = "raz"; - x[4] = "dwa"; - it = new T(x); - a.deep(it.next(), { done: false, value: undefined }, "#1"); - a.deep(it.next(), { done: false, value: undefined }, "#2"); - a.deep(it.next(), { done: false, value: "raz" }, "#3"); - a.deep(it.next(), { done: false, value: undefined }, "#4"); - a.deep(it.next(), { done: false, value: "dwa" }, "#5"); - a.deep(it.next(), { done: false, value: undefined }, "#6"); - a.deep(it.next(), { done: true, value: undefined }, "End"); - } - }; -}; diff --git a/system/websocket_test/node_modules/es6-iterator/test/for-of.js b/system/websocket_test/node_modules/es6-iterator/test/for-of.js deleted file mode 100644 index 9b47e97..0000000 --- a/system/websocket_test/node_modules/es6-iterator/test/for-of.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; - -var ArrayIterator = require("../array") - - , slice = Array.prototype.slice; - -module.exports = function (t, a) { - var i = 0, x = ["raz", "dwa", "trzy"], y = {}, called = 0; - t(x, function () { - a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#"); - a(this, y, "Array: context: " + i++ + "#"); - }, y); - i = 0; - t((function () { - return arguments; -}("raz", "dwa", "trzy")), function () { - a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#"); - a(this, y, "Arguments: context: " + i++ + "#"); - }, y); - i = 0; - t(x = "foo", function () { - a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); - a(this, y, "Regular String: context: " + i++ + "#"); - }, y); - i = 0; - x = ["r", "💩", "z"]; - t("r💩z", function () { - a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); - a(this, y, "Unicode String: context: " + i++ + "#"); - }, y); - i = 0; - t(new ArrayIterator(x), function () { - a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#"); - a(this, y, "Iterator: context: " + i++ + "#"); - }, y); - - t(x = ["raz", "dwa", "trzy"], function (value, doBreak) { - ++called; - return doBreak(); - }); - a(called, 1, "Break"); -}; diff --git a/system/websocket_test/node_modules/es6-iterator/test/get.js b/system/websocket_test/node_modules/es6-iterator/test/get.js deleted file mode 100644 index c5947d3..0000000 --- a/system/websocket_test/node_modules/es6-iterator/test/get.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -var iteratorSymbol = require("es6-symbol").iterator - , Iterator = require("../"); - -module.exports = function (t, a) { - var iterator; - a.throws(function () { - t(); -}, TypeError, "Null"); - a.throws(function () { - t({}); -}, TypeError, "Plain object"); - a.throws(function () { - t({ length: 0 }); -}, TypeError, "Array-like"); - iterator = {}; - iterator[iteratorSymbol] = function () { - return new Iterator([]); -}; - a(t(iterator) instanceof Iterator, true, "Iterator"); - a(String(t([])), "[object Array Iterator]", " Array"); - a(String(t(function () { - return arguments; -}())), "[object Array Iterator]", " Arguments"); - a(String(t("foo")), "[object String Iterator]", "String"); -}; diff --git a/system/websocket_test/node_modules/es6-iterator/test/index.js b/system/websocket_test/node_modules/es6-iterator/test/index.js deleted file mode 100644 index 4898218..0000000 --- a/system/websocket_test/node_modules/es6-iterator/test/index.js +++ /dev/null @@ -1,99 +0,0 @@ -"use strict"; - -var ee = require("event-emitter") - , iteratorSymbol = require("es6-symbol").iterator; - -module.exports = function (T) { - return { - "": function (a) { - var x = ["raz", "dwa", "trzy", "cztery", "pięć"], it, y, z; - - it = new T(x); - a(it[iteratorSymbol](), it, "@@iterator"); - y = it.next(); - a.deep(y, { done: false, value: "raz" }, "#1"); - z = it.next(); - a.not(y, z, "Recreate result"); - a.deep(z, { done: false, value: "dwa" }, "#2"); - a.deep(it.next(), { done: false, value: "trzy" }, "#3"); - a.deep(it.next(), { done: false, value: "cztery" }, "#4"); - a.deep(it.next(), { done: false, value: "pięć" }, "#5"); - a.deep(y = it.next(), { done: true, value: undefined }, "End"); - a.not(y, it.next(), "Recreate result on dead"); - }, - "Emited": function (a) { - var x = ["raz", "dwa", "trzy", "cztery", "pięć"], y, it; - - y = ee(); - it = new T(x, y); - a.deep(it.next(), { done: false, value: "raz" }, "#1"); - a.deep(it.next(), { done: false, value: "dwa" }, "#2"); - y.emit("_add", x.push("sześć") - 1); - a.deep(it.next(), { done: false, value: "trzy" }, "#3"); - x.splice(1, 0, "półtora"); - y.emit("_add", 1); - a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); - x.splice(5, 1); - y.emit("_delete", 5); - a.deep(it.next(), { done: false, value: "cztery" }, "#4"); - a.deep(it.next(), { done: false, value: "sześć" }, "#5"); - a.deep(it.next(), { done: true, value: undefined }, "End"); - }, - "Emited #2": function (a) { - var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; - - y = ee(); - it = new T(x, y); - a.deep(it.next(), { done: false, value: "raz" }, "#1"); - a.deep(it.next(), { done: false, value: "dwa" }, "#2"); - x.splice(1, 0, "półtora"); - y.emit("_add", 1); - x.splice(1, 0, "1.25"); - y.emit("_add", 1); - x.splice(0, 1); - y.emit("_delete", 0); - a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); - a.deep(it.next(), { done: false, value: "1.25" }, "Insert #2"); - a.deep(it.next(), { done: false, value: "trzy" }, "#3"); - a.deep(it.next(), { done: false, value: "cztery" }, "#4"); - x.splice(5, 1); - y.emit("_delete", 5); - a.deep(it.next(), { done: false, value: "sześć" }, "#5"); - a.deep(it.next(), { done: true, value: undefined }, "End"); - }, - "Emited: Clear #1": function (a) { - var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; - - y = ee(); - it = new T(x, y); - a.deep(it.next(), { done: false, value: "raz" }, "#1"); - a.deep(it.next(), { done: false, value: "dwa" }, "#2"); - x.length = 0; - y.emit("_clear"); - a.deep(it.next(), { done: true, value: undefined }, "End"); - }, - "Emited: Clear #2": function (a) { - var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; - - y = ee(); - it = new T(x, y); - a.deep(it.next(), { done: false, value: "raz" }, "#1"); - a.deep(it.next(), { done: false, value: "dwa" }, "#2"); - x.length = 0; - y.emit("_clear"); - x.push("foo"); - x.push("bar"); - a.deep(it.next(), { done: false, value: "foo" }, "#3"); - a.deep(it.next(), { done: false, value: "bar" }, "#4"); - x.splice(1, 0, "półtora"); - y.emit("_add", 1); - x.splice(1, 0, "1.25"); - y.emit("_add", 1); - x.splice(0, 1); - y.emit("_delete", 0); - a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); - a.deep(it.next(), { done: false, value: "1.25" }, "Insert #2"); - a.deep(it.next(), { done: true, value: undefined }, "End"); - } - }; -}; diff --git a/system/websocket_test/node_modules/es6-iterator/test/is-iterable.js b/system/websocket_test/node_modules/es6-iterator/test/is-iterable.js deleted file mode 100644 index 5787351..0000000 --- a/system/websocket_test/node_modules/es6-iterator/test/is-iterable.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var iteratorSymbol = require("es6-symbol").iterator - , Iterator = require("../"); - -module.exports = function (t, a) { - var iterator; - a(t(), false, "Undefined"); - a(t(123), false, "Number"); - a(t({}), false, "Plain object"); - a(t({ length: 0 }), false, "Array-like"); - iterator = {}; - iterator[iteratorSymbol] = function () { - return new Iterator([]); -}; - a(t(iterator), true, "Iterator"); - a(t([]), true, "Array"); - a(t("foo"), true, "String"); - a(t(""), true, "Empty string"); - a(t(function () { - return arguments; -}()), true, "Arguments"); -}; diff --git a/system/websocket_test/node_modules/es6-iterator/test/string.js b/system/websocket_test/node_modules/es6-iterator/test/string.js deleted file mode 100644 index 3f2a5b6..0000000 --- a/system/websocket_test/node_modules/es6-iterator/test/string.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var iteratorSymbol = require("es6-symbol").iterator; - -module.exports = function (T, a) { - var it = new T("foobar"); - - a(it[iteratorSymbol](), it, "@@iterator"); - a.deep(it.next(), { done: false, value: "f" }, "#1"); - a.deep(it.next(), { done: false, value: "o" }, "#2"); - a.deep(it.next(), { done: false, value: "o" }, "#3"); - a.deep(it.next(), { done: false, value: "b" }, "#4"); - a.deep(it.next(), { done: false, value: "a" }, "#5"); - a.deep(it.next(), { done: false, value: "r" }, "#6"); - a.deep(it.next(), { done: true, value: undefined }, "End"); - - a.h1("Outside of BMP"); - it = new T("r💩z"); - a.deep(it.next(), { done: false, value: "r" }, "#1"); - a.deep(it.next(), { done: false, value: "💩" }, "#2"); - a.deep(it.next(), { done: false, value: "z" }, "#3"); - a.deep(it.next(), { done: true, value: undefined }, "End"); -}; diff --git a/system/websocket_test/node_modules/es6-iterator/test/valid-iterable.js b/system/websocket_test/node_modules/es6-iterator/test/valid-iterable.js deleted file mode 100644 index b8b2a8a..0000000 --- a/system/websocket_test/node_modules/es6-iterator/test/valid-iterable.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -var iteratorSymbol = require("es6-symbol").iterator - , Iterator = require("../"); - -module.exports = function (t, a) { - var obj; - a.throws(function () { - t(); -}, TypeError, "Undefined"); - a.throws(function () { - t({}); -}, TypeError, "Plain object"); - a.throws(function () { - t({ length: 0 }); -}, TypeError, "Array-like"); - obj = {}; - obj[iteratorSymbol] = function () { - return new Iterator([]); -}; - a(t(obj), obj, "Iterator"); - obj = []; - a(t(obj), obj, "Array"); - obj = (function () { - return arguments; -}()); - a(t(obj), obj, "Arguments"); -}; diff --git a/system/websocket_test/node_modules/es6-iterator/valid-iterable.js b/system/websocket_test/node_modules/es6-iterator/valid-iterable.js deleted file mode 100644 index 8c6e071..0000000 --- a/system/websocket_test/node_modules/es6-iterator/valid-iterable.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var isIterable = require("./is-iterable"); - -module.exports = function (value) { - if (!isIterable(value)) throw new TypeError(value + " is not iterable"); - return value; -}; diff --git a/system/websocket_test/node_modules/es6-symbol/.testignore b/system/websocket_test/node_modules/es6-symbol/.testignore deleted file mode 100644 index b5b5cd1..0000000 --- a/system/websocket_test/node_modules/es6-symbol/.testignore +++ /dev/null @@ -1 +0,0 @@ -/lib/private diff --git a/system/websocket_test/node_modules/es6-symbol/CHANGELOG.md b/system/websocket_test/node_modules/es6-symbol/CHANGELOG.md deleted file mode 100644 index ff78d44..0000000 --- a/system/websocket_test/node_modules/es6-symbol/CHANGELOG.md +++ /dev/null @@ -1,22 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [3.1.4](https://github.com/medikoo/es6-symbol/compare/v3.1.3...v3.1.4) (2024-03-01) - -_Maintenance Improvements_ - -### [3.1.3](https://github.com/medikoo/es6-symbol/compare/v3.1.2...v3.1.3) (2019-10-29) - -_Maintenance Improvements_ - -### [3.1.2](https://github.com/medikoo/es6-symbol/compare/v3.1.1...v3.1.2) (2019-09-04) - -- Access `Symbol` from a global object. Makes implementation more bulletproof, as it's safe against shadowing the `Symbol` variable e.g. in script scope, or as it's practiced by some bundlers as Webpack (thanks [@cyborgx37](https://github.com/medikoo/es6-symbol/pull/30)) -- Switch license from MIT to ISC -- Switch linter to ESLint -- Configure Prettier - -## Changelog for previous versions - -See `CHANGES` file diff --git a/system/websocket_test/node_modules/es6-symbol/CHANGES b/system/websocket_test/node_modules/es6-symbol/CHANGES deleted file mode 100644 index ef0cbda..0000000 --- a/system/websocket_test/node_modules/es6-symbol/CHANGES +++ /dev/null @@ -1,61 +0,0 @@ -For recent changelog see CHANGELOG.md - ------ - -v3.1.1 -- 2017.03.15 -* Improve documentation -* Improve error messages -* Update dependencies - -v3.1.0 -- 2016.06.03 -* Fix internals of symbol detection -* Ensure Symbol.prototype[Symbol.toPrimitive] in all cases returns primitive value - (fixes Node v6 support) -* Create native symbols whenver possible - -v3.0.2 -- 2015.12.12 -* Fix definition flow, so uneven state of Symbol implementation doesn't crash initialization of - polyfill. See #13 - -v3.0.1 -- 2015.10.22 -* Workaround for IE11 bug (reported in #12) - -v3.0.0 -- 2015.10.02 -* Reuse native symbols (e.g. iterator, toStringTag etc.) in a polyfill if they're available - Otherwise polyfill symbols may not be recognized by other functions -* Improve documentation - -v2.0.1 -- 2015.01.28 -* Fix Symbol.prototype[Symbol.isPrimitive] implementation -* Improve validation within Symbol.prototype.toString and - Symbol.prototype.valueOf - -v2.0.0 -- 2015.01.28 -* Update up to changes in specification: - * Implement `for` and `keyFor` - * Remove `Symbol.create` and `Symbol.isRegExp` - * Add `Symbol.match`, `Symbol.replace`, `Symbol.search`, `Symbol.species` and - `Symbol.split` -* Rename `validSymbol` to `validateSymbol` -* Improve documentation -* Remove dead test modules - -v1.0.0 -- 2015.01.26 -* Fix enumerability for symbol properties set normally (e.g. obj[symbol] = value) -* Introduce initialization via hidden constructor -* Fix isSymbol handling of polyfill values when native Symbol is present -* Fix spelling of LICENSE -* Configure lint scripts - -v0.1.1 -- 2014.10.07 -* Fix isImplemented, so it returns true in case of polyfill -* Improve documentations - -v0.1.0 -- 2014.04.28 -* Assure strictly npm dependencies -* Update to use latest versions of dependencies -* Fix implementation detection so it doesn't crash on `String(symbol)` -* throw on `new Symbol()` (as decided by TC39) - -v0.0.0 -- 2013.11.15 -* Initial (dev) version diff --git a/system/websocket_test/node_modules/es6-symbol/LICENSE b/system/websocket_test/node_modules/es6-symbol/LICENSE deleted file mode 100644 index 38d8a75..0000000 --- a/system/websocket_test/node_modules/es6-symbol/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2013-2024, Mariusz Nowak, @medikoo, medikoo.com - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/system/websocket_test/node_modules/es6-symbol/README.md b/system/websocket_test/node_modules/es6-symbol/README.md deleted file mode 100644 index e19f116..0000000 --- a/system/websocket_test/node_modules/es6-symbol/README.md +++ /dev/null @@ -1,102 +0,0 @@ -[![Build status][build-image]][build-url] -[![Tests coverage][cov-image]][cov-url] -[![npm version][npm-image]][npm-url] - -# es6-symbol - -## ECMAScript 6 Symbol polyfill - -For more information about symbols see following links - -- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html) -- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) -- [Specification](https://tc39.github.io/ecma262/#sec-symbol-objects) - -### Limitations - -Underneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely. - -### Usage - -If you'd like to use native version when it exists and fallback to [ponyfill](https://ponyfill.com) if it doesn't, use _es6-symbol_ as following: - -```javascript -var Symbol = require("es6-symbol"); -``` - -If you want to make sure your environment implements `Symbol` globally, do: - -```javascript -require("es6-symbol/implement"); -``` - -If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do: - -```javascript -var Symbol = require("es6-symbol/polyfill"); -``` - -#### API - -Best is to refer to [specification](https://tc39.github.io/ecma262/#sec-symbol-objects). Still if you want quick look, follow examples: - -```javascript -var Symbol = require("es6-symbol"); - -var symbol = Symbol("My custom symbol"); -var x = {}; - -x[symbol] = "foo"; -console.log(x[symbol]); -("foo"); - -// Detect iterable: -var iterator, result; -if (possiblyIterable[Symbol.iterator]) { - iterator = possiblyIterable[Symbol.iterator](); - result = iterator.next(); - while (!result.done) { - console.log(result.value); - result = iterator.next(); - } -} -``` - -### Installation - -#### NPM - -In your project path: - - $ npm install es6-symbol - -##### Browser - -To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) - -## Tests - - $ npm test - -## Security contact information - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - ---- - -
- - Get professional support for d with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- -[build-image]: https://github.com/medikoo/es6-symbol/workflows/Integrate/badge.svg -[build-url]: https://github.com/medikoo/es6-symbol/actions?query=workflow%3AIntegrate -[cov-image]: https://img.shields.io/codecov/c/github/medikoo/es6-symbol.svg -[cov-url]: https://codecov.io/gh/medikoo/es6-symbol -[npm-image]: https://img.shields.io/npm/v/es6-symbol.svg -[npm-url]: https://www.npmjs.com/package/es6-symbol diff --git a/system/websocket_test/node_modules/es6-symbol/implement.js b/system/websocket_test/node_modules/es6-symbol/implement.js deleted file mode 100644 index d62803b..0000000 --- a/system/websocket_test/node_modules/es6-symbol/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(require("ext/global-this"), "Symbol", { - value: require("./polyfill"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/es6-symbol/index.js b/system/websocket_test/node_modules/es6-symbol/index.js deleted file mode 100644 index fcd8a63..0000000 --- a/system/websocket_test/node_modules/es6-symbol/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() - ? require("ext/global-this").Symbol - : require("./polyfill"); diff --git a/system/websocket_test/node_modules/es6-symbol/is-implemented.js b/system/websocket_test/node_modules/es6-symbol/is-implemented.js deleted file mode 100644 index b85ec69..0000000 --- a/system/websocket_test/node_modules/es6-symbol/is-implemented.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -var global = require("ext/global-this") - , validTypes = { object: true, symbol: true }; - -module.exports = function () { - var Symbol = global.Symbol; - var symbol; - if (typeof Symbol !== "function") return false; - symbol = Symbol("test symbol"); - try { String(symbol); } - catch (e) { return false; } - - // Return 'true' also for polyfills - if (!validTypes[typeof Symbol.iterator]) return false; - if (!validTypes[typeof Symbol.toPrimitive]) return false; - if (!validTypes[typeof Symbol.toStringTag]) return false; - - return true; -}; diff --git a/system/websocket_test/node_modules/es6-symbol/is-native-implemented.js b/system/websocket_test/node_modules/es6-symbol/is-native-implemented.js deleted file mode 100644 index 254774a..0000000 --- a/system/websocket_test/node_modules/es6-symbol/is-native-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -// Exports true if environment provides native `Symbol` implementation - -"use strict"; - -var Symbol = require("ext/global-this").Symbol; - -module.exports = typeof Symbol === "function" && typeof Symbol() === "symbol"; diff --git a/system/websocket_test/node_modules/es6-symbol/is-symbol.js b/system/websocket_test/node_modules/es6-symbol/is-symbol.js deleted file mode 100644 index 66edd46..0000000 --- a/system/websocket_test/node_modules/es6-symbol/is-symbol.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -module.exports = function (value) { - if (!value) return false; - if (typeof value === "symbol") return true; - if (!value.constructor) return false; - if (value.constructor.name !== "Symbol") return false; - return value[value.constructor.toStringTag] === "Symbol"; -}; diff --git a/system/websocket_test/node_modules/es6-symbol/lib/private/generate-name.js b/system/websocket_test/node_modules/es6-symbol/lib/private/generate-name.js deleted file mode 100644 index 880f25e..0000000 --- a/system/websocket_test/node_modules/es6-symbol/lib/private/generate-name.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -var d = require("d"); - -var create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype; - -var created = create(null); -module.exports = function (desc) { - var postfix = 0, name, ie11BugWorkaround; - while (created[desc + (postfix || "")]) ++postfix; - desc += postfix || ""; - created[desc] = true; - name = "@@" + desc; - defineProperty( - objPrototype, name, - d.gs(null, function (value) { - // For IE11 issue see: - // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/ - // ie11-broken-getters-on-dom-objects - // https://github.com/medikoo/es6-symbol/issues/12 - if (ie11BugWorkaround) return; - ie11BugWorkaround = true; - defineProperty(this, name, d(value)); - ie11BugWorkaround = false; - }) - ); - return name; -}; diff --git a/system/websocket_test/node_modules/es6-symbol/lib/private/setup/standard-symbols.js b/system/websocket_test/node_modules/es6-symbol/lib/private/setup/standard-symbols.js deleted file mode 100644 index b25b171..0000000 --- a/system/websocket_test/node_modules/es6-symbol/lib/private/setup/standard-symbols.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -var d = require("d") - , NativeSymbol = require("ext/global-this").Symbol; - -module.exports = function (SymbolPolyfill) { - return Object.defineProperties(SymbolPolyfill, { - // To ensure proper interoperability with other native functions (e.g. Array.from) - // fallback to eventual native implementation of given symbol - hasInstance: d( - "", (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill("hasInstance") - ), - isConcatSpreadable: d( - "", - (NativeSymbol && NativeSymbol.isConcatSpreadable) || - SymbolPolyfill("isConcatSpreadable") - ), - iterator: d("", (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill("iterator")), - match: d("", (NativeSymbol && NativeSymbol.match) || SymbolPolyfill("match")), - replace: d("", (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill("replace")), - search: d("", (NativeSymbol && NativeSymbol.search) || SymbolPolyfill("search")), - species: d("", (NativeSymbol && NativeSymbol.species) || SymbolPolyfill("species")), - split: d("", (NativeSymbol && NativeSymbol.split) || SymbolPolyfill("split")), - toPrimitive: d( - "", (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill("toPrimitive") - ), - toStringTag: d( - "", (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill("toStringTag") - ), - unscopables: d( - "", (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill("unscopables") - ) - }); -}; diff --git a/system/websocket_test/node_modules/es6-symbol/lib/private/setup/symbol-registry.js b/system/websocket_test/node_modules/es6-symbol/lib/private/setup/symbol-registry.js deleted file mode 100644 index 29d198f..0000000 --- a/system/websocket_test/node_modules/es6-symbol/lib/private/setup/symbol-registry.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var d = require("d") - , validateSymbol = require("../../../validate-symbol"); - -var registry = Object.create(null); - -module.exports = function (SymbolPolyfill) { - return Object.defineProperties(SymbolPolyfill, { - for: d(function (key) { - if (registry[key]) return registry[key]; - return (registry[key] = SymbolPolyfill(String(key))); - }), - keyFor: d(function (symbol) { - var key; - validateSymbol(symbol); - for (key in registry) { - if (registry[key] === symbol) return key; - } - return undefined; - }) - }); -}; diff --git a/system/websocket_test/node_modules/es6-symbol/package.json b/system/websocket_test/node_modules/es6-symbol/package.json deleted file mode 100644 index a2cb8d0..0000000 --- a/system/websocket_test/node_modules/es6-symbol/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "name": "es6-symbol", - "version": "3.1.4", - "description": "ECMAScript 6 Symbol polyfill", - "author": "Mariusz Nowak (http://www.medikoo.com/)", - "keywords": [ - "symbol", - "private", - "property", - "es6", - "ecmascript", - "harmony", - "ponyfill", - "polyfill" - ], - "repository": "medikoo/es6-symbol", - "dependencies": { - "d": "^1.0.2", - "ext": "^1.7.0" - }, - "devDependencies": { - "eslint": "^8.57.0", - "eslint-config-medikoo": "^4.2.0", - "git-list-updated": "^1.2.1", - "github-release-from-cc-changelog": "^2.3.0", - "husky": "^4.3.8", - "lint-staged": "~13.2.3", - "nyc": "^15.1.0", - "prettier-elastic": "^2.8.8", - "tad": "^3.1.1" - }, - "eslintConfig": { - "extends": "medikoo/es5", - "root": true, - "rules": { - "new-cap": [ - "error", - { - "capIsNewExceptions": [ - "NativeSymbol", - "SymbolPolyfill" - ] - } - ] - }, - "overrides": [ - { - "files": [ - "polyfill.js" - ], - "rules": { - "func-names": "off" - } - }, - { - "files": [ - "test/*.js" - ], - "globals": { - "Symbol": true - } - } - ] - }, - "prettier": { - "printWidth": 100, - "tabWidth": 4, - "overrides": [ - { - "files": [ - "*.md", - "*.yml" - ], - "options": { - "tabWidth": 2 - } - } - ] - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.js": [ - "eslint" - ], - "*.{css,html,js,json,md,yaml,yml}": [ - "prettier -c" - ] - }, - "scripts": { - "coverage": "nyc npm test", - "lint": "eslint --ignore-path=.gitignore .", - "lint:updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'", - "prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettier-check:updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", - "prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettify:updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write", - "test": "tad" - }, - "engines": { - "node": ">=0.12" - }, - "license": "ISC" -} diff --git a/system/websocket_test/node_modules/es6-symbol/polyfill.js b/system/websocket_test/node_modules/es6-symbol/polyfill.js deleted file mode 100644 index 01a9e61..0000000 --- a/system/websocket_test/node_modules/es6-symbol/polyfill.js +++ /dev/null @@ -1,86 +0,0 @@ -// ES2015 Symbol polyfill for environments that do not (or partially) support it - -"use strict"; - -var d = require("d") - , validateSymbol = require("./validate-symbol") - , NativeSymbol = require("ext/global-this").Symbol - , generateName = require("./lib/private/generate-name") - , setupStandardSymbols = require("./lib/private/setup/standard-symbols") - , setupSymbolRegistry = require("./lib/private/setup/symbol-registry"); - -var create = Object.create - , defineProperties = Object.defineProperties - , defineProperty = Object.defineProperty; - -var SymbolPolyfill, HiddenSymbol, isNativeSafe; - -if (typeof NativeSymbol === "function") { - try { - String(NativeSymbol()); - isNativeSafe = true; - } catch (ignore) {} -} else { - NativeSymbol = null; -} - -// Internal constructor (not one exposed) for creating Symbol instances. -// This one is used to ensure that `someSymbol instanceof Symbol` always return false -HiddenSymbol = function Symbol(description) { - if (this instanceof HiddenSymbol) throw new TypeError("Symbol is not a constructor"); - return SymbolPolyfill(description); -}; - -// Exposed `Symbol` constructor -// (returns instances of HiddenSymbol) -module.exports = SymbolPolyfill = function Symbol(description) { - var symbol; - if (this instanceof Symbol) throw new TypeError("Symbol is not a constructor"); - if (isNativeSafe) return NativeSymbol(description); - symbol = create(HiddenSymbol.prototype); - description = description === undefined ? "" : String(description); - return defineProperties(symbol, { - __description__: d("", description), - __name__: d("", generateName(description)) - }); -}; - -setupStandardSymbols(SymbolPolyfill); -setupSymbolRegistry(SymbolPolyfill); - -// Internal tweaks for real symbol producer -defineProperties(HiddenSymbol.prototype, { - constructor: d(SymbolPolyfill), - toString: d("", function () { return this.__name__; }) -}); - -// Proper implementation of methods exposed on Symbol.prototype -// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype -defineProperties(SymbolPolyfill.prototype, { - toString: d(function () { return "Symbol (" + validateSymbol(this).__description__ + ")"; }), - valueOf: d(function () { return validateSymbol(this); }) -}); -defineProperty( - SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, - d("", function () { - var symbol = validateSymbol(this); - if (typeof symbol === "symbol") return symbol; - return symbol.toString(); - }) -); -defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d("c", "Symbol")); - -// Proper implementaton of toPrimitive and toStringTag for returned symbol instances -defineProperty( - HiddenSymbol.prototype, SymbolPolyfill.toStringTag, - d("c", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]) -); - -// Note: It's important to define `toPrimitive` as last one, as some implementations -// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols) -// And that may invoke error in definition flow: -// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149 -defineProperty( - HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, - d("c", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]) -); diff --git a/system/websocket_test/node_modules/es6-symbol/validate-symbol.js b/system/websocket_test/node_modules/es6-symbol/validate-symbol.js deleted file mode 100644 index bac6f54..0000000 --- a/system/websocket_test/node_modules/es6-symbol/validate-symbol.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var isSymbol = require("./is-symbol"); - -module.exports = function (value) { - if (!isSymbol(value)) throw new TypeError(value + " is not a symbol"); - return value; -}; diff --git a/system/websocket_test/node_modules/esniff/.prettierignore b/system/websocket_test/node_modules/esniff/.prettierignore deleted file mode 100644 index 17d71f3..0000000 --- a/system/websocket_test/node_modules/esniff/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -/coverage -/test/__playground diff --git a/system/websocket_test/node_modules/esniff/.testignore b/system/websocket_test/node_modules/esniff/.testignore deleted file mode 100644 index 18d1d20..0000000 --- a/system/websocket_test/node_modules/esniff/.testignore +++ /dev/null @@ -1,3 +0,0 @@ -lib/ident-next-pattern.js -lib/ident-start-pattern.js -test.js diff --git a/system/websocket_test/node_modules/esniff/CHANGELOG.md b/system/websocket_test/node_modules/esniff/CHANGELOG.md deleted file mode 100644 index 6a59ea7..0000000 --- a/system/websocket_test/node_modules/esniff/CHANGELOG.md +++ /dev/null @@ -1,64 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [2.0.1](https://github.com/medikoo/esniff/compare/v2.0.0...v2.0.1) (2024-02-21) - -### Bug Fixes - -- Fix release of operator char trigger event ([1309a18](https://github.com/medikoo/esniff/commit/1309a187ed9dd82aea9f3b9fc3bd4b986c005fcb)) - -## [2.0.0](https://github.com/medikoo/esniff/compare/v1.1.3...v2.0.0) (2024-02-19) - -### ⚠ BREAKING CHANGES - -- Main `esniff` interface changed from `code, trigger, callback` to `code, executor` where executor function is provided with emitter that provides access to internal parsing process -- Property and variable names resolution now respects ES2015+ language rules instead of ES5 -- Utilties were moved: - - `ensure-string-literal.js` -> `utils/ensure-string-literal.js` - - `is-string-literal.js` -> `utils/is-string-literal.js` - - `is-var-name-valid.js` -> `utils/is-variable-name.js` - -### Features - -- Replace parser with state machine based event driven variant ([0d9bf17](https://github.com/medikoo/esniff/commit/0d9bf1736c795a06d563ce550b50c8a3d90bf1a7)) -- Support ES2015 template strings syntax ([4016496](https://github.com/medikoo/esniff/commit/401649625c35174380fc5eabf5e77f479f09a46f)) -- Upgrade variable and property name patterns to ES2015+ ([7f2f4ab](https://github.com/medikoo/esniff/commit/7f2f4ab68b04d323a8fe305badac403629992656)) - -### Maintenance Improvements - -- Move basic utils into `utils` directory ([afc6ddf](https://github.com/medikoo/esniff/commit/afc6ddf3e3b0bb3b7c8708370d94dd47dc1bdf03)) -- Refactor `stripComments` to rely on main parser ([6d2dd7f](https://github.com/medikoo/esniff/commit/6d2dd7f916c0d54444df061ff0997481dc253f21)) -- Rely on `type` package instead of `es5-ext` ([2a79744](https://github.com/medikoo/esniff/commit/2a79744dff8c04e8dcccb63f0493c2d1e2e7f414)) - -### [1.1.3](https://github.com/medikoo/esniff/compare/v1.1.2...v1.1.3) (2024-01-04) - -### Maintenance Improvements - -- Improve `isVarNameValid` internals ([82138c2](https://github.com/medikoo/esniff/commit/82138c2b932debcfe6c5ab6db139889b5ff3d16c)) - -### [1.1.2](https://github.com/medikoo/esniff/compare/v1.1.1...v1.1.2) (2024-01-04) - -### Maintenance Improvements - -- Configure `.npmignore` ([1a67292](https://github.com/medikoo/esniff/commit/1a672927bf1367e335080e1dae312bb1fb6b79b1)) - -### [1.1.1](https://github.com/medikoo/esniff/compare/v1.1.0...v1.1.1) (2024-01-04) - -### Bug Fixes - -- Ensure to detect Windows EOL (`\r\n`) as single EOL ([72a17fe](https://github.com/medikoo/esniff/commit/72a17feed836432ef55864500b52853adf0ab9c3)) -- Fix column indexing in move function ([3c0a6cb](https://github.com/medikoo/esniff/commit/3c0a6cbd5f0955b2728595e55fdb7f4fc3703a95)) - -### Maintenance Improvements - -- Declare support for Node.js v0.10+ ([1eba1d6](https://github.com/medikoo/esniff/commit/1eba1d633b4850b4356aa56d17e80ce6d6e4fae4)) -- ESLint suggested improvements ([d7c65ef](https://github.com/medikoo/esniff/commit/d7c65ef71089cbc2cc83c8e7ae768252c5adb839)) -- Extract regular expression patterns into modules ([1b12cbe](https://github.com/medikoo/esniff/commit/1b12cbe08561fac17774ca77e8c05669774c6e1f)) -- Fix reference links in source code comments ([4787424](https://github.com/medikoo/esniff/commit/47874241eea6740edb0419e4372aa1aed1128a2c)) -- Replace `xlint` configuration with `eslint` ([f434553](https://github.com/medikoo/esniff/commit/f434553f5b997c3e01b72f7692d030df8bbf92c1)) -- Switch LICENSE from MIT to ISC ([cc33510](https://github.com/medikoo/esniff/commit/cc3351055c7b0ca34adc92922ca3321a5ebc85e5)) - -## Changelog for previous versions - -See `CHANGES` file diff --git a/system/websocket_test/node_modules/esniff/CHANGES b/system/websocket_test/node_modules/esniff/CHANGES deleted file mode 100644 index 0754cbf..0000000 --- a/system/websocket_test/node_modules/esniff/CHANGES +++ /dev/null @@ -1,38 +0,0 @@ -For recent changelog see CHANGELOG.md - ------ - -v1.1.0 -- 2016.08.12 -* Add isVarNameValid utility - -v1.0.0 -- 2015.09.03 -* Support methods in function resolver -* Allow operator chars as triggers -* `resolveSeparated` utility -* `resolveArguments` utility -* `isStringLiteral` utility -* `ensureStringLiteral` utility -* `stripComments` utility -* `resolveConcat` utility -* Fix bug in multiline comments handling -* Optimise and improve internal algorithms -* Simplify internal algorithm with cost of invalid `{} /regexp/` handling -* Improve arguments validation -* Reorganise private modules into lib folder -* Improve tests -* Fix spelling of LICENSE -* Update Travis CI configuration - -v0.1.1 -- 2014.08.08 -* Fix support for one character named functions in `function` utility. - Thanks @kamsi for picking this up -* Add lint configuration -* Update dependencies configuration - -v0.1.0 -- 2014.04.28 -* Assure strictly npm hosted dependencies -* Add accessedProperties resolver -* Expose whitespace maps as individual modules - -v0.0.0 -- 2013.11.06 -Initial (dev version) diff --git a/system/websocket_test/node_modules/esniff/LICENSE b/system/websocket_test/node_modules/esniff/LICENSE deleted file mode 100644 index 38d8a75..0000000 --- a/system/websocket_test/node_modules/esniff/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2013-2024, Mariusz Nowak, @medikoo, medikoo.com - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/system/websocket_test/node_modules/esniff/README.md b/system/websocket_test/node_modules/esniff/README.md deleted file mode 100644 index d75800c..0000000 --- a/system/websocket_test/node_modules/esniff/README.md +++ /dev/null @@ -1,130 +0,0 @@ -[![Build status][build-image]][build-url] -[![Tests coverage][cov-image]][cov-url] -[![npm version][npm-image]][npm-url] - -# esniff - -## Low footprint JavaScript source code parser - -Low footprint, fast source code parser, which allows you to find all code fragment occurrences with respect to all syntax rules that cannot be handled with plain regular expression search. - -It aims at use cases where we don't need full AST tree, but instead we're interested in finding usages of given function, property etc. in syntactically valid code. - -### Installation - -#### npm - - $ npm install esniff - -### Usage - -Using main module you can configure sophisticated parser on your own. However, first, **see preprared [API utilities](#API) that may already address use cases you have**. - -#### esniff(code, executor) - -- `code` - Code to parse -- `executor` - A function to be executed immediately by the constructor, It receives an `emitter` parameter. - -`emitter` emits following events: - -- `trigger:` - When char is a code character approached in code, that is not a whitespaces, is not in a middle of identificator, is not part of a comment, string, template string or regular expression. - -Emitter passes to listener and `accessor` object, which provides access to current parser state and allows to manipulate parsing process. `accessor` exposes following methods: - -- `skipCodePart(codePart)` - Skips forward through input _codePart_ assuming parser index points start of given part. Returns true if given `codePart` was found and index and skipped -- `skipIdentifier` - Skips approached identifier (can be function name or property name), returns `{ name, start, end }` meta object -- `skipWhitespace` - Skips any whitespace and comments founds at current parsing index -- `collectScope` - If at current index `(` character is found, it registers given paranthesis scope for registrations (it's content will be returned as one of the results after finished parsing) -- `stop` - Stops parsing process -- `index` - Returns currently parsed index -- `previousToken` - Previous non-whitespace character -- `scopeDepth` - Current scope depth -- `shouldCollectComments` - Whether data about code comments should be collected in the result - -##### Example - -Parse all `require(..)` calls: - -```javascript -var esniff = require("esniff"); - -var parseRequires = function (code) { - return esniff(code, function (emitter) { - emitter.on("trigger:r", function (accessor) { - if (accessor.previousToken === ".") return; - if (!accessor.skipCodePart("require")) return; - accessor.skipWhitespace(); - accessor.collectScope(); - }); - }); -}; - -console.log(parseRequires("var x = require('foo/bar')")); -[{ type: "scope", point: 17, column: 17, line: 1, raw: "'foo/bar'" }]; -``` - -#### Predefined utils for common use cases - -#### accessedProperties(objName) _(esniff/accessed-properties)_ - -Returns function which allows us to find all accessed property names on given object name - -```javascript -var findProperties = require("esniff/accessed-properties"); -var findContextProperties = findProperties("this"); - -var result = findContextProperties( - "var foo = \"0\"; this.bar = foo; this.someMethod(); otherFunction()" -); -console.log(result); // [ { name: 'bar', start: 20, end: 23 }, { name: 'someMethod', start: 36, end: 46 } ] -``` - -#### function(name[, options]) _(esniff/function)_ - -Returns function which allows us to find all occurrences of given function (or method) being invoked - -Through options we can restrict cases which we're after: - -- `asProperty` (default: `false`), on true will allow `x.name()` when we search for `name` calls -- `asPlain` (default: `true`), on true it allows plain calls e.g. `name()` when we search for `name`. Should be set to `false` if we're strictly about method calls. - -Setting both `asProperty` and `asPlain` to false, will always produce empty result - -```javascript -var findRequires = require("esniff/function")("require"); - -findRequires("var x = require('foo/bar')"); -// [{ point: 17, column: 17, line: 1, raw: '\'foo/bar\'' }] -``` - -#### resolveArguments(code[, limit]) _(esniff/resolve-arguments)_ - -Resolves expressions separated with commas, with additional `limit` you can specify after which number of arguments resolver should stop - -```javascript -var resolveArgs = require("esniff/resolve-arguments"); - -var result = resolveArgs("'raz', 'dwa', ['raz', 'dwa'], 'trzy'", 3); - -console.log(result); // ['"raz"', ' "dwa"', ' [\'raz\', \'dwa\']'] -``` - -### Limitations - -- _esniff_ assumes code that you pass is syntactically correct, it won't inform you about any syntax errors and may produce unexpected and nonsense results when such code is used. -- There's single case of syntactically correct code, which will make _esniff_ produce incorrect results, it's division made directly on object literal (e.g. `x = { foo: 'bar' } / 14`, esniff in that case will assume that `/` starts regular expression). Still there's not known use case where such code may make any sense, and many popular JS source code parsers share very same vulnerability. - -## Tests - - $ npm test - -## Security contact information - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - -[build-image]: https://github.com/medikoo/esniff/workflows/Integrate/badge.svg -[build-url]: https://github.com/medikoo/esniff/actions?query=workflow%3AIntegrate -[cov-image]: https://img.shields.io/codecov/c/github/medikoo/esniff.svg -[cov-url]: https://codecov.io/gh/medikoo/esniff -[npm-image]: https://img.shields.io/npm/v/esniff.svg -[npm-url]: https://www.npmjs.com/package/esniff diff --git a/system/websocket_test/node_modules/esniff/accessed-properties.js b/system/websocket_test/node_modules/esniff/accessed-properties.js deleted file mode 100644 index eb66855..0000000 --- a/system/websocket_test/node_modules/esniff/accessed-properties.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -var ensureString = require("type/string/ensure") - , esniff = require("./"); - -module.exports = function (objName) { - var length; - objName = ensureString(objName); - length = objName.length; - if (!length) throw new TypeError(objName + " is not valid object name"); - return function (code) { - var data = []; - code = ensureString(code); - esniff(code, function (emitter) { - emitter.on("trigger:" + objName[0], function (accessor) { - if (accessor.previousToken === ".") return; - if (!accessor.skipCodePart(objName)) return; - accessor.skipWhitespace(); - if (!accessor.skipCodePart(".")) return; - accessor.skipWhitespace(); - var identifierMeta = accessor.skipIdentifier(); - if (identifierMeta) data.push(identifierMeta); - }); - }); - return data; - }; -}; diff --git a/system/websocket_test/node_modules/esniff/function.js b/system/websocket_test/node_modules/esniff/function.js deleted file mode 100644 index 8ae78bd..0000000 --- a/system/websocket_test/node_modules/esniff/function.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -var ensureString = require("type/string/ensure") - , isValue = require("type/value/is") - , esniff = require("./"); - -module.exports = function (name/*, options*/) { - var options = Object(arguments[1]) - , asProperty = options.asProperty - , asPlain = isValue(options.asPlain) ? options.asPlain : true; - var length, names; - name = ensureString(name); - names = name.split(".").map(function (prop) { - prop = prop.trim(); - if (!prop) throw new TypeError(name + " is not valid function name"); - return prop; - }); - length = names.length; - return function (code) { - code = ensureString(code); - return esniff(code, function (emitter) { - emitter.on("trigger:" + names[0][0], function (accessor) { - if (accessor.previousToken === ".") { - if (!asProperty) return; - } else if (!asPlain) { - return; - } - for (var i = 0, propertyName; (propertyName = names[i]); ++i) { - if (!accessor.skipCodePart(propertyName)) return; - accessor.skipWhitespace(); - if (i < length - 1) { - if (!accessor.skipCodePart(".")) return; - accessor.skipWhitespace(); - } - } - accessor.collectScope(); - }); - }); - }; -}; diff --git a/system/websocket_test/node_modules/esniff/index.js b/system/websocket_test/node_modules/esniff/index.js deleted file mode 100644 index 0c0a871..0000000 --- a/system/websocket_test/node_modules/esniff/index.js +++ /dev/null @@ -1,323 +0,0 @@ -"use strict"; - -var ensureString = require("type/string/ensure") - , ensurePlainFunction = require("type/plain-function/ensure") - , from = require("es5-ext/array/from") - , primitiveSet = require("es5-ext/object/primitive-set") - , eventEmitter = require("event-emitter") - , allOff = require("event-emitter/all-off") - , d = require("d") - , eolSet = require("./lib/ws-eol") - , wsSet = require("./lib/ws") - , identStart = require("./lib/ident-start-pattern") - , identNext = require("./lib/ident-next-pattern"); - -var objHasOwnProperty = Object.prototype.hasOwnProperty - , preRegExpSet = primitiveSet.apply(null, from(";{=([,<>+-*/%&|^!~?:}")) - , nonNameSet = primitiveSet.apply(null, from(";{=([,<>+-*/%&|^!~?:})].`")) - , reIdentStart = new RegExp(identStart) - , reIdentNext = new RegExp(identNext); - -var code, index, char, state, columnIndex, line, quote, scopeDepth, templateContext, previousToken - , followsWhitespace, results, followsSkip, collectedScopeDatum, collectedScopeData - , collectedScopeDepth, commentDatum, shouldCollectComments; - -var handleEol = function () { - if (char === "\r" && code[index + 1] === "\n") char = code[++index]; - columnIndex = index + 1; - ++line; -}; - -var emitter = eventEmitter(); -var accessor = Object.create(null, { - skipCodePart: d(function (codePart) { - var codePartLength = codePart.length; - for (var i = 0; i < codePartLength; ++i) { - if (code[index + i] !== codePart[i]) return false; - } - index += codePartLength; - char = code[index]; - previousToken = code[index - 1]; - followsWhitespace = false; - followsSkip = true; - return true; - }), - skipIdentifier: d(function () { - if (!reIdentStart.test(char)) return null; - var startIndex = index; - var identifier = char; - while ((char = code[++index]) && reIdentNext.test(char)) identifier += char; - followsWhitespace = false; - followsSkip = true; - previousToken = code[index - 1]; - return { name: identifier, start: startIndex, end: index }; - }), - skipWhitespace: d(function () { - while (char) { - if (objHasOwnProperty.call(wsSet, char)) { - if (objHasOwnProperty.call(eolSet, char)) handleEol(); - } else if (char === "/") { - if (code[index + 1] === "/") { - // Single line comment - if (shouldCollectComments) { - commentDatum = { - type: "comment", - point: index, - line: line, - column: index - columnIndex - }; - } - index += 2; - char = code[index]; - while (char) { - if (objHasOwnProperty.call(eolSet, char)) { - if (commentDatum) { - commentDatum.endPoint = index; - results.push(commentDatum); - commentDatum = null; - } - handleEol(); - break; - } - char = code[++index]; - } - } else if (code[index + 1] === "*") { - if (shouldCollectComments) { - commentDatum = { - type: "comment", - point: index, - line: line, - column: index - columnIndex - }; - } - index += 2; - char = code[index]; - while (char) { - if (objHasOwnProperty.call(eolSet, char)) handleEol(); - if (char === "*" && code[index + 1] === "/") { - if (commentDatum) { - commentDatum.endPoint = index + 2; - results.push(commentDatum); - commentDatum = null; - } - char = code[++index]; - break; - } - char = code[++index]; - } - } else { - break; - } - } else { - break; - } - followsWhitespace = true; - followsSkip = true; - char = code[++index]; - } - }), - collectScope: d(function () { - if (char !== "(") return; - previousToken = char; - char = code[++index]; - followsSkip = true; - if (collectedScopeDatum) collectedScopeData.push(collectedScopeDepth, collectedScopeDatum); - collectedScopeDepth = ++scopeDepth; - collectedScopeDatum = { - type: "scope", - point: index + 1, - line: line, - column: index - columnIndex + 1 - }; - }), - stop: d(function () { state = null; }), - index: d.gs(function () { return index; }), - previousToken: d.gs(function () { return previousToken; }), - scopeDepth: d.gs(function () { return scopeDepth; }), - shouldCollectComments: d.gs( - function () { return shouldCollectComments; }, - function (value) { shouldCollectComments = Boolean(value); } - ) -}); - -module.exports = function (userCode, executor) { - code = ensureString(userCode); - executor = ensurePlainFunction(executor); - allOff(emitter); - executor(emitter, accessor); - index = -1; - state = "out"; - columnIndex = 0; - line = 1; - scopeDepth = 0; - templateContext = []; - previousToken = null; - followsWhitespace = true; - results = []; - followsSkip = false; - collectedScopeDatum = null; - collectedScopeData = []; - collectedScopeDepth = null; - - stateLoop: while (state) { - if (followsSkip) followsSkip = false; - else char = code[++index]; - if (!char) break; - - switch (state) { - case "out": - if (objHasOwnProperty.call(wsSet, char)) { - if (objHasOwnProperty.call(eolSet, char)) { - handleEol(); - } - followsWhitespace = true; - continue stateLoop; - } - if (char === "/") { - if (previousToken && objHasOwnProperty.call(preRegExpSet, previousToken)) { - state = "slashOrRegexp"; - } else { - state = "slash"; - } - } else if (char === "'" || char === "\"") { - state = "string"; - quote = char; - } else if (char === "`") { - state = "template"; - } else if (char === "(" || char === "{" || char === "[") { - ++scopeDepth; - } else if (char === ")" || char === "}" || char === "]") { - if (scopeDepth === collectedScopeDepth) { - collectedScopeDatum.raw = code.slice(collectedScopeDatum.point - 1, index); - results.push(collectedScopeDatum); - collectedScopeDatum = collectedScopeData.pop(); - collectedScopeDepth = collectedScopeData.pop(); - } - --scopeDepth; - if (char === "}") { - if (templateContext[templateContext.length - 1] === scopeDepth + 1) { - templateContext.pop(); - state = "template"; - } - } - } - if ( - !previousToken || - followsWhitespace || - objHasOwnProperty.call(nonNameSet, previousToken) || - objHasOwnProperty.call(nonNameSet, char) - ) { - emitter.emit("trigger:" + char, accessor); - if (followsSkip) continue stateLoop; - } - previousToken = char; - followsWhitespace = false; - continue stateLoop; - case "slashOrRegexp": - case "slash": - if (char === "/") { - if (shouldCollectComments) { - commentDatum = { - type: "comment", - point: index - 1, - line: line, - column: index - columnIndex - 1 - }; - } - state = "singleLineComment"; - } else if (char === "*") { - if (shouldCollectComments) { - commentDatum = { - type: "comment", - point: index - 1, - line: line, - column: index - columnIndex - 1 - }; - } - state = "multiLineComment"; - } else if (objHasOwnProperty.call(eolSet, char)) { - handleEol(); - followsWhitespace = true; - state = "out"; - continue stateLoop; - } else if (state === "slashOrRegexp") { - state = "regexp"; - } else { - state = "out"; - continue stateLoop; - } - break; - case "singleLineComment": - if (objHasOwnProperty.call(eolSet, char)) { - if (commentDatum) { - commentDatum.endPoint = index; - results.push(commentDatum); - commentDatum = null; - } - handleEol(); - followsWhitespace = true; - state = "out"; - } - continue stateLoop; - case "multiLineComment": - if (char === "*") state = "multiLineCommentStar"; - else if (objHasOwnProperty.call(eolSet, char)) handleEol(); - continue stateLoop; - case "multiLineCommentStar": - if (char === "/") { - followsWhitespace = true; - state = "out"; - if (commentDatum) { - commentDatum.endPoint = index + 1; - results.push(commentDatum); - commentDatum = null; - } - } else if (char !== "*") { - if (objHasOwnProperty.call(eolSet, char)) handleEol(); - state = "multiLineComment"; - } - continue stateLoop; - case "string": - if (char === "\\") state = "stringEscape"; - else if (char === quote) state = "out"; - break; - case "stringEscape": - if (objHasOwnProperty.call(eolSet, char)) handleEol(); - state = "string"; - break; - case "template": - if (char === "$") state = "templateDollar"; - else if (char === "\\") state = "templateEscape"; - else if (char === "`") state = "out"; - else if (objHasOwnProperty.call(eolSet, char)) handleEol(); - break; - case "templateEscape": - if (objHasOwnProperty.call(eolSet, char)) handleEol(); - state = "template"; - break; - case "templateDollar": - if (char === "{") { - templateContext.push(++scopeDepth); - state = "out"; - } else if (char !== "$") { - if (objHasOwnProperty.call(eolSet, char)) handleEol(); - state = "template"; - } - break; - case "regexp": - if (char === "\\") state = "regexpEscape"; - else if (char === "/") state = "out"; - break; - case "regexpEscape": - state = "regexp"; - break; - /* istanbul ignore next */ - default: - throw new Error("Unexpected state " + state); - } - previousToken = null; - followsWhitespace = false; - } - - return results; -}; diff --git a/system/websocket_test/node_modules/esniff/lib/ident-next-pattern.js b/system/websocket_test/node_modules/esniff/lib/ident-next-pattern.js deleted file mode 100644 index b217781..0000000 --- a/system/websocket_test/node_modules/esniff/lib/ident-next-pattern.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; - -// Stolen from excellent work by Mathias Bynens, see: -// http://mathiasbynens.be/notes/javascript-properties -// https://github.com/mathiasbynens/mothereff.in/blob/9cd5ec4649db25ae675aec25f428f3ddf3d9a087/js-properties/eff.js#L79 - -module.exports = - "[\\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC" + - "\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1" + - "\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587" + - "\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A" + - "\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A" + - "\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963" + - "\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2" + - "\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3" + - "\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33" + - "\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C" + - "\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2" + - "\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF" + - "\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39" + - "\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F" + - "\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F" + - "\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7" + - "\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39" + - "\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F" + - "\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9" + - "\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1" + - "\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48" + - "\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96" + - "\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF" + - "\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87" + - "\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB" + - "\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00" + - "\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84" + - "\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD" + - "\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288" + - "\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6" + - "\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F" + - "\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8" + - "\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773" + - "\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877" + - "\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D" + - "\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E" + - "\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59" + - "\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2" + - "\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D" + - "\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4" + - "\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D" + - "\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107" + - "\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149" + - "\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27" + - "\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE" + - "\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007" + - "\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA" + - "\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5" + - "\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F" + - "\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E" + - "\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7" + - "\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE" + - "\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD" + - "\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26" + - "\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9" + - "\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06" + - "\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44" + - "\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F" + - "\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A" + - "\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|" + - "\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D" + - "\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A" + - "\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D" + - "\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802" + - "[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E" + - "\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13" + - "\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7" + - "\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|" + - "\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34" + - "\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37" + - "\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30" + - "\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63" + - "\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5" + - "\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806" + - "[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C" + - "\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38" + - "\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43" + - "\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|" + - "\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D" + - "\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD" + - "\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6" + - "\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14" + - "\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5" + - "\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E" + - "\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A" + - "[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27" + - "\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52" + - "\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72" + - "\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9" + - "\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E" + - "[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]"; diff --git a/system/websocket_test/node_modules/esniff/lib/ident-start-pattern.js b/system/websocket_test/node_modules/esniff/lib/ident-start-pattern.js deleted file mode 100644 index 77dde64..0000000 --- a/system/websocket_test/node_modules/esniff/lib/ident-start-pattern.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; - -// Stolen from excellent work by Mathias Bynens, see: -// http://mathiasbynens.be/notes/javascript-properties -// https://github.com/mathiasbynens/mothereff.in/blob/9cd5ec4649db25ae675aec25f428f3ddf3d9a087/js-properties/eff.js#L79 - -module.exports = - "[\\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE" + - "\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1" + - "\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA" + - "\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF" + - "\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA" + - "\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950" + - "\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2" + - "\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10" + - "\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E" + - "\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9" + - "\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33" + - "\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90" + - "\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0" + - "\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61" + - "\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1" + - "\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F" + - "\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33" + - "\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F" + - "\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6" + - "\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055" + - "\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD" + - "\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288" + - "\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6" + - "\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C" + - "\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711" + - "\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877" + - "\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB" + - "\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE" + - "\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5" + - "\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59" + - "\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC" + - "\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C" + - "\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F" + - "\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2" + - "\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE" + - "\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE" + - "\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F" + - "\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF" + - "\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B" + - "\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E" + - "\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873" + - "\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF" + - "\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B" + - "\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD" + - "\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26" + - "\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6" + - "\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28" + - "\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D" + - "\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A" + - "\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800" + - "[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D" + - "\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A" + - "\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D" + - "\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05" + - "\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15" + - "\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33" + - "\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55" + - "\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF" + - "\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11" + - "\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33" + - "\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE" + - "\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808" + - "[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|" + - "\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F" + - "\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C" + - "[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835" + - "[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB" + - "\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39" + - "\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA" + - "\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88" + - "\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03" + - "\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47" + - "\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62" + - "\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B" + - "\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D" + - "[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]"; diff --git a/system/websocket_test/node_modules/esniff/lib/ws-eol.js b/system/websocket_test/node_modules/esniff/lib/ws-eol.js deleted file mode 100644 index 10e5cc8..0000000 --- a/system/websocket_test/node_modules/esniff/lib/ws-eol.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -var from = require("es5-ext/array/from") - , primitiveSet = require("es5-ext/object/primitive-set"); - -module.exports = primitiveSet.apply(null, from("\n\r\u2028\u2029")); diff --git a/system/websocket_test/node_modules/esniff/lib/ws-inline.js b/system/websocket_test/node_modules/esniff/lib/ws-inline.js deleted file mode 100644 index 0617bba..0000000 --- a/system/websocket_test/node_modules/esniff/lib/ws-inline.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var from = require("es5-ext/array/from") - , primitiveSet = require("es5-ext/object/primitive-set"); - -module.exports = primitiveSet.apply( - null, - from( - " \f\t\v​\u00a0\u1680​\u180e" + - "\u2000​\u2001\u2002​\u2003\u2004​\u2005\u2006​\u2007\u2008​\u2009\u200a" + - "​​​\u202f\u205f​\u3000" - ) -); diff --git a/system/websocket_test/node_modules/esniff/lib/ws.js b/system/websocket_test/node_modules/esniff/lib/ws.js deleted file mode 100644 index c2ea6fd..0000000 --- a/system/websocket_test/node_modules/esniff/lib/ws.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var primitiveSet = require("es5-ext/object/primitive-set") - , eol = require("./ws-eol") - , inline = require("./ws-inline"); - -module.exports = primitiveSet.apply(null, Object.keys(eol).concat(Object.keys(inline))); diff --git a/system/websocket_test/node_modules/esniff/package.json b/system/websocket_test/node_modules/esniff/package.json deleted file mode 100644 index 2c75a68..0000000 --- a/system/websocket_test/node_modules/esniff/package.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "name": "esniff", - "version": "2.0.1", - "description": "Low footprint ECMAScript source code parser", - "author": "Mariusz Nowak (http://www.medikoo.com/)", - "keywords": [ - "sniff", - "analyze", - "ast", - "parse", - "syntax", - "sniffer", - "detective", - "detect", - "find", - "search", - "source", - "code" - ], - "repository": "medikoo/esniff", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.62", - "event-emitter": "^0.3.5", - "type": "^2.7.2" - }, - "devDependencies": { - "eslint": "^8.56.0", - "eslint-config-medikoo": "^4.2.0", - "esprima": "^4.0.1", - "github-release-from-cc-changelog": "^2.3.0", - "nyc": "^15.1.0", - "prettier-elastic": "^2.7.1", - "tad": "^3.1.1" - }, - "eslintConfig": { - "extends": "medikoo/es5", - "root": true, - "overrides": [ - { - "files": [ - "index.js" - ], - "rules": { - "max-depth": "off" - } - }, - { - "files": [ - "index.js", - "utils/is-variable-name.js" - ], - "rules": { - "max-lines": "off" - } - }, - { - "files": [ - "utils/is-variable-name.js" - ], - "rules": { - "no-misleading-character-class": "off" - } - }, - { - "files": [ - "test/**" - ], - "env": { - "node": true - } - } - ] - }, - "eslintIgnore": [ - "/coverage", - "/test/__playground" - ], - "prettier": { - "printWidth": 100, - "tabWidth": 4, - "overrides": [ - { - "files": [ - "*.md", - "*.yml" - ], - "options": { - "tabWidth": 2 - } - } - ] - }, - "nyc": { - "all": true, - "exclude": [ - ".github", - "coverage/**", - "test/**", - "*.config.js" - ], - "reporter": [ - "lcov", - "html", - "text-summary" - ] - }, - "scripts": { - "coverage": "nyc npm test", - "lint": "eslint .", - "lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'", - "prettier-check": "prettier -c \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettier-check:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", - "prettify": "prettier --write \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettify:updated": "pipe-git-updated ---base=main -ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write", - "test": "node ./node_modules/tad/bin/tad" - }, - "engines": { - "node": ">=0.10" - }, - "license": "ISC" -} diff --git a/system/websocket_test/node_modules/esniff/resolve-arguments.js b/system/websocket_test/node_modules/esniff/resolve-arguments.js deleted file mode 100644 index 52ebb7c..0000000 --- a/system/websocket_test/node_modules/esniff/resolve-arguments.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var resolveSeparated = require("./resolve-separated"); - -module.exports = function (code/*, limit*/) { return resolveSeparated(code, ",", arguments[1]); }; diff --git a/system/websocket_test/node_modules/esniff/resolve-concat.js b/system/websocket_test/node_modules/esniff/resolve-concat.js deleted file mode 100644 index 7546db1..0000000 --- a/system/websocket_test/node_modules/esniff/resolve-concat.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var resolveSeparated = require("./resolve-separated"); - -module.exports = function (code/*, limit*/) { return resolveSeparated(code, "+", arguments[1]); }; diff --git a/system/websocket_test/node_modules/esniff/resolve-separated.js b/system/websocket_test/node_modules/esniff/resolve-separated.js deleted file mode 100644 index e31f64e..0000000 --- a/system/websocket_test/node_modules/esniff/resolve-separated.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -var from = require("es5-ext/array/from") - , ensureString = require("type/string/ensure") - , primitiveSet = require("es5-ext/object/primitive-set") - , esniff = require("./"); - -var allowedSeparators = primitiveSet.apply(null, from(".+-*/,&|;")); - -module.exports = function (code, sep/*, limit*/) { - var expressions, fromIndex, limit = arguments[2] || Infinity; - code = ensureString(code); - sep = ensureString(sep); - if (!allowedSeparators[sep]) throw new Error(sep + " is not supported separator"); - expressions = []; - fromIndex = 0; - esniff(code, function (emitter) { - emitter.on("trigger:" + sep, function (accessor) { - if (accessor.scopeDepth !== 0) return; - var index = accessor.index; - if (expressions.push(code.slice(fromIndex, index)) === limit) accessor.stop(); - fromIndex = index + 1; - }); - }); - if (expressions.length < limit) expressions.push(code.slice(fromIndex)); - return expressions; -}; diff --git a/system/websocket_test/node_modules/esniff/strip-comments.js b/system/websocket_test/node_modules/esniff/strip-comments.js deleted file mode 100644 index efdda51..0000000 --- a/system/websocket_test/node_modules/esniff/strip-comments.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -var repeat = require("es5-ext/string/#/repeat") - , esniff = require("./"); - -module.exports = exports = function (code/*, options*/) { - var options = Object(arguments[1]); - - var comments = esniff(code, function (emitter, accessor) { - accessor.shouldCollectComments = true; - }); - - if (!comments.length) return code; - var i = 0, result = []; - comments.forEach(function (commentMeta) { - result.push(code.slice(i, commentMeta.point)); - if (options.preserveLocation) { - result.push(repeat.call(" ", commentMeta.endPoint - commentMeta.point)); - } - i = commentMeta.endPoint; - }); - result.push(code.slice(i)); - return result.join(""); -}; diff --git a/system/websocket_test/node_modules/esniff/utils/ensure-string-literal.js b/system/websocket_test/node_modules/esniff/utils/ensure-string-literal.js deleted file mode 100644 index d2e6d52..0000000 --- a/system/websocket_test/node_modules/esniff/utils/ensure-string-literal.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var isStringLiteral = require("./is-string-literal"); - -module.exports = function (arg) { - if (isStringLiteral(arg)) return arg; - throw new TypeError(arg + " does not represent string literal"); -}; diff --git a/system/websocket_test/node_modules/esniff/utils/is-string-literal.js b/system/websocket_test/node_modules/esniff/utils/is-string-literal.js deleted file mode 100644 index 034e633..0000000 --- a/system/websocket_test/node_modules/esniff/utils/is-string-literal.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -var ensureString = require("type/string/ensure"); - -module.exports = function (str) { - var quote, i, char; - str = ensureString(str); - quote = str[0]; - if (quote !== "'" && quote !== "\"") return false; - i = 0; - char = str[++i]; - while (char) { - if (char === quote) break; - if (char === "\\") ++i; - char = str[++i]; - } - return Boolean(char && !str[i + 1]); -}; diff --git a/system/websocket_test/node_modules/esniff/utils/is-variable-name.js b/system/websocket_test/node_modules/esniff/utils/is-variable-name.js deleted file mode 100644 index 2845c04..0000000 --- a/system/websocket_test/node_modules/esniff/utils/is-variable-name.js +++ /dev/null @@ -1,216 +0,0 @@ -// Credit: Mathias Bynens -> https://mathiasbynens.be/demo/javascript-identifier-regex - -"use strict"; - -// https://github.com/mathiasbynens/mothereff.in/blob/9cd5ec4649db25ae675aec25f428f3ddf3d9a087/js-variables/eff.js#L83 -var isES6ReservedWord = RegExp.prototype.test.bind( - new RegExp( - "^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|" + - "with|await|break|catch|class|const|super|throw|while|yield|delete|export|import|" + - "public|return|static|switch|typeof|default|extends|finally|package|private|" + - "continue|debugger|function|arguments|interface|protected|implements|instanceof)$" - ) -); - -// https://github.com/mathiasbynens/mothereff.in/blob/9cd5ec4649db25ae675aec25f428f3ddf3d9a087/js-variables/eff.js#L78 -var isES6Identifier = RegExp.prototype.test.bind( - new RegExp( - "^(?:[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1" + - "\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386" + - "\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F" + - "\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E" + - "\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710" + - "\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A" + - "\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961" + - "\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2" + - "\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F" + - "\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C" + - "\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2" + - "\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10" + - "\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61" + - "\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F" + - "\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10" + - "\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C" + - "\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1" + - "\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61" + - "\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6" + - "\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D" + - "\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2" + - "\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C" + - "\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066" + - "\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA" + - "\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288" + - "\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5" + - "\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5" + - "\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8" + - "\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770" + - "\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5" + - "\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16" + - "\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF" + - "\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1" + - "\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D" + - "\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE" + - "\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4" + - "\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D" + - "\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188" + - "\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25" + - "\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE" + - "\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE" + - "\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F" + - "\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF" + - "\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F" + - "\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788" + - "\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822" + - "\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946" + - "\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE" + - "\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1" + - "\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4" + - "\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A" + - "\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D" + - "\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36" + - "\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F" + - "\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A" + - "\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800" + - "[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D" + - "\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A" + - "\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801" + - "[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|" + - "\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55" + - "\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39" + - "\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33" + - "\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55" + - "\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804" + - "[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76" + - "\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86" + - "\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F" + - "\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50" + - "\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB" + - "\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF" + - "\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C" + - "\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|" + - "\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F" + - "\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|" + - "\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|" + - "\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC" + - "\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14" + - "\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50" + - "\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34" + - "\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|" + - "\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27" + - "\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51" + - "\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A" + - "\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B" + - "\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D" + - "[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873" + - "[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D])(?:[$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6" + - "\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376" + - "\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5" + - "\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587" + - "\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2" + - "\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC" + - "\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B" + - "\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990" + - "\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8" + - "\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03" + - "\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38" + - "\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E" + - "\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0" + - "\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0" + - "\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10" + - "\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48" + - "\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83" + - "\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4" + - "\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7" + - "\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39" + - "\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63" + - "\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3" + - "\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE" + - "\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10" + - "\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63" + - "\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB" + - "\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3" + - "\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D" + - "\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9" + - "\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00" + - "\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84" + - "\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7" + - "\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D" + - "\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0" + - "\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F" + - "\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F" + - "\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734" + - "\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD" + - "\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5" + - "\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB" + - "\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89" + - "\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73" + - "\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6" + - "\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D" + - "\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE" + - "\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4" + - "\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC" + - "\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128" + - "\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E" + - "\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67" + - "\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE" + - "\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007" + - "\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA" + - "\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5" + - "\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F" + - "\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7" + - "\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD" + - "\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE" + - "\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD" + - "\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26" + - "\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9" + - "\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06" + - "\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44" + - "\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F" + - "\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19" + - "\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF" + - "\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C" + - "\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C" + - "\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D" + - "\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9" + - "\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802" + - "[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76" + - "\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7" + - "\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33" + - "\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6" + - "\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48" + - "\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA" + - "\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76" + - "\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37" + - "\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA" + - "\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30" + - "\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57" + - "\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9" + - "\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59" + - "\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806" + - "[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E" + - "\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|" + - "\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E" + - "\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59" + - "\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C" + - "[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D" + - "\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD" + - "\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6" + - "\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A" + - "\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46" + - "\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14" + - "\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2" + - "\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84" + - "\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B" + - "[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37" + - "\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59" + - "\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77" + - "\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9" + - "\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34" + - "\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E" + - "[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])*$" - ) -); - -module.exports = function (varName) { - return isES6Identifier(varName) && !isES6ReservedWord(varName); -}; diff --git a/system/websocket_test/node_modules/event-emitter/.lint b/system/websocket_test/node_modules/event-emitter/.lint deleted file mode 100644 index f76e528..0000000 --- a/system/websocket_test/node_modules/event-emitter/.lint +++ /dev/null @@ -1,15 +0,0 @@ -@root - -module -es5 - -indent 2 -maxlen 80 -tabs - -ass -plusplus -nomen - -./benchmark -predef+ console diff --git a/system/websocket_test/node_modules/event-emitter/.npmignore b/system/websocket_test/node_modules/event-emitter/.npmignore deleted file mode 100644 index 68ebfdd..0000000 --- a/system/websocket_test/node_modules/event-emitter/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -.DS_Store -/.lintcache -/node_modules diff --git a/system/websocket_test/node_modules/event-emitter/.testignore b/system/websocket_test/node_modules/event-emitter/.testignore deleted file mode 100644 index f9c8c38..0000000 --- a/system/websocket_test/node_modules/event-emitter/.testignore +++ /dev/null @@ -1 +0,0 @@ -/benchmark diff --git a/system/websocket_test/node_modules/event-emitter/.travis.yml b/system/websocket_test/node_modules/event-emitter/.travis.yml deleted file mode 100644 index 5f29034..0000000 --- a/system/websocket_test/node_modules/event-emitter/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -sudo: false # http://docs.travis-ci.com/user/workers/container-based-infrastructure/ -language: node_js -node_js: - - 0.12 - - 4 - - 6 - - 7 - -before_install: - - mkdir node_modules; ln -s ../ node_modules/event-emitter - -notifications: - email: - - medikoo+event-emitter@medikoo.com - -script: "npm test && npm run lint" diff --git a/system/websocket_test/node_modules/event-emitter/CHANGES b/system/websocket_test/node_modules/event-emitter/CHANGES deleted file mode 100644 index 3ac46ce..0000000 --- a/system/websocket_test/node_modules/event-emitter/CHANGES +++ /dev/null @@ -1,73 +0,0 @@ -v0.3.5 -- 2017.03.15 -* Improve documentation -* Update dependencies - -v0.3.4 -- 2015.10.02 -* Add `emitError` extension - -v0.3.3 -- 2015.01.30 -* Fix reference to module in benchmarks - -v0.3.2 -- 2015.01.20 -* Improve documentation -* Configure lint scripts -* Fix spelling of LICENSE - -v0.3.1 -- 2014.04.25 -* Fix redefinition of emit method in `pipe` -* Allow custom emit method name in `pipe` - -v0.3.0 -- 2014.04.24 -* Move out from lib folder -* Do not expose all utilities on main module -* Support objects which do not inherit from Object.prototype -* Improve arguments validation -* Improve internals -* Remove Makefile -* Improve documentation - -v0.2.2 -- 2013.06.05 -* `unify` functionality - -v0.2.1 -- 2012.09.21 -* hasListeners module -* Simplified internal id (improves performance a little), now it starts with - underscore (hint it's private). Abstracted it to external module to have it - one place -* Documentation cleanup - -v0.2.0 -- 2012.09.19 -* Trashed poor implementation of v0.1 and came up with something solid - -Changes: -* Improved performance -* Fixed bugs event-emitter is now cross-prototype safe and not affected by - unexpected methods attached to Object.prototype -* Removed support for optional "emitter" argument in `emit` method, it was - cumbersome to use, and should be solved just with event objects - -v0.1.5 -- 2012.08.06 -* (maintanance) Do not use descriptors for internal objects, it exposes V8 bugs - (only Node v0.6 branch) - -v0.1.4 -- 2012.06.13 -* Fix detachment of listeners added with 'once' - -v0.1.3 -- 2012.05.28 -* Updated es5-ext to latest version (v0.8) -* Cleared package.json so it's in npm friendly format - -v0.1.2 -- 2012.01.22 -* Support for emitter argument in emit function, this allows some listeners not - to be notified about event -* allOff - removes all listeners from object -* All methods returns self object -* Internal fixes -* Travis CI integration - -v0.1.1 -- 2011.08.08 -* Added TAD test suite to devDependencies, configured test commands. - Tests can be run with 'make test' or 'npm test' - -v0.1.0 -- 2011.08.08 -Initial version diff --git a/system/websocket_test/node_modules/event-emitter/LICENSE b/system/websocket_test/node_modules/event-emitter/LICENSE deleted file mode 100644 index ccb76f6..0000000 --- a/system/websocket_test/node_modules/event-emitter/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2015 Mariusz Nowak (www.medikoo.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/system/websocket_test/node_modules/event-emitter/README.md b/system/websocket_test/node_modules/event-emitter/README.md deleted file mode 100644 index 0499054..0000000 --- a/system/websocket_test/node_modules/event-emitter/README.md +++ /dev/null @@ -1,98 +0,0 @@ -# event-emitter -## Environment agnostic event emitter - -### Installation - - $ npm install event-emitter - -To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) - -### Usage - -```javascript -var ee = require('event-emitter'); - -var MyClass = function () { /* .. */ }; -ee(MyClass.prototype); // All instances of MyClass will expose event-emitter interface - -var emitter = new MyClass(), listener; - -emitter.on('test', listener = function (args) { - // … react to 'test' event -}); - -emitter.once('test', function (args) { - // … react to first 'test' event (invoked only once!) -}); - -emitter.emit('test', arg1, arg2/*…args*/); // Two above listeners invoked -emitter.emit('test', arg1, arg2/*…args*/); // Only first listener invoked - -emitter.off('test', listener); // Removed first listener -emitter.emit('test', arg1, arg2/*…args*/); // No listeners invoked -``` -### Additional utilities - -#### allOff(obj) _(event-emitter/all-off)_ - -Removes all listeners from given event emitter object - -#### hasListeners(obj[, name]) _(event-emitter/has-listeners)_ - -Whether object has some listeners attached to the object. -When `name` is provided, it checks listeners for specific event name - -```javascript -var emitter = ee(); -var hasListeners = require('event-emitter/has-listeners'); -var listener = function () {}; - -hasListeners(emitter); // false - -emitter.on('foo', listener); -hasListeners(emitter); // true -hasListeners(emitter, 'foo'); // true -hasListeners(emitter, 'bar'); // false - -emitter.off('foo', listener); -hasListeners(emitter, 'foo'); // false -``` - -#### pipe(source, target[, emitMethodName]) _(event-emitter/pipe)_ - -Pipes all events from _source_ emitter onto _target_ emitter (all events from _source_ emitter will be emitted also on _target_ emitter, but not other way). -Returns _pipe_ object which exposes `pipe.close` function. Invoke it to close configured _pipe_. -It works internally by redefinition of `emit` method, if in your interface this method is referenced differently, provide its name (or symbol) with third argument. - -#### unify(emitter1, emitter2) _(event-emitter/unify)_ - -Unifies event handling for two objects. Events emitted on _emitter1_ would be also emitted on _emitter2_, and other way back. -Non reversible. - -```javascript -var eeUnify = require('event-emitter/unify'); - -var emitter1 = ee(), listener1, listener3; -var emitter2 = ee(), listener2, listener4; - -emitter1.on('test', listener1 = function () { }); -emitter2.on('test', listener2 = function () { }); - -emitter1.emit('test'); // Invoked listener1 -emitter2.emit('test'); // Invoked listener2 - -var unify = eeUnify(emitter1, emitter2); - -emitter1.emit('test'); // Invoked listener1 and listener2 -emitter2.emit('test'); // Invoked listener1 and listener2 - -emitter1.on('test', listener3 = function () { }); -emitter2.on('test', listener4 = function () { }); - -emitter1.emit('test'); // Invoked listener1, listener2, listener3 and listener4 -emitter2.emit('test'); // Invoked listener1, listener2, listener3 and listener4 -``` - -### Tests [![Build Status](https://travis-ci.org/medikoo/event-emitter.png)](https://travis-ci.org/medikoo/event-emitter) - - $ npm test diff --git a/system/websocket_test/node_modules/event-emitter/all-off.js b/system/websocket_test/node_modules/event-emitter/all-off.js deleted file mode 100644 index 829be65..0000000 --- a/system/websocket_test/node_modules/event-emitter/all-off.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -var value = require('es5-ext/object/valid-object') - - , hasOwnProperty = Object.prototype.hasOwnProperty; - -module.exports = function (emitter/*, type*/) { - var type = arguments[1], data; - - value(emitter); - - if (type !== undefined) { - data = hasOwnProperty.call(emitter, '__ee__') && emitter.__ee__; - if (!data) return; - if (data[type]) delete data[type]; - return; - } - if (hasOwnProperty.call(emitter, '__ee__')) delete emitter.__ee__; -}; diff --git a/system/websocket_test/node_modules/event-emitter/benchmark/many-on.js b/system/websocket_test/node_modules/event-emitter/benchmark/many-on.js deleted file mode 100644 index e09bfde..0000000 --- a/system/websocket_test/node_modules/event-emitter/benchmark/many-on.js +++ /dev/null @@ -1,83 +0,0 @@ -'use strict'; - -// Benchmark comparing performance of event emit for many listeners -// To run it, do following in memoizee package path: -// -// $ npm install eventemitter2 signals -// $ node benchmark/many-on.js - -var forEach = require('es5-ext/object/for-each') - , pad = require('es5-ext/string/#/pad') - - , now = Date.now - - , time, count = 1000000, i, data = {} - , ee, native, ee2, signals, a = {}, b = {}; - -ee = (function () { - var ee = require('../')(); - ee.on('test', function () { return arguments; }); - ee.on('test', function () { return arguments; }); - return ee.on('test', function () { return arguments; }); -}()); - -native = (function () { - var ee = require('events'); - ee = new ee.EventEmitter(); - ee.on('test', function () { return arguments; }); - ee.on('test', function () { return arguments; }); - return ee.on('test', function () { return arguments; }); -}()); - -ee2 = (function () { - var ee = require('eventemitter2'); - ee = new ee.EventEmitter2(); - ee.on('test', function () { return arguments; }); - ee.on('test', function () { return arguments; }); - return ee.on('test', function () { return arguments; }); -}()); - -signals = (function () { - var Signal = require('signals') - , ee = { test: new Signal() }; - ee.test.add(function () { return arguments; }); - ee.test.add(function () { return arguments; }); - ee.test.add(function () { return arguments; }); - return ee; -}()); - -console.log("Emit for 3 listeners", "x" + count + ":\n"); - -i = count; -time = now(); -while (i--) { - ee.emit('test', a, b); -} -data["event-emitter (this implementation)"] = now() - time; - -i = count; -time = now(); -while (i--) { - native.emit('test', a, b); -} -data["EventEmitter (Node.js native)"] = now() - time; - -i = count; -time = now(); -while (i--) { - ee2.emit('test', a, b); -} -data.EventEmitter2 = now() - time; - -i = count; -time = now(); -while (i--) { - signals.test.dispatch(a, b); -} -data.Signals = now() - time; - -forEach(data, function (value, name, obj, index) { - console.log(index + 1 + ":", pad.call(value, " ", 5), name); -}, null, function (a, b) { - return this[a] - this[b]; -}); diff --git a/system/websocket_test/node_modules/event-emitter/benchmark/single-on.js b/system/websocket_test/node_modules/event-emitter/benchmark/single-on.js deleted file mode 100644 index 99decbd..0000000 --- a/system/websocket_test/node_modules/event-emitter/benchmark/single-on.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; - -// Benchmark comparing performance of event emit for single listener -// To run it, do following in memoizee package path: -// -// $ npm install eventemitter2 signals -// $ node benchmark/single-on.js - -var forEach = require('es5-ext/object/for-each') - , pad = require('es5-ext/string/#/pad') - - , now = Date.now - - , time, count = 1000000, i, data = {} - , ee, native, ee2, signals, a = {}, b = {}; - -ee = (function () { - var ee = require('../'); - return ee().on('test', function () { return arguments; }); -}()); - -native = (function () { - var ee = require('events'); - return (new ee.EventEmitter()).on('test', function () { return arguments; }); -}()); - -ee2 = (function () { - var ee = require('eventemitter2'); - return (new ee.EventEmitter2()).on('test', function () { return arguments; }); -}()); - -signals = (function () { - var Signal = require('signals') - , ee = { test: new Signal() }; - ee.test.add(function () { return arguments; }); - return ee; -}()); - -console.log("Emit for single listener", "x" + count + ":\n"); - -i = count; -time = now(); -while (i--) { - ee.emit('test', a, b); -} -data["event-emitter (this implementation)"] = now() - time; - -i = count; -time = now(); -while (i--) { - native.emit('test', a, b); -} -data["EventEmitter (Node.js native)"] = now() - time; - -i = count; -time = now(); -while (i--) { - ee2.emit('test', a, b); -} -data.EventEmitter2 = now() - time; - -i = count; -time = now(); -while (i--) { - signals.test.dispatch(a, b); -} -data.Signals = now() - time; - -forEach(data, function (value, name, obj, index) { - console.log(index + 1 + ":", pad.call(value, " ", 5), name); -}, null, function (a, b) { - return this[a] - this[b]; -}); diff --git a/system/websocket_test/node_modules/event-emitter/emit-error.js b/system/websocket_test/node_modules/event-emitter/emit-error.js deleted file mode 100644 index 769b4c5..0000000 --- a/system/websocket_test/node_modules/event-emitter/emit-error.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var ensureError = require('es5-ext/error/valid-error') - , ensureObject = require('es5-ext/object/valid-object') - - , hasOwnProperty = Object.prototype.hasOwnProperty; - -module.exports = function (err) { - (ensureObject(this) && ensureError(err)); - if (!hasOwnProperty.call(ensureObject(this), '__ee__')) throw err; - if (!this.__ee__.error) throw err; - this.emit('error', err); -}; diff --git a/system/websocket_test/node_modules/event-emitter/has-listeners.js b/system/websocket_test/node_modules/event-emitter/has-listeners.js deleted file mode 100644 index 8744522..0000000 --- a/system/websocket_test/node_modules/event-emitter/has-listeners.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -var isEmpty = require('es5-ext/object/is-empty') - , value = require('es5-ext/object/valid-value') - - , hasOwnProperty = Object.prototype.hasOwnProperty; - -module.exports = function (obj/*, type*/) { - var type; - value(obj); - type = arguments[1]; - if (arguments.length > 1) { - return hasOwnProperty.call(obj, '__ee__') && Boolean(obj.__ee__[type]); - } - return obj.hasOwnProperty('__ee__') && !isEmpty(obj.__ee__); -}; diff --git a/system/websocket_test/node_modules/event-emitter/index.js b/system/websocket_test/node_modules/event-emitter/index.js deleted file mode 100644 index c36d3e4..0000000 --- a/system/websocket_test/node_modules/event-emitter/index.js +++ /dev/null @@ -1,132 +0,0 @@ -'use strict'; - -var d = require('d') - , callable = require('es5-ext/object/valid-callable') - - , apply = Function.prototype.apply, call = Function.prototype.call - , create = Object.create, defineProperty = Object.defineProperty - , defineProperties = Object.defineProperties - , hasOwnProperty = Object.prototype.hasOwnProperty - , descriptor = { configurable: true, enumerable: false, writable: true } - - , on, once, off, emit, methods, descriptors, base; - -on = function (type, listener) { - var data; - - callable(listener); - - if (!hasOwnProperty.call(this, '__ee__')) { - data = descriptor.value = create(null); - defineProperty(this, '__ee__', descriptor); - descriptor.value = null; - } else { - data = this.__ee__; - } - if (!data[type]) data[type] = listener; - else if (typeof data[type] === 'object') data[type].push(listener); - else data[type] = [data[type], listener]; - - return this; -}; - -once = function (type, listener) { - var once, self; - - callable(listener); - self = this; - on.call(this, type, once = function () { - off.call(self, type, once); - apply.call(listener, this, arguments); - }); - - once.__eeOnceListener__ = listener; - return this; -}; - -off = function (type, listener) { - var data, listeners, candidate, i; - - callable(listener); - - if (!hasOwnProperty.call(this, '__ee__')) return this; - data = this.__ee__; - if (!data[type]) return this; - listeners = data[type]; - - if (typeof listeners === 'object') { - for (i = 0; (candidate = listeners[i]); ++i) { - if ((candidate === listener) || - (candidate.__eeOnceListener__ === listener)) { - if (listeners.length === 2) data[type] = listeners[i ? 0 : 1]; - else listeners.splice(i, 1); - } - } - } else { - if ((listeners === listener) || - (listeners.__eeOnceListener__ === listener)) { - delete data[type]; - } - } - - return this; -}; - -emit = function (type) { - var i, l, listener, listeners, args; - - if (!hasOwnProperty.call(this, '__ee__')) return; - listeners = this.__ee__[type]; - if (!listeners) return; - - if (typeof listeners === 'object') { - l = arguments.length; - args = new Array(l - 1); - for (i = 1; i < l; ++i) args[i - 1] = arguments[i]; - - listeners = listeners.slice(); - for (i = 0; (listener = listeners[i]); ++i) { - apply.call(listener, this, args); - } - } else { - switch (arguments.length) { - case 1: - call.call(listeners, this); - break; - case 2: - call.call(listeners, this, arguments[1]); - break; - case 3: - call.call(listeners, this, arguments[1], arguments[2]); - break; - default: - l = arguments.length; - args = new Array(l - 1); - for (i = 1; i < l; ++i) { - args[i - 1] = arguments[i]; - } - apply.call(listeners, this, args); - } - } -}; - -methods = { - on: on, - once: once, - off: off, - emit: emit -}; - -descriptors = { - on: d(on), - once: d(once), - off: d(off), - emit: d(emit) -}; - -base = defineProperties({}, descriptors); - -module.exports = exports = function (o) { - return (o == null) ? create(base) : defineProperties(Object(o), descriptors); -}; -exports.methods = methods; diff --git a/system/websocket_test/node_modules/event-emitter/package.json b/system/websocket_test/node_modules/event-emitter/package.json deleted file mode 100644 index 8784036..0000000 --- a/system/websocket_test/node_modules/event-emitter/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "event-emitter", - "version": "0.3.5", - "description": "Environment agnostic event emitter", - "author": "Mariusz Nowak (http://www.medikoo.com/)", - "keywords": [ - "event", - "events", - "trigger", - "observer", - "listener", - "emitter", - "pubsub" - ], - "repository": { - "type": "git", - "url": "git://github.com/medikoo/event-emitter.git" - }, - "dependencies": { - "es5-ext": "~0.10.14", - "d": "1" - }, - "devDependencies": { - "tad": "~0.2.7", - "xlint": "~0.2.2", - "xlint-jslint-medikoo": "~0.1.4" - }, - "scripts": { - "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", - "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", - "test": "node ./node_modules/tad/bin/tad" - }, - "license": "MIT" -} diff --git a/system/websocket_test/node_modules/event-emitter/pipe.js b/system/websocket_test/node_modules/event-emitter/pipe.js deleted file mode 100644 index 0088efe..0000000 --- a/system/websocket_test/node_modules/event-emitter/pipe.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -var aFrom = require('es5-ext/array/from') - , remove = require('es5-ext/array/#/remove') - , value = require('es5-ext/object/valid-object') - , d = require('d') - , emit = require('./').methods.emit - - , defineProperty = Object.defineProperty - , hasOwnProperty = Object.prototype.hasOwnProperty - , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - -module.exports = function (e1, e2/*, name*/) { - var pipes, pipe, desc, name; - - (value(e1) && value(e2)); - name = arguments[2]; - if (name === undefined) name = 'emit'; - - pipe = { - close: function () { remove.call(pipes, e2); } - }; - if (hasOwnProperty.call(e1, '__eePipes__')) { - (pipes = e1.__eePipes__).push(e2); - return pipe; - } - defineProperty(e1, '__eePipes__', d('c', pipes = [e2])); - desc = getOwnPropertyDescriptor(e1, name); - if (!desc) { - desc = d('c', undefined); - } else { - delete desc.get; - delete desc.set; - } - desc.value = function () { - var i, emitter, data = aFrom(pipes); - emit.apply(this, arguments); - for (i = 0; (emitter = data[i]); ++i) emit.apply(emitter, arguments); - }; - defineProperty(e1, name, desc); - return pipe; -}; diff --git a/system/websocket_test/node_modules/event-emitter/test/all-off.js b/system/websocket_test/node_modules/event-emitter/test/all-off.js deleted file mode 100644 index 8aa872e..0000000 --- a/system/websocket_test/node_modules/event-emitter/test/all-off.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -var ee = require('../'); - -module.exports = function (t, a) { - var x, count, count2; - - x = ee(); - count = 0; - count2 = 0; - x.on('foo', function () { - ++count; - }); - x.on('foo', function () { - ++count; - }); - x.on('bar', function () { - ++count2; - }); - x.on('bar', function () { - ++count2; - }); - t(x, 'foo'); - x.emit('foo'); - x.emit('bar'); - a(count, 0, "All off: type"); - a(count2, 2, "All off: ohter type"); - - count = 0; - count2 = 0; - x.on('foo', function () { - ++count; - }); - x.on('foo', function () { - ++count; - }); - x.on('bar', function () { - ++count2; - }); - x.on('bar', function () { - ++count2; - }); - t(x); - x.emit('foo'); - x.emit('bar'); - a(count, 0, "All off: type"); - a(count2, 0, "All off: other type"); -}; diff --git a/system/websocket_test/node_modules/event-emitter/test/emit-error.js b/system/websocket_test/node_modules/event-emitter/test/emit-error.js deleted file mode 100644 index edac350..0000000 --- a/system/websocket_test/node_modules/event-emitter/test/emit-error.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var customError = require('es5-ext/error/custom') - , ee = require('../'); - -module.exports = function (t, a) { - var x, error = customError('Some error', 'ERROR_TEST'), emitted; - - x = ee(); - a.throws(function () { t.call(x, error); }, 'ERROR_TEST'); - x.on('error', function (err) { emitted = err; }); - t.call(x, error); - a(emitted, error); -}; diff --git a/system/websocket_test/node_modules/event-emitter/test/has-listeners.js b/system/websocket_test/node_modules/event-emitter/test/has-listeners.js deleted file mode 100644 index 875b048..0000000 --- a/system/websocket_test/node_modules/event-emitter/test/has-listeners.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -var ee = require('../'); - -module.exports = function (t) { - var x, y; - return { - Any: function (a) { - a(t(true), false, "Primitive"); - a(t({ events: [] }), false, "Other object"); - a(t(x = ee()), false, "Emitter: empty"); - - x.on('test', y = function () {}); - a(t(x), true, "Emitter: full"); - x.off('test', y); - a(t(x), false, "Emitter: empty but touched"); - x.once('test', y = function () {}); - a(t(x), true, "Emitter: full: Once"); - x.off('test', y); - a(t(x), false, "Emitter: empty but touched by once"); - }, - Specific: function (a) { - a(t(true, 'test'), false, "Primitive"); - a(t({ events: [] }, 'test'), false, "Other object"); - a(t(x = ee(), 'test'), false, "Emitter: empty"); - - x.on('test', y = function () {}); - a(t(x, 'test'), true, "Emitter: full"); - a(t(x, 'foo'), false, "Emitter: full, other event"); - x.off('test', y); - a(t(x, 'test'), false, "Emitter: empty but touched"); - a(t(x, 'foo'), false, "Emitter: empty but touched, other event"); - - x.once('test', y = function () {}); - a(t(x, 'test'), true, "Emitter: full: Once"); - a(t(x, 'foo'), false, "Emitter: full: Once, other event"); - x.off('test', y); - a(t(x, 'test'), false, "Emitter: empty but touched by once"); - a(t(x, 'foo'), false, "Emitter: empty but touched by once, other event"); - } - }; -}; diff --git a/system/websocket_test/node_modules/event-emitter/test/index.js b/system/websocket_test/node_modules/event-emitter/test/index.js deleted file mode 100644 index c7c3f24..0000000 --- a/system/websocket_test/node_modules/event-emitter/test/index.js +++ /dev/null @@ -1,107 +0,0 @@ -'use strict'; - -module.exports = function (t, a) { - var x = t(), y, count, count2, count3, count4, test, listener1, listener2; - - x.emit('none'); - - test = "Once: "; - count = 0; - x.once('foo', function (a1, a2, a3) { - a(this, x, test + "Context"); - a.deep([a1, a2, a3], ['foo', x, 15], test + "Arguments"); - ++count; - }); - - x.emit('foobar'); - a(count, 0, test + "Not invoked on other event"); - x.emit('foo', 'foo', x, 15); - a(count, 1, test + "Emitted"); - x.emit('foo'); - a(count, 1, test + "Emitted once"); - - test = "On & Once: "; - count = 0; - x.on('foo', listener1 = function (a1, a2, a3) { - a(this, x, test + "Context"); - a.deep([a1, a2, a3], ['foo', x, 15], test + "Arguments"); - ++count; - }); - count2 = 0; - x.once('foo', listener2 = function (a1, a2, a3) { - a(this, x, test + "Context"); - a.deep([a1, a2, a3], ['foo', x, 15], test + "Arguments"); - ++count2; - }); - - x.emit('foobar'); - a(count, 0, test + "Not invoked on other event"); - x.emit('foo', 'foo', x, 15); - a(count, 1, test + "Emitted"); - x.emit('foo', 'foo', x, 15); - a(count, 2, test + "Emitted twice"); - a(count2, 1, test + "Emitted once"); - x.off('foo', listener1); - x.emit('foo'); - a(count, 2, test + "Not emitter after off"); - - count = 0; - x.once('foo', listener1 = function () { ++count; }); - - x.off('foo', listener1); - x.emit('foo'); - a(count, 0, "Once Off: Not emitted"); - - count = 0; - x.on('foo', listener2 = function () {}); - x.once('foo', listener1 = function () { ++count; }); - - x.off('foo', listener1); - x.emit('foo'); - a(count, 0, "Once Off (multi): Not emitted"); - x.off('foo', listener2); - - test = "Prototype Share: "; - - y = Object.create(x); - - count = 0; - count2 = 0; - count3 = 0; - count4 = 0; - x.on('foo', function () { - ++count; - }); - y.on('foo', function () { - ++count2; - }); - x.once('foo', function () { - ++count3; - }); - y.once('foo', function () { - ++count4; - }); - x.emit('foo'); - a(count, 1, test + "x on count"); - a(count2, 0, test + "y on count"); - a(count3, 1, test + "x once count"); - a(count4, 0, test + "y once count"); - - y.emit('foo'); - a(count, 1, test + "x on count"); - a(count2, 1, test + "y on count"); - a(count3, 1, test + "x once count"); - a(count4, 1, test + "y once count"); - - x.emit('foo'); - a(count, 2, test + "x on count"); - a(count2, 1, test + "y on count"); - a(count3, 1, test + "x once count"); - a(count4, 1, test + "y once count"); - - y.emit('foo'); - a(count, 2, test + "x on count"); - a(count2, 2, test + "y on count"); - a(count3, 1, test + "x once count"); - a(count4, 1, test + "y once count"); -}; diff --git a/system/websocket_test/node_modules/event-emitter/test/pipe.js b/system/websocket_test/node_modules/event-emitter/test/pipe.js deleted file mode 100644 index 9d15d6d..0000000 --- a/system/websocket_test/node_modules/event-emitter/test/pipe.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var ee = require('../'); - -module.exports = function (t, a) { - var x = {}, y = {}, z = {}, count, count2, count3, pipe; - - ee(x); - x = Object.create(x); - ee(y); - ee(z); - - count = 0; - count2 = 0; - count3 = 0; - x.on('foo', function () { - ++count; - }); - y.on('foo', function () { - ++count2; - }); - z.on('foo', function () { - ++count3; - }); - - x.emit('foo'); - a(count, 1, "Pre pipe, x"); - a(count2, 0, "Pre pipe, y"); - a(count3, 0, "Pre pipe, z"); - - pipe = t(x, y); - x.emit('foo'); - a(count, 2, "Post pipe, x"); - a(count2, 1, "Post pipe, y"); - a(count3, 0, "Post pipe, z"); - - y.emit('foo'); - a(count, 2, "Post pipe, on y, x"); - a(count2, 2, "Post pipe, on y, y"); - a(count3, 0, "Post pipe, on y, z"); - - t(x, z); - x.emit('foo'); - a(count, 3, "Post pipe z, x"); - a(count2, 3, "Post pipe z, y"); - a(count3, 1, "Post pipe z, z"); - - pipe.close(); - x.emit('foo'); - a(count, 4, "Close pipe y, x"); - a(count2, 3, "Close pipe y, y"); - a(count3, 2, "Close pipe y, z"); -}; diff --git a/system/websocket_test/node_modules/event-emitter/test/unify.js b/system/websocket_test/node_modules/event-emitter/test/unify.js deleted file mode 100644 index 69295e0..0000000 --- a/system/websocket_test/node_modules/event-emitter/test/unify.js +++ /dev/null @@ -1,123 +0,0 @@ -'use strict'; - -var ee = require('../'); - -module.exports = function (t) { - - return { - "": function (a) { - var x = {}, y = {}, z = {}, count, count2, count3; - - ee(x); - ee(y); - ee(z); - - count = 0; - count2 = 0; - count3 = 0; - x.on('foo', function () { ++count; }); - y.on('foo', function () { ++count2; }); - z.on('foo', function () { ++count3; }); - - x.emit('foo'); - a(count, 1, "Pre unify, x"); - a(count2, 0, "Pre unify, y"); - a(count3, 0, "Pre unify, z"); - - t(x, y); - a(x.__ee__, y.__ee__, "Post unify y"); - x.emit('foo'); - a(count, 2, "Post unify, x"); - a(count2, 1, "Post unify, y"); - a(count3, 0, "Post unify, z"); - - y.emit('foo'); - a(count, 3, "Post unify, on y, x"); - a(count2, 2, "Post unify, on y, y"); - a(count3, 0, "Post unify, on y, z"); - - t(x, z); - a(x.__ee__, x.__ee__, "Post unify z"); - x.emit('foo'); - a(count, 4, "Post unify z, x"); - a(count2, 3, "Post unify z, y"); - a(count3, 1, "Post unify z, z"); - }, - "On empty": function (a) { - var x = {}, y = {}, z = {}, count, count2, count3; - - ee(x); - ee(y); - ee(z); - - count = 0; - count2 = 0; - count3 = 0; - y.on('foo', function () { ++count2; }); - x.emit('foo'); - a(count, 0, "Pre unify, x"); - a(count2, 0, "Pre unify, y"); - a(count3, 0, "Pre unify, z"); - - t(x, y); - a(x.__ee__, y.__ee__, "Post unify y"); - x.on('foo', function () { ++count; }); - x.emit('foo'); - a(count, 1, "Post unify, x"); - a(count2, 1, "Post unify, y"); - a(count3, 0, "Post unify, z"); - - y.emit('foo'); - a(count, 2, "Post unify, on y, x"); - a(count2, 2, "Post unify, on y, y"); - a(count3, 0, "Post unify, on y, z"); - - t(x, z); - a(x.__ee__, z.__ee__, "Post unify z"); - z.on('foo', function () { ++count3; }); - x.emit('foo'); - a(count, 3, "Post unify z, x"); - a(count2, 3, "Post unify z, y"); - a(count3, 1, "Post unify z, z"); - }, - Many: function (a) { - var x = {}, y = {}, z = {}, count, count2, count3; - - ee(x); - ee(y); - ee(z); - - count = 0; - count2 = 0; - count3 = 0; - x.on('foo', function () { ++count; }); - y.on('foo', function () { ++count2; }); - y.on('foo', function () { ++count2; }); - z.on('foo', function () { ++count3; }); - - x.emit('foo'); - a(count, 1, "Pre unify, x"); - a(count2, 0, "Pre unify, y"); - a(count3, 0, "Pre unify, z"); - - t(x, y); - a(x.__ee__, y.__ee__, "Post unify y"); - x.emit('foo'); - a(count, 2, "Post unify, x"); - a(count2, 2, "Post unify, y"); - a(count3, 0, "Post unify, z"); - - y.emit('foo'); - a(count, 3, "Post unify, on y, x"); - a(count2, 4, "Post unify, on y, y"); - a(count3, 0, "Post unify, on y, z"); - - t(x, z); - a(x.__ee__, x.__ee__, "Post unify z"); - x.emit('foo'); - a(count, 4, "Post unify z, x"); - a(count2, 6, "Post unify z, y"); - a(count3, 1, "Post unify z, z"); - } - }; -}; diff --git a/system/websocket_test/node_modules/event-emitter/unify.js b/system/websocket_test/node_modules/event-emitter/unify.js deleted file mode 100644 index c6a858a..0000000 --- a/system/websocket_test/node_modules/event-emitter/unify.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -var forEach = require('es5-ext/object/for-each') - , validValue = require('es5-ext/object/valid-object') - - , push = Array.prototype.apply, defineProperty = Object.defineProperty - , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty - , d = { configurable: true, enumerable: false, writable: true }; - -module.exports = function (e1, e2) { - var data; - (validValue(e1) && validValue(e2)); - if (!hasOwnProperty.call(e1, '__ee__')) { - if (!hasOwnProperty.call(e2, '__ee__')) { - d.value = create(null); - defineProperty(e1, '__ee__', d); - defineProperty(e2, '__ee__', d); - d.value = null; - return; - } - d.value = e2.__ee__; - defineProperty(e1, '__ee__', d); - d.value = null; - return; - } - data = d.value = e1.__ee__; - if (!hasOwnProperty.call(e2, '__ee__')) { - defineProperty(e2, '__ee__', d); - d.value = null; - return; - } - if (data === e2.__ee__) return; - forEach(e2.__ee__, function (listener, name) { - if (!data[name]) { - data[name] = listener; - return; - } - if (typeof data[name] === 'object') { - if (typeof listener === 'object') push.apply(data[name], listener); - else data[name].push(listener); - } else if (typeof listener === 'object') { - listener.unshift(data[name]); - data[name] = listener; - } else { - data[name] = [data[name], listener]; - } - }); - defineProperty(e2, '__ee__', d); - d.value = null; -}; diff --git a/system/websocket_test/node_modules/ext/CHANGELOG.md b/system/websocket_test/node_modules/ext/CHANGELOG.md deleted file mode 100644 index 48bffa3..0000000 --- a/system/websocket_test/node_modules/ext/CHANGELOG.md +++ /dev/null @@ -1,89 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -## [1.7.0](https://github.com/medikoo/es5-ext/compare/v1.6.0...v1.7.0) (2022-08-31) - -### Features - -- `string.camelToHyphen` method ([b8ea4ab](https://github.com/medikoo/es5-ext/commit/b8ea4ab6c8b920ecdff224f9c92092e1c7f8cdfc)) -- `string.capitalize` method ([32e7360](https://github.com/medikoo/es5-ext/commit/32e736034bd27ed25d4566b22aa93aa66c7901cf)) - -## [1.6.0](https://github.com/medikoo/es5-ext/compare/v1.5.0...v1.6.0) (2021-09-24) - -### Features - -- `Object.clear` util ([a955da4](https://github.com/medikoo/es5-ext/commit/a955da41e65a25ad87a46234bae065f096abd1d2)) - -### Bug Fixes - -- Fix `Object.entries` to not return non enumerable properties ([44fb872](https://github.com/medikoo/es5-ext/commit/44fb87266617378d2f47a1a5baad6280bf6298a8)) - -## [1.5.0](https://github.com/medikoo/es5-ext/compare/v1.3.0...v1.5.0) (2021-08-23) - -### Features - -- `Promise.limit` ([060a05d](https://github.com/medikoo/es5-ext/commit/060a05d4751cd291c6dd7641f5a73ba9338ea7ab)) -- `String.prototype.includes` ([ceebe8d](https://github.com/medikoo/es5-ext/commit/ceebe8dfd6f479d6a7e7b6cd79369291869ee2dd)) -- `charset` option for `String.random` ([2a20eeb](https://github.com/medikoo/es5-ext/commit/2a20eebc5ae784e5c1aacd2c54433fe92a9464c9)) - -## [1.4.0](https://github.com///compare/v1.3.0...v1.4.0) (2019-11-29) - -### Features - -- `charset` option for `String.random` ([2a20eeb](https://github.com///commit/2a20eebc5ae784e5c1aacd2c54433fe92a9464c9)) -- `String.prototype.includes` implementation ([ceebe8d](https://github.com///commit/ceebe8dfd6f479d6a7e7b6cd79369291869ee2dd)) - -## [1.3.0](https://github.com///compare/v1.2.1...v1.3.0) (2019-11-28) - -### Features - -- `String.random` util ([5b5860a](https://github.com///commit/5b5860ac545b05f00527e00295fdb4f97e4a4e5b)) - -### [1.2.1](https://github.com///compare/v1.2.0...v1.2.1) (2019-11-26) - -## [1.2.0](https://github.com/medikoo/ext/compare/v1.1.2...v1.2.0) (2019-11-07) - -### Features - -- ceil10, floor10 and round10 for Math ([6a2bc4b](https://github.com/medikoo/ext/commit/6a2bc4b)) - -### [1.1.2](https://github.com/medikoo/ext/compare/v1.1.1...v1.1.2) (2019-10-29) - -### Bug Fixes - -- Improve globalThis detection ([470862d](https://github.com/medikoo/ext/commit/470862d)) - -### [1.1.1](https://github.com/medikoo/ext/compare/v1.1.0...v1.1.1) (2019-10-29) - -### Bug Fixes - -- Provide naive fallback for sealed Object.prototype case ([a8d528b](https://github.com/medikoo/ext/commit/a8d528b)) -- Workaournd Safari incompatibility case ([0b051e6](https://github.com/medikoo/ext/commit/0b051e6)) - -## [1.1.0](https://github.com/medikoo/ext/compare/v1.0.3...v1.1.0) (2019-10-21) - -### Features - -- Object.entries implementation ([cf51e45](https://github.com/medikoo/ext/commit/cf51e45)) - -### [1.0.3](https://github.com/medikoo/ext/compare/v1.0.1...v1.0.3) (2019-07-03) - -Remove obsolete files from publication - -### [1.0.2](https://github.com/medikoo/ext/compare/v1.0.1...v1.0.2) (2019-07-03) - -(no changes) - -### [1.0.1](https://github.com/medikoo/ext/compare/v1.0.0...v1.0.1) (2019-07-03) - -Prettify - -## 1.0.0 (2019-07-03) - -### Features - -- `function/identity` (adapted from `es5-ext`) ([f0102af](https://github.com/medikoo/ext/commit/f0102af)) -- `thenable/finally` (adapted from `es5-ext`) ([a8494ac](https://github.com/medikoo/ext/commit/a8494ac)) -- `global-this/is-implemented` ([3a80904](https://github.com/medikoo/ext/commit/3a80904)) -- `globalThis` (mostly adapted from `es5-ext`) ([6559bd3](https://github.com/medikoo/ext/commit/6559bd3)) diff --git a/system/websocket_test/node_modules/ext/LICENSE b/system/websocket_test/node_modules/ext/LICENSE deleted file mode 100644 index 7df6b3d..0000000 --- a/system/websocket_test/node_modules/ext/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2011-2022, Mariusz Nowak, @medikoo, medikoo.com - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/system/websocket_test/node_modules/ext/README.md b/system/websocket_test/node_modules/ext/README.md deleted file mode 100644 index 29491e2..0000000 --- a/system/websocket_test/node_modules/ext/README.md +++ /dev/null @@ -1,46 +0,0 @@ -[![Build status][build-image]][build-url] -[![npm version][npm-image]][npm-url] - -# ext - -_(Previously known as `es5-ext`)_ - -## JavaScript language extensions (with respect to evolving standard) - -Non-standard or soon to be standard language utilities in a future proof, non-invasive form. - -Doesn't enforce transpilation step. Where it's applicable utilities/extensions are safe to use in all ES3+ implementations. - -### Installation - -```bash -npm install ext -``` - -### Utilities - -- [`globalThis`](docs/global-this.md) -- `Function` - - [`identity`](docs/function/identity.md) -- `Math` - - [`ceil10`](docs/math/ceil-10.md) - - [`floor10`](docs/math/floor-10.md) - - [`round10`](docs/math/round-10.md) -- `Object` - - [`clear`](docs/object/clear.md) - - [`entries`](docs/object/entries.md) -- `Promise` - - [`limit`](docs/promise/limit.md) -- `String` - - [`random`](docs/string/random.md) -- `String.prototype` - - [`campelToHyphen`](docs/string_/camel-to-hyphen.md) - - [`capitalize`](docs/string_/capitalize.md) - - [`includes`](docs/string_/includes.md) -- `Thenable.prototype` - - [`finally`](docs/thenable_/finally.md) - -[build-image]: https://github.com/medikoo/es5-ext/workflows/Integrate%20[ext]/badge.svg -[build-url]: https://github.com/medikoo/es5-ext/actions?query=workflow%3AIntegrate%20[ext] -[npm-image]: https://img.shields.io/npm/v/ext.svg -[npm-url]: https://www.npmjs.com/package/ext diff --git a/system/websocket_test/node_modules/ext/docs/function/identity.md b/system/websocket_test/node_modules/ext/docs/function/identity.md deleted file mode 100644 index b6a5c1d..0000000 --- a/system/websocket_test/node_modules/ext/docs/function/identity.md +++ /dev/null @@ -1,9 +0,0 @@ -# `Function.identity` _(ext/function/identity)_ - -Returns input argument. - -```javascript -const identity = require("ext/function/identity"); - -identity("foo"); // "foo" -``` diff --git a/system/websocket_test/node_modules/ext/docs/global-this.md b/system/websocket_test/node_modules/ext/docs/global-this.md deleted file mode 100644 index fafd422..0000000 --- a/system/websocket_test/node_modules/ext/docs/global-this.md +++ /dev/null @@ -1,9 +0,0 @@ -# `globalThis` _(ext/global-this)_ - -Returns global object. Resolve native [globalThis](https://github.com/tc39/proposal-global) if implemented, otherwise fallback to internal resolution of a global object. - -```javascript -const globalThis = require("ext/global-this"); - -globalThis.Array === Array; // true -``` diff --git a/system/websocket_test/node_modules/ext/docs/math/ceil-10.md b/system/websocket_test/node_modules/ext/docs/math/ceil-10.md deleted file mode 100644 index 1d53122..0000000 --- a/system/websocket_test/node_modules/ext/docs/math/ceil-10.md +++ /dev/null @@ -1,10 +0,0 @@ -# `Math.ceil10` _(ext/math/ceil-10)_ - -Decimal ceil - -```javascript -const ceil10 = require("ext/math/ceil-10"); - -ceil10(55.51, -1); // 55.6 -ceil10(-59, 1); // -50; -``` diff --git a/system/websocket_test/node_modules/ext/docs/math/floor-10.md b/system/websocket_test/node_modules/ext/docs/math/floor-10.md deleted file mode 100644 index 099c1b6..0000000 --- a/system/websocket_test/node_modules/ext/docs/math/floor-10.md +++ /dev/null @@ -1,10 +0,0 @@ -# `Math.floor10` _(ext/math/floor-10)_ - -Decimal floor - -```javascript -const floor10 = require("ext/math/floor-10"); - -floor10(55.59, -1); // 55.5 -floor10(59, 1); // 50 -``` diff --git a/system/websocket_test/node_modules/ext/docs/math/round-10.md b/system/websocket_test/node_modules/ext/docs/math/round-10.md deleted file mode 100644 index 727acb1..0000000 --- a/system/websocket_test/node_modules/ext/docs/math/round-10.md +++ /dev/null @@ -1,10 +0,0 @@ -# `Math.round10` _(ext/math/round-10)_ - -Decimal round - -```javascript -const round10 = require("ext/math/round-10"); - -round10(55.549, -1); // 55.5 -round10(1.005, -2); // 1.01 -``` diff --git a/system/websocket_test/node_modules/ext/docs/object/clear.md b/system/websocket_test/node_modules/ext/docs/object/clear.md deleted file mode 100644 index 468be1b..0000000 --- a/system/websocket_test/node_modules/ext/docs/object/clear.md +++ /dev/null @@ -1,12 +0,0 @@ -# `Object.clear` _(ext/object/clear)_ - -Deletes all own, enumerable, non-symbol properties in the object - -```javascript -const clear = require("ext/object/clear"); - -const obj = { foo: "bar" }; - -clear(obj); -Object.keys(obj); // [] -``` diff --git a/system/websocket_test/node_modules/ext/docs/object/entries.md b/system/websocket_test/node_modules/ext/docs/object/entries.md deleted file mode 100644 index 2d05f4c..0000000 --- a/system/websocket_test/node_modules/ext/docs/object/entries.md +++ /dev/null @@ -1,11 +0,0 @@ -# `Object.entries` _(ext/object/entries)_ - -[Object.entries](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries) implementation. - -Returns native `Object.entries` if it's implemented, otherwise library implementation is returned - -```javascript -const entries = require("ext/object/entries"); - -entries({ foo: "bar" }); // [["foo", "bar"]] -``` diff --git a/system/websocket_test/node_modules/ext/docs/promise/limit.md b/system/websocket_test/node_modules/ext/docs/promise/limit.md deleted file mode 100644 index 8b0ea38..0000000 --- a/system/websocket_test/node_modules/ext/docs/promise/limit.md +++ /dev/null @@ -1,13 +0,0 @@ -# `Promise.limit` _(ext/promise/limit)_ - -Helps to limit concurrency of asynchronous operations. - -```javascript -const limit = require("ext/promise/limit").bind(Promise); - -const limittedAsyncFunction = limit(2, asyncFunction); - -imittedAsyncFunction(); // Async operation started -imittedAsyncFunction(); // Async operation started -imittedAsyncFunction(); // On hold until one of previously started finalizes -``` diff --git a/system/websocket_test/node_modules/ext/docs/string/random.md b/system/websocket_test/node_modules/ext/docs/string/random.md deleted file mode 100644 index c3099e9..0000000 --- a/system/websocket_test/node_modules/ext/docs/string/random.md +++ /dev/null @@ -1,31 +0,0 @@ -# `String.random(options = { ... })` _(ext/string/random)_ - -Returns generated random string, contained only of ascii cars `a-z` and `0-1`. -By default returns string of length `10`. - -```javascript -const random = require("ext/string/random"); - -random(); // "upcfns0i4t" -random({ length: 3 }); // "5tw" -``` - -## Supported options: - -### `isUnique: false` - -Ensures generated string is unique among ones already returned. - -_Note: When not applying this setting, accidental generation of same string is still highly unlikely. Provided option is just to provide a mean to eliminate possibility of an edge case of duplicate string being returned_ - -### `length: 10` - -Desired length of result string - -### `charset: null` - -Fixed list of possible characters - -```javascript -random({ charset: "abc" }); // "bacbccbbac" -``` diff --git a/system/websocket_test/node_modules/ext/docs/string_/camel-to-hyphen.md b/system/websocket_test/node_modules/ext/docs/string_/camel-to-hyphen.md deleted file mode 100644 index e3e4c03..0000000 --- a/system/websocket_test/node_modules/ext/docs/string_/camel-to-hyphen.md +++ /dev/null @@ -1,9 +0,0 @@ -# `string.camelToHyphen()` _(ext/string\_/camel-to-hyphen)_ - -Convert camelCase string to hyphen separated, e.g. `oneTwoThree` into `one-to-three`. Useful when converting names from js property convention into filename convention. - -```javascript -const camelToHyphen = require("ext/string_/camelToHyphen"); - -camelToHyphen.call("razDwaTrzy"); // raz-dwa-trzy -``` diff --git a/system/websocket_test/node_modules/ext/docs/string_/capitalize.md b/system/websocket_test/node_modules/ext/docs/string_/capitalize.md deleted file mode 100644 index 319e194..0000000 --- a/system/websocket_test/node_modules/ext/docs/string_/capitalize.md +++ /dev/null @@ -1,9 +0,0 @@ -# `string.capitalize()` _(ext/string\_/capitalize)_ - -Capitalize input string, e.g. convert `this is a test` into `This is a test`. - -```javascript -const capitalize = require("ext/string_/capitalize"); - -capitalize.call("this is a test"); // This is a test -``` diff --git a/system/websocket_test/node_modules/ext/docs/string_/includes.md b/system/websocket_test/node_modules/ext/docs/string_/includes.md deleted file mode 100644 index 4fe1b58..0000000 --- a/system/websocket_test/node_modules/ext/docs/string_/includes.md +++ /dev/null @@ -1,10 +0,0 @@ -# `string.includes(position = 0)` _(ext/string\_/includes)_ - -`includes` method for strings. Resolve native [includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes) if implemented, otherwise fallback to shim implementation. - -```javascript -const includes = require("ext/string_/includes"); - -includes.call("razdwa", "raz"); // true -includes.call("razdwa", "trzy"); // false -``` diff --git a/system/websocket_test/node_modules/ext/docs/thenable_/finally.md b/system/websocket_test/node_modules/ext/docs/thenable_/finally.md deleted file mode 100644 index 978ce0c..0000000 --- a/system/websocket_test/node_modules/ext/docs/thenable_/finally.md +++ /dev/null @@ -1,9 +0,0 @@ -# `thenable.finally` _(ext/thenable\_/finally)_ - -`finally` method for any _thenable_ input - -```javascript -const finally = require("ext/thenable_/finally"); - -finally.call(thenable, () => console.log("Thenable resolved")); -``` diff --git a/system/websocket_test/node_modules/ext/function/identity.js b/system/websocket_test/node_modules/ext/function/identity.js deleted file mode 100644 index cde213f..0000000 --- a/system/websocket_test/node_modules/ext/function/identity.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = function (value) { return value; }; diff --git a/system/websocket_test/node_modules/ext/global-this/implementation.js b/system/websocket_test/node_modules/ext/global-this/implementation.js deleted file mode 100644 index 6a06d52..0000000 --- a/system/websocket_test/node_modules/ext/global-this/implementation.js +++ /dev/null @@ -1,31 +0,0 @@ -var naiveFallback = function () { - if (typeof self === "object" && self) return self; - if (typeof window === "object" && window) return window; - throw new Error("Unable to resolve global `this`"); -}; - -module.exports = (function () { - if (this) return this; - - // Unexpected strict mode (may happen if e.g. bundled into ESM module) - - // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis - // In all ES5+ engines global object inherits from Object.prototype - // (if you approached one that doesn't please report) - try { - Object.defineProperty(Object.prototype, "__global__", { - get: function () { return this; }, - configurable: true - }); - } catch (error) { - // Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze) - return naiveFallback(); - } - try { - // Safari case (window.__global__ is resolved with global context, but __global__ does not) - if (!__global__) return naiveFallback(); - return __global__; - } finally { - delete Object.prototype.__global__; - } -})(); diff --git a/system/websocket_test/node_modules/ext/global-this/index.js b/system/websocket_test/node_modules/ext/global-this/index.js deleted file mode 100644 index 8a99c25..0000000 --- a/system/websocket_test/node_modules/ext/global-this/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? globalThis : require("./implementation"); diff --git a/system/websocket_test/node_modules/ext/global-this/is-implemented.js b/system/websocket_test/node_modules/ext/global-this/is-implemented.js deleted file mode 100644 index 3eae23e..0000000 --- a/system/websocket_test/node_modules/ext/global-this/is-implemented.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = function () { - if (typeof globalThis !== "object") return false; - if (!globalThis) return false; - return globalThis.Array === Array; -}; diff --git a/system/websocket_test/node_modules/ext/lib/private/decimal-adjust.js b/system/websocket_test/node_modules/ext/lib/private/decimal-adjust.js deleted file mode 100644 index e04cde9..0000000 --- a/system/websocket_test/node_modules/ext/lib/private/decimal-adjust.js +++ /dev/null @@ -1,29 +0,0 @@ -// Credit: -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round -// #Decimal_rounding - -"use strict"; - -var isValue = require("type/object/is") - , ensureInteger = require("type/integer/ensure"); - -var split = String.prototype.split; - -module.exports = function (type) { - return function (value/*, exp*/) { - value = Number(value); - var exp = arguments[1]; - if (isValue(exp)) exp = ensureInteger(exp); - if (!value) return value; - if (!exp) return Math[type](value); - if (!isFinite(value)) return value; - - // Shift - var tokens = split.call(value, "e"); - value = Math[type](tokens[0] + "e" + ((tokens[1] || 0) - exp)); - - // Shift back - tokens = value.toString().split("e"); - return Number(tokens[0] + "e" + (Number(tokens[1] || 0) + exp)); - }; -}; diff --git a/system/websocket_test/node_modules/ext/lib/private/define-function-length.js b/system/websocket_test/node_modules/ext/lib/private/define-function-length.js deleted file mode 100644 index 4db3228..0000000 --- a/system/websocket_test/node_modules/ext/lib/private/define-function-length.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; - -var test = function (arg1, arg2) { return arg2; }; - -try { - Object.defineProperty(test, "length", { - configurable: true, - writable: false, - enumerable: false, - value: 1 - }); -} -catch (ignore) {} - -if (test.length === 1) { - // ES2015+ - var desc = { configurable: true, writable: false, enumerable: false }; - module.exports = function (length, fn) { - if (fn.length === length) return fn; - desc.value = length; - return Object.defineProperty(fn, "length", desc); - }; - return; -} - -module.exports = function (length, fn) { - if (fn.length === length) return fn; - switch (length) { - case 0: - return function () { return fn.apply(this, arguments); }; - case 1: - return function (ignored1) { return fn.apply(this, arguments); }; - case 2: - return function (ignored1, ignored2) { return fn.apply(this, arguments); }; - case 3: - return function (ignored1, ignored2, ignored3) { return fn.apply(this, arguments); }; - case 4: - return function (ignored1, ignored2, ignored3, ignored4) { - return fn.apply(this, arguments); - }; - case 5: - return function (ignored1, ignored2, ignored3, ignored4, ignored5) { - return fn.apply(this, arguments); - }; - case 6: - return function (ignored1, ignored2, ignored3, ignored4, ignored5, ignored6) { - return fn.apply(this, arguments); - }; - case 7: - return function (ignored1, ignored2, ignored3, ignored4, ignored5, ignored6, ignored7) { - return fn.apply(this, arguments); - }; - default: - throw new Error("Usupported function length"); - } -}; diff --git a/system/websocket_test/node_modules/ext/math/ceil-10.js b/system/websocket_test/node_modules/ext/math/ceil-10.js deleted file mode 100644 index c57a730..0000000 --- a/system/websocket_test/node_modules/ext/math/ceil-10.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("../lib/private/decimal-adjust")("ceil"); diff --git a/system/websocket_test/node_modules/ext/math/floor-10.js b/system/websocket_test/node_modules/ext/math/floor-10.js deleted file mode 100644 index 27dd1aa..0000000 --- a/system/websocket_test/node_modules/ext/math/floor-10.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("../lib/private/decimal-adjust")("floor"); diff --git a/system/websocket_test/node_modules/ext/math/round-10.js b/system/websocket_test/node_modules/ext/math/round-10.js deleted file mode 100644 index 643d676..0000000 --- a/system/websocket_test/node_modules/ext/math/round-10.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("../lib/private/decimal-adjust")("round"); diff --git a/system/websocket_test/node_modules/ext/object/clear.js b/system/websocket_test/node_modules/ext/object/clear.js deleted file mode 100644 index be3be2b..0000000 --- a/system/websocket_test/node_modules/ext/object/clear.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var ensureObject = require("type/object/ensure") - , ensure = require("type/ensure"); - -var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; - -module.exports = function (object) { - ensure(["object", object, ensureObject]); - for (var key in object) { - if (!objPropertyIsEnumerable.call(object, key)) continue; - delete object[key]; - } - return object; -}; diff --git a/system/websocket_test/node_modules/ext/object/entries/implement.js b/system/websocket_test/node_modules/ext/object/entries/implement.js deleted file mode 100644 index 383ceee..0000000 --- a/system/websocket_test/node_modules/ext/object/entries/implement.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -if (!require("./is-implemented")()) { - Object.defineProperty(Object, "entries", { - value: require("./implementation"), - configurable: true, - enumerable: false, - writable: true - }); -} diff --git a/system/websocket_test/node_modules/ext/object/entries/implementation.js b/system/websocket_test/node_modules/ext/object/entries/implementation.js deleted file mode 100644 index d6f121c..0000000 --- a/system/websocket_test/node_modules/ext/object/entries/implementation.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var ensureValue = require("type/value/ensure"); - -var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; - -module.exports = function (object) { - object = Object(ensureValue(object)); - var result = []; - for (var key in object) { - if (!objPropertyIsEnumerable.call(object, key)) continue; - result.push([key, object[key]]); - } - return result; -}; diff --git a/system/websocket_test/node_modules/ext/object/entries/index.js b/system/websocket_test/node_modules/ext/object/entries/index.js deleted file mode 100644 index 0a784d6..0000000 --- a/system/websocket_test/node_modules/ext/object/entries/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() ? Object.entries : require("./implementation"); diff --git a/system/websocket_test/node_modules/ext/object/entries/is-implemented.js b/system/websocket_test/node_modules/ext/object/entries/is-implemented.js deleted file mode 100644 index aad52b2..0000000 --- a/system/websocket_test/node_modules/ext/object/entries/is-implemented.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - try { return Object.entries({ foo: 12 })[0][0] === "foo"; } - catch (e) { return false; } -}; diff --git a/system/websocket_test/node_modules/ext/package.json b/system/websocket_test/node_modules/ext/package.json deleted file mode 100644 index 4bf9e12..0000000 --- a/system/websocket_test/node_modules/ext/package.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "name": "ext", - "version": "1.7.0", - "description": "JavaScript utilities with respect to emerging standard", - "author": "Mariusz Nowak (http://www.medikoo.com/)", - "keywords": [ - "ecmascript", - "es", - "es6", - "extensions", - "ext", - "addons", - "lodash", - "extras", - "harmony", - "javascript", - "polyfill", - "shim", - "util", - "utils", - "utilities" - ], - "repository": { - "type": "git", - "url": "https://github.com/medikoo/es5-ext#ext" - }, - "dependencies": { - "type": "^2.7.2" - }, - "devDependencies": { - "chai": "^4.3.6", - "eslint": "^8.23.0", - "eslint-config-medikoo": "^4.1.2", - "git-list-updated": "^1.2.1", - "github-release-from-cc-changelog": "^2.3.0", - "husky": "^4.3.8", - "lint-staged": "^13.0.3", - "mocha": "^6.2.3", - "nyc": "^15.1.0", - "prettier-elastic": "^2.2.1", - "sinon": "^8.1.1", - "timers-ext": "^0.1.7" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.js": [ - "eslint" - ], - "*.{css,html,js,json,md,yaml,yml}": [ - "prettier -c" - ] - }, - "eslintIgnore": [ - "_es5-ext" - ], - "eslintConfig": { - "extends": "medikoo/es3", - "root": true, - "overrides": [ - { - "files": "global-this/implementation.js", - "globals": { - "__global__": true, - "self": true, - "window": true - }, - "rules": { - "no-extend-native": "off", - "strict": "off" - } - }, - { - "files": [ - "global-this/is-implemented.js", - "global-this/index.js" - ], - "globals": { - "globalThis": true - } - }, - { - "files": "string_/camel-to-hyphen.js", - "rules": { - "id-length": "off" - } - }, - { - "files": "test/**/*.js", - "env": { - "mocha": true - } - }, - { - "files": [ - "test/promise/limit.js", - "test/thenable_/finally.js" - ], - "globals": { - "Promise": true - } - } - ] - }, - "prettier": { - "printWidth": 100, - "tabWidth": 4, - "overrides": [ - { - "files": [ - "*.md", - "*.yml" - ], - "options": { - "tabWidth": 2 - } - } - ] - }, - "mocha": { - "recursive": true - }, - "nyc": { - "all": true, - "exclude": [ - ".github", - "_es5-ext", - "coverage/**", - "test/**", - "*.config.js" - ], - "reporter": [ - "lcov", - "html", - "text-summary" - ] - }, - "scripts": { - "coverage": "nyc npm test", - "lint": "eslint .", - "lint:updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'", - "prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettier-check:updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", - "prettify": "prettier --write --ignore-path .gitignore '**/*.{css,html,js,json,md,yaml,yml}'", - "prettify:updated": "pipe-git-updated ---base=main -ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write", - "test": "mocha" - }, - "license": "ISC" -} diff --git a/system/websocket_test/node_modules/ext/promise/limit.js b/system/websocket_test/node_modules/ext/promise/limit.js deleted file mode 100644 index 841afad..0000000 --- a/system/websocket_test/node_modules/ext/promise/limit.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; - -var ensureNaturalNumber = require("type/natural-number/ensure") - , ensurePlainFunction = require("type/plain-function/ensure") - , ensure = require("type/ensure") - , defineFunctionLength = require("../lib/private/define-function-length"); - -module.exports = function (limit, callback) { - limit = ensure( - ["limit", limit, ensureNaturalNumber, { min: 1 }], - ["callback", callback, ensurePlainFunction] - )[0]; - - var Promise = this, ongoingCount = 0, pending = []; - var onSuccess, onFailure; - - var release = function () { - --ongoingCount; - if (ongoingCount >= limit) return; - var next = pending.shift(); - if (!next) return; - ++ongoingCount; - try { - next.resolve( - Promise.resolve(callback.apply(next.context, next.arguments)).then( - onSuccess, onFailure - ) - ); - } catch (exception) { - release(); - next.reject(exception); - } - }; - - onSuccess = function (value) { - release(); - return value; - }; - - onFailure = function (exception) { - release(); - throw exception; - }; - - return defineFunctionLength(callback.length, function () { - if (ongoingCount >= limit) { - var context = this, args = arguments; - return new Promise(function (resolve, reject) { - pending.push({ - context: context, - arguments: args, - resolve: resolve, - reject: reject - }); - }); - } - ++ongoingCount; - try { - return Promise.resolve(callback.apply(this, arguments)).then(onSuccess, onFailure); - } catch (exception) { return onFailure(exception); } - }); -}; diff --git a/system/websocket_test/node_modules/ext/string/random.js b/system/websocket_test/node_modules/ext/string/random.js deleted file mode 100644 index c96ef92..0000000 --- a/system/websocket_test/node_modules/ext/string/random.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; - -var isObject = require("type/object/is") - , ensureNaturalNumber = require("type/natural-number/ensure") - , ensureString = require("type/string/ensure"); - -var generated = Object.create(null), random = Math.random, uniqTryLimit = 100; - -var getChunk = function () { return random().toString(36).slice(2); }; - -var getString = function (length, charset) { - var str; - if (charset) { - var charsetLength = charset.length; - str = ""; - for (var i = 0; i < length; ++i) { - str += charset.charAt(Math.floor(Math.random() * charsetLength)); - } - return str; - } - str = getChunk(); - if (length === null) return str; - while (str.length < length) str += getChunk(); - return str.slice(0, length); -}; - -module.exports = function (/* options */) { - var options = arguments[0]; - if (!isObject(options)) options = {}; - var length = ensureNaturalNumber(options.length, { "default": 10 }) - , isUnique = options.isUnique - , charset = ensureString(options.charset, { isOptional: true }); - - var str = getString(length, charset); - if (isUnique) { - var count = 0; - while (generated[str]) { - if (++count === uniqTryLimit) { - throw new Error( - "Cannot generate random string.\n" + - "String.random is not designed to effectively generate many short and " + - "unique random strings" - ); - } - str = getString(length); - } - generated[str] = true; - } - return str; -}; diff --git a/system/websocket_test/node_modules/ext/string_/camel-to-hyphen.js b/system/websocket_test/node_modules/ext/string_/camel-to-hyphen.js deleted file mode 100644 index feffae6..0000000 --- a/system/websocket_test/node_modules/ext/string_/camel-to-hyphen.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; - -var ensureString = require("type/string/ensure") - , objHasOwnProperty = Object.prototype.hasOwnProperty; - -var capitalLetters = { - A: true, - B: true, - C: true, - D: true, - E: true, - F: true, - G: true, - H: true, - I: true, - J: true, - K: true, - L: true, - M: true, - N: true, - O: true, - P: true, - Q: true, - R: true, - S: true, - T: true, - U: true, - V: true, - W: true, - X: true, - Y: true, - Z: true -}; - -module.exports = function () { - var input = ensureString(this); - if (!input) return input; - var outputLetters = []; - for (var index = 0, letter; (letter = input[index]); ++index) { - if (objHasOwnProperty.call(capitalLetters, letter)) { - if (index) outputLetters.push("-"); - outputLetters.push(letter.toLowerCase()); - } else { - outputLetters.push(letter); - } - } - - return outputLetters.join(""); -}; diff --git a/system/websocket_test/node_modules/ext/string_/capitalize.js b/system/websocket_test/node_modules/ext/string_/capitalize.js deleted file mode 100644 index bc76311..0000000 --- a/system/websocket_test/node_modules/ext/string_/capitalize.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var ensureString = require("type/string/ensure"); - -module.exports = function () { - var input = ensureString(this); - if (!input) return input; - return input.charAt(0).toUpperCase() + input.slice(1); -}; diff --git a/system/websocket_test/node_modules/ext/string_/includes/implementation.js b/system/websocket_test/node_modules/ext/string_/includes/implementation.js deleted file mode 100644 index a7219f2..0000000 --- a/system/websocket_test/node_modules/ext/string_/includes/implementation.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -var indexOf = String.prototype.indexOf; - -module.exports = function (searchString/*, position*/) { - return indexOf.call(this, searchString, arguments[1]) > -1; -}; diff --git a/system/websocket_test/node_modules/ext/string_/includes/index.js b/system/websocket_test/node_modules/ext/string_/includes/index.js deleted file mode 100644 index ee4e284..0000000 --- a/system/websocket_test/node_modules/ext/string_/includes/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -module.exports = require("./is-implemented")() - ? String.prototype.includes - : require("./implementation"); diff --git a/system/websocket_test/node_modules/ext/string_/includes/is-implemented.js b/system/websocket_test/node_modules/ext/string_/includes/is-implemented.js deleted file mode 100644 index edc4515..0000000 --- a/system/websocket_test/node_modules/ext/string_/includes/is-implemented.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var str = "razdwatrzy"; - -module.exports = function () { - if (typeof str.includes !== "function") return false; - return str.includes("dwa") === true && str.includes("foo") === false; -}; diff --git a/system/websocket_test/node_modules/ext/thenable_/finally.js b/system/websocket_test/node_modules/ext/thenable_/finally.js deleted file mode 100644 index 42274bf..0000000 --- a/system/websocket_test/node_modules/ext/thenable_/finally.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -var ensurePlainFunction = require("type/plain-function/ensure") - , isThenable = require("type/thenable/is") - , ensureThenable = require("type/thenable/ensure"); - -var resolveCallback = function (callback, next) { - var callbackResult = callback(); - if (!isThenable(callbackResult)) return next(); - return callbackResult.then(next); -}; - -module.exports = function (callback) { - ensureThenable(this); - ensurePlainFunction(callback); - return this.then( - function (result) { - return resolveCallback(callback, function () { return result; }); - }, - function (error) { - return resolveCallback(callback, function () { throw error; }); - } - ); -}; diff --git a/system/websocket_test/node_modules/is-typedarray/LICENSE.md b/system/websocket_test/node_modules/is-typedarray/LICENSE.md deleted file mode 100644 index ee27ba4..0000000 --- a/system/websocket_test/node_modules/is-typedarray/LICENSE.md +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/system/websocket_test/node_modules/is-typedarray/README.md b/system/websocket_test/node_modules/is-typedarray/README.md deleted file mode 100644 index 2752863..0000000 --- a/system/websocket_test/node_modules/is-typedarray/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# is-typedarray [![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) - -Detect whether or not an object is a -[Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays). - -## Usage - -[![NPM](https://nodei.co/npm/is-typedarray.png)](https://nodei.co/npm/is-typedarray/) - -### isTypedArray(array) - -Returns `true` when array is a Typed Array, and `false` when it is not. - -## License - -MIT. See [LICENSE.md](http://github.com/hughsk/is-typedarray/blob/master/LICENSE.md) for details. diff --git a/system/websocket_test/node_modules/is-typedarray/index.js b/system/websocket_test/node_modules/is-typedarray/index.js deleted file mode 100644 index 5859603..0000000 --- a/system/websocket_test/node_modules/is-typedarray/index.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = isTypedArray -isTypedArray.strict = isStrictTypedArray -isTypedArray.loose = isLooseTypedArray - -var toString = Object.prototype.toString -var names = { - '[object Int8Array]': true - , '[object Int16Array]': true - , '[object Int32Array]': true - , '[object Uint8Array]': true - , '[object Uint8ClampedArray]': true - , '[object Uint16Array]': true - , '[object Uint32Array]': true - , '[object Float32Array]': true - , '[object Float64Array]': true -} - -function isTypedArray(arr) { - return ( - isStrictTypedArray(arr) - || isLooseTypedArray(arr) - ) -} - -function isStrictTypedArray(arr) { - return ( - arr instanceof Int8Array - || arr instanceof Int16Array - || arr instanceof Int32Array - || arr instanceof Uint8Array - || arr instanceof Uint8ClampedArray - || arr instanceof Uint16Array - || arr instanceof Uint32Array - || arr instanceof Float32Array - || arr instanceof Float64Array - ) -} - -function isLooseTypedArray(arr) { - return names[toString.call(arr)] -} diff --git a/system/websocket_test/node_modules/is-typedarray/package.json b/system/websocket_test/node_modules/is-typedarray/package.json deleted file mode 100644 index 37f7ae3..0000000 --- a/system/websocket_test/node_modules/is-typedarray/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "is-typedarray", - "version": "1.0.0", - "description": "Detect whether or not an object is a Typed Array", - "main": "index.js", - "scripts": { - "test": "node test" - }, - "author": "Hugh Kennedy (http://hughsk.io/)", - "license": "MIT", - "dependencies": {}, - "devDependencies": { - "tape": "^2.13.1" - }, - "repository": { - "type": "git", - "url": "git://github.com/hughsk/is-typedarray.git" - }, - "keywords": [ - "typed", - "array", - "detect", - "is", - "util" - ], - "bugs": { - "url": "https://github.com/hughsk/is-typedarray/issues" - }, - "homepage": "https://github.com/hughsk/is-typedarray" -} diff --git a/system/websocket_test/node_modules/is-typedarray/test.js b/system/websocket_test/node_modules/is-typedarray/test.js deleted file mode 100644 index b0c176f..0000000 --- a/system/websocket_test/node_modules/is-typedarray/test.js +++ /dev/null @@ -1,34 +0,0 @@ -var test = require('tape') -var ista = require('./') - -test('strict', function(t) { - t.ok(ista.strict(new Int8Array), 'Int8Array') - t.ok(ista.strict(new Int16Array), 'Int16Array') - t.ok(ista.strict(new Int32Array), 'Int32Array') - t.ok(ista.strict(new Uint8Array), 'Uint8Array') - t.ok(ista.strict(new Uint16Array), 'Uint16Array') - t.ok(ista.strict(new Uint32Array), 'Uint32Array') - t.ok(ista.strict(new Float32Array), 'Float32Array') - t.ok(ista.strict(new Float64Array), 'Float64Array') - - t.ok(!ista.strict(new Array), 'Array') - t.ok(!ista.strict([]), '[]') - - t.end() -}) - -test('loose', function(t) { - t.ok(ista.loose(new Int8Array), 'Int8Array') - t.ok(ista.loose(new Int16Array), 'Int16Array') - t.ok(ista.loose(new Int32Array), 'Int32Array') - t.ok(ista.loose(new Uint8Array), 'Uint8Array') - t.ok(ista.loose(new Uint16Array), 'Uint16Array') - t.ok(ista.loose(new Uint32Array), 'Uint32Array') - t.ok(ista.loose(new Float32Array), 'Float32Array') - t.ok(ista.loose(new Float64Array), 'Float64Array') - - t.ok(!ista.loose(new Array), 'Array') - t.ok(!ista.loose([]), '[]') - - t.end() -}) diff --git a/system/websocket_test/node_modules/ms/index.js b/system/websocket_test/node_modules/ms/index.js deleted file mode 100644 index 6a522b1..0000000 --- a/system/websocket_test/node_modules/ms/index.js +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isNaN(val) === false) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - if (ms >= d) { - return Math.round(ms / d) + 'd'; - } - if (ms >= h) { - return Math.round(ms / h) + 'h'; - } - if (ms >= m) { - return Math.round(ms / m) + 'm'; - } - if (ms >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - return plural(ms, d, 'day') || - plural(ms, h, 'hour') || - plural(ms, m, 'minute') || - plural(ms, s, 'second') || - ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) { - return; - } - if (ms < n * 1.5) { - return Math.floor(ms / n) + ' ' + name; - } - return Math.ceil(ms / n) + ' ' + name + 's'; -} diff --git a/system/websocket_test/node_modules/ms/license.md b/system/websocket_test/node_modules/ms/license.md deleted file mode 100644 index 69b6125..0000000 --- a/system/websocket_test/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Zeit, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/system/websocket_test/node_modules/ms/package.json b/system/websocket_test/node_modules/ms/package.json deleted file mode 100644 index 6a31c81..0000000 --- a/system/websocket_test/node_modules/ms/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "ms", - "version": "2.0.0", - "description": "Tiny milisecond conversion utility", - "repository": "zeit/ms", - "main": "./index", - "files": [ - "index.js" - ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "license": "MIT", - "devDependencies": { - "eslint": "3.19.0", - "expect.js": "0.3.1", - "husky": "0.13.3", - "lint-staged": "3.4.1", - "mocha": "3.4.1" - } -} diff --git a/system/websocket_test/node_modules/ms/readme.md b/system/websocket_test/node_modules/ms/readme.md deleted file mode 100644 index 84a9974..0000000 --- a/system/websocket_test/node_modules/ms/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# ms - -[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) -[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -``` - -### Convert from milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(ms('10 hours')) // "10h" -``` - -### Time format written-out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [node](https://nodejs.org) and in the browser. -- If a number is supplied to `ms`, a string with a unit is returned. -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). -- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. - -## Caught a bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/system/websocket_test/node_modules/next-tick/.editorconfig b/system/websocket_test/node_modules/next-tick/.editorconfig deleted file mode 100644 index bd6d81e..0000000 --- a/system/websocket_test/node_modules/next-tick/.editorconfig +++ /dev/null @@ -1,16 +0,0 @@ -# EditorConfig is awesome: http://EditorConfig.org - -# top-most EditorConfig file -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = tab -trim_trailing_whitespace = true - -[*.md] -indent_size = 2 -indent_style = space -trim_trailing_whitespace = false diff --git a/system/websocket_test/node_modules/next-tick/.github/FUNDING.yml b/system/websocket_test/node_modules/next-tick/.github/FUNDING.yml deleted file mode 100644 index 270b1dd..0000000 --- a/system/websocket_test/node_modules/next-tick/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -tidelift: "npm/next-tick" diff --git a/system/websocket_test/node_modules/next-tick/.lint b/system/websocket_test/node_modules/next-tick/.lint deleted file mode 100644 index ac7ad3a..0000000 --- a/system/websocket_test/node_modules/next-tick/.lint +++ /dev/null @@ -1,16 +0,0 @@ -@root - -module -es5 - -indent 2 -maxlen 100 -tabs - -ass -bitwise -nomen -plusplus -vars - -predef+ queueMicrotask, process, setImmediate, setTimeout, clearTimeout, document, MutationObserver, WebKitMutationObserver diff --git a/system/websocket_test/node_modules/next-tick/CHANGELOG.md b/system/websocket_test/node_modules/next-tick/CHANGELOG.md deleted file mode 100644 index f990e1c..0000000 --- a/system/websocket_test/node_modules/next-tick/CHANGELOG.md +++ /dev/null @@ -1,13 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -## [1.1.0](https://github.com/medikoo/next-tick/compare/v1.0.0...v1.1.0) (2020-02-11) - -### Features - -* Add support for queueMicrotask (Closes [#13](https://github.com/medikoo/next-tick/issues/13)) ([471986e](https://github.com/medikoo/next-tick/commit/471986ee5f7179a498850cc03138a5ed5b9a248c)) - -## Changelog for previous versions - -See `CHANGES` file diff --git a/system/websocket_test/node_modules/next-tick/CHANGES b/system/websocket_test/node_modules/next-tick/CHANGES deleted file mode 100644 index 931a8a4..0000000 --- a/system/websocket_test/node_modules/next-tick/CHANGES +++ /dev/null @@ -1,28 +0,0 @@ -For recent changelog see CHANGELOG.md - ------ - -v1.0.0 -- 2016.06.09 -* In case MutationObserver based solution ensure all callbacks are propagated - even if any on the way crashes (fixes #3) -* Support older engines (as IE8) which see typeof setTimeout as 'object' -* Fix spelling of LICENSE -* Configure lint scripts - -v0.2.2 -- 2014.04.18 -- Do not rely on es5-ext's valid-callable. Replace it with simple internal function -- In MutationObserver fallback rely on text node instead of attribute and assure - mutation event is invoked by real change of data - -v0.2.1 -- 2014.02.24 -- Fix case in import path - -v0.2.0 -- 2014.02.24 -- Assure microtask resultion if MutationObserver is available (thanks @Raynos) #1 -- Unify validation of callback. TypeError is throw for any non callable input -- Move main module from `lib` to root directory -- Improve documentation -- Remove Makefile (it's environment agnostic pacakge) - -v0.1.0 -- 2012.08.29 -Initial diff --git a/system/websocket_test/node_modules/next-tick/LICENSE b/system/websocket_test/node_modules/next-tick/LICENSE deleted file mode 100644 index cfd3994..0000000 --- a/system/websocket_test/node_modules/next-tick/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2012-2020, Mariusz Nowak, @medikoo, medikoo.com - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/system/websocket_test/node_modules/next-tick/README.md b/system/websocket_test/node_modules/next-tick/README.md deleted file mode 100644 index 7878e90..0000000 --- a/system/websocket_test/node_modules/next-tick/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# next-tick -## Environment agnostic nextTick polyfill - -To be used in environment agnostic modules that need nextTick functionality. - -- When run in Node.js `process.nextTick` is used -- In modern engines, microtask resolution is guaranteed by `queueMicrotask` -- In older browsers, `MutationObserver` is used as a fallback -- In other engines `setImmediate` or `setTimeout(fn, 0)` is used as fallback. -- If none of the above is supported module resolves to `null` - -## Installation -### NPM - -In your project path: - - $ npm install next-tick - -#### Browser - -To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) - -## Tests [![Build Status](https://api.travis-ci.org/medikoo/next-tick.png?branch=master)](https://travis-ci.org/medikoo/next-tick) - - $ npm test - -## Security contact information - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - ---- - -
- - Get professional support for d with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/system/websocket_test/node_modules/next-tick/index.js b/system/websocket_test/node_modules/next-tick/index.js deleted file mode 100644 index 4e3b280..0000000 --- a/system/websocket_test/node_modules/next-tick/index.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; - -var ensureCallable = function (fn) { - if (typeof fn !== 'function') throw new TypeError(fn + " is not a function"); - return fn; -}; - -var byObserver = function (Observer) { - var node = document.createTextNode(''), queue, currentQueue, i = 0; - new Observer(function () { - var callback; - if (!queue) { - if (!currentQueue) return; - queue = currentQueue; - } else if (currentQueue) { - queue = currentQueue.concat(queue); - } - currentQueue = queue; - queue = null; - if (typeof currentQueue === 'function') { - callback = currentQueue; - currentQueue = null; - callback(); - return; - } - node.data = (i = ++i % 2); // Invoke other batch, to handle leftover callbacks in case of crash - while (currentQueue) { - callback = currentQueue.shift(); - if (!currentQueue.length) currentQueue = null; - callback(); - } - }).observe(node, { characterData: true }); - return function (fn) { - ensureCallable(fn); - if (queue) { - if (typeof queue === 'function') queue = [queue, fn]; - else queue.push(fn); - return; - } - queue = fn; - node.data = (i = ++i % 2); - }; -}; - -module.exports = (function () { - // Node.js - if ((typeof process === 'object') && process && (typeof process.nextTick === 'function')) { - return process.nextTick; - } - - // queueMicrotask - if (typeof queueMicrotask === "function") { - return function (cb) { queueMicrotask(ensureCallable(cb)); }; - } - - // MutationObserver - if ((typeof document === 'object') && document) { - if (typeof MutationObserver === 'function') return byObserver(MutationObserver); - if (typeof WebKitMutationObserver === 'function') return byObserver(WebKitMutationObserver); - } - - // W3C Draft - // http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html - if (typeof setImmediate === 'function') { - return function (cb) { setImmediate(ensureCallable(cb)); }; - } - - // Wide available standard - if ((typeof setTimeout === 'function') || (typeof setTimeout === 'object')) { - return function (cb) { setTimeout(ensureCallable(cb), 0); }; - } - - return null; -}()); diff --git a/system/websocket_test/node_modules/next-tick/package.json b/system/websocket_test/node_modules/next-tick/package.json deleted file mode 100644 index 071c8ac..0000000 --- a/system/websocket_test/node_modules/next-tick/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "next-tick", - "version": "1.1.0", - "description": "Environment agnostic nextTick polyfill", - "author": "Mariusz Nowak (http://www.medikoo.com/)", - "keywords": [ - "nexttick", - "setImmediate", - "setTimeout", - "async" - ], - "repository": { - "type": "git", - "url": "git://github.com/medikoo/next-tick.git" - }, - "devDependencies": { - "tad": "^3.0.1", - "xlint": "^0.2.2", - "xlint-jslint-medikoo": "^0.1.4" - }, - "scripts": { - "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", - "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", - "test": "node node_modules/tad/bin/tad" - }, - "license": "ISC" -} diff --git a/system/websocket_test/node_modules/next-tick/test/index.js b/system/websocket_test/node_modules/next-tick/test/index.js deleted file mode 100644 index 6b22cf4..0000000 --- a/system/websocket_test/node_modules/next-tick/test/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -module.exports = function (t, a, d) { - var invoked; - - a(t(function () { - a(arguments.length, 0, "Arguments"); - invoked = true; - }), undefined, "Return"); - a(invoked, undefined, "Is not run immediately"); - setTimeout(function () { - a(invoked, true, "Run in next tick"); - invoked = []; - t(function () { invoked.push(0); }); - t(function () { invoked.push(1); }); - t(function () { invoked.push(2); }); - setTimeout(function () { - a.deep(invoked, [0, 1, 2], "Serial"); - d(); - }, 10); - }, 10); -}; diff --git a/system/websocket_test/node_modules/node-gyp-build/LICENSE b/system/websocket_test/node_modules/node-gyp-build/LICENSE deleted file mode 100644 index 56fce08..0000000 --- a/system/websocket_test/node_modules/node-gyp-build/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/system/websocket_test/node_modules/node-gyp-build/README.md b/system/websocket_test/node_modules/node-gyp-build/README.md deleted file mode 100644 index f712ca6..0000000 --- a/system/websocket_test/node_modules/node-gyp-build/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# node-gyp-build - -> Build tool and bindings loader for [`node-gyp`][node-gyp] that supports prebuilds. - -``` -npm install node-gyp-build -``` - -[![Test](https://github.com/prebuild/node-gyp-build/actions/workflows/test.yml/badge.svg)](https://github.com/prebuild/node-gyp-build/actions/workflows/test.yml) - -Use together with [`prebuildify`][prebuildify] to easily support prebuilds for your native modules. - -## Usage - -> **Note.** Prebuild names have changed in [`prebuildify@3`][prebuildify] and `node-gyp-build@4`. Please see the documentation below. - -`node-gyp-build` works similar to [`node-gyp build`][node-gyp] except that it will check if a build or prebuild is present before rebuilding your project. - -It's main intended use is as an npm install script and bindings loader for native modules that bundle prebuilds using [`prebuildify`][prebuildify]. - -First add `node-gyp-build` as an install script to your native project - -``` js -{ - ... - "scripts": { - "install": "node-gyp-build" - } -} -``` - -Then in your `index.js`, instead of using the [`bindings`](https://www.npmjs.com/package/bindings) module use `node-gyp-build` to load your binding. - -``` js -var binding = require('node-gyp-build')(__dirname) -``` - -If you do these two things and bundle prebuilds with [`prebuildify`][prebuildify] your native module will work for most platforms -without having to compile on install time AND will work in both node and electron without the need to recompile between usage. - -Users can override `node-gyp-build` and force compiling by doing `npm install --build-from-source`. - -Prebuilds will be attempted loaded from `MODULE_PATH/prebuilds/...` and then next `EXEC_PATH/prebuilds/...` (the latter allowing use with `zeit/pkg`) - -## Supported prebuild names - -If so desired you can bundle more specific flavors, for example `musl` builds to support Alpine, or targeting a numbered ARM architecture version. - -These prebuilds can be bundled in addition to generic prebuilds; `node-gyp-build` will try to find the most specific flavor first. Prebuild filenames are composed of _tags_. The runtime tag takes precedence, as does an `abi` tag over `napi`. For more details on tags, please see [`prebuildify`][prebuildify]. - -Values for the `libc` and `armv` tags are auto-detected but can be overridden through the `LIBC` and `ARM_VERSION` environment variables, respectively. - -## License - -MIT - -[prebuildify]: https://github.com/prebuild/prebuildify -[node-gyp]: https://www.npmjs.com/package/node-gyp diff --git a/system/websocket_test/node_modules/node-gyp-build/bin.js b/system/websocket_test/node_modules/node-gyp-build/bin.js deleted file mode 100755 index 3fbcdf0..0000000 --- a/system/websocket_test/node_modules/node-gyp-build/bin.js +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env node - -var proc = require('child_process') -var os = require('os') -var path = require('path') - -if (!buildFromSource()) { - proc.exec('node-gyp-build-test', function (err, stdout, stderr) { - if (err) { - if (verbose()) console.error(stderr) - preinstall() - } - }) -} else { - preinstall() -} - -function build () { - var args = [os.platform() === 'win32' ? 'node-gyp.cmd' : 'node-gyp', 'rebuild'] - - try { - var pkg = require('node-gyp/package.json') - args = [ - process.execPath, - path.join(require.resolve('node-gyp/package.json'), '..', typeof pkg.bin === 'string' ? pkg.bin : pkg.bin['node-gyp']), - 'rebuild' - ] - } catch (_) {} - - proc.spawn(args[0], args.slice(1), { stdio: 'inherit' }).on('exit', function (code) { - if (code || !process.argv[3]) process.exit(code) - exec(process.argv[3]).on('exit', function (code) { - process.exit(code) - }) - }) -} - -function preinstall () { - if (!process.argv[2]) return build() - exec(process.argv[2]).on('exit', function (code) { - if (code) process.exit(code) - build() - }) -} - -function exec (cmd) { - if (process.platform !== 'win32') { - var shell = os.platform() === 'android' ? 'sh' : '/bin/sh' - return proc.spawn(shell, ['-c', '--', cmd], { - stdio: 'inherit' - }) - } - - return proc.spawn(process.env.comspec || 'cmd.exe', ['/s', '/c', '"' + cmd + '"'], { - windowsVerbatimArguments: true, - stdio: 'inherit' - }) -} - -function buildFromSource () { - return hasFlag('--build-from-source') || process.env.npm_config_build_from_source === 'true' -} - -function verbose () { - return hasFlag('--verbose') || process.env.npm_config_loglevel === 'verbose' -} - -// TODO (next major): remove in favor of env.npm_config_* which works since npm -// 0.1.8 while npm_config_argv will stop working in npm 7. See npm/rfcs#90 -function hasFlag (flag) { - if (!process.env.npm_config_argv) return false - - try { - return JSON.parse(process.env.npm_config_argv).original.indexOf(flag) !== -1 - } catch (_) { - return false - } -} diff --git a/system/websocket_test/node_modules/node-gyp-build/build-test.js b/system/websocket_test/node_modules/node-gyp-build/build-test.js deleted file mode 100755 index b6622a5..0000000 --- a/system/websocket_test/node_modules/node-gyp-build/build-test.js +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env node - -process.env.NODE_ENV = 'test' - -var path = require('path') -var test = null - -try { - var pkg = require(path.join(process.cwd(), 'package.json')) - if (pkg.name && process.env[pkg.name.toUpperCase().replace(/-/g, '_')]) { - process.exit(0) - } - test = pkg.prebuild.test -} catch (err) { - // do nothing -} - -if (test) require(path.join(process.cwd(), test)) -else require('./')() diff --git a/system/websocket_test/node_modules/node-gyp-build/index.js b/system/websocket_test/node_modules/node-gyp-build/index.js deleted file mode 100644 index 07eb14f..0000000 --- a/system/websocket_test/node_modules/node-gyp-build/index.js +++ /dev/null @@ -1,6 +0,0 @@ -const runtimeRequire = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require // eslint-disable-line -if (typeof runtimeRequire.addon === 'function') { // if the platform supports native resolving prefer that - module.exports = runtimeRequire.addon.bind(runtimeRequire) -} else { // else use the runtime version here - module.exports = require('./node-gyp-build.js') -} diff --git a/system/websocket_test/node_modules/node-gyp-build/node-gyp-build.js b/system/websocket_test/node_modules/node-gyp-build/node-gyp-build.js deleted file mode 100644 index 76b96e1..0000000 --- a/system/websocket_test/node_modules/node-gyp-build/node-gyp-build.js +++ /dev/null @@ -1,207 +0,0 @@ -var fs = require('fs') -var path = require('path') -var os = require('os') - -// Workaround to fix webpack's build warnings: 'the request of a dependency is an expression' -var runtimeRequire = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require // eslint-disable-line - -var vars = (process.config && process.config.variables) || {} -var prebuildsOnly = !!process.env.PREBUILDS_ONLY -var abi = process.versions.modules // TODO: support old node where this is undef -var runtime = isElectron() ? 'electron' : (isNwjs() ? 'node-webkit' : 'node') - -var arch = process.env.npm_config_arch || os.arch() -var platform = process.env.npm_config_platform || os.platform() -var libc = process.env.LIBC || (isAlpine(platform) ? 'musl' : 'glibc') -var armv = process.env.ARM_VERSION || (arch === 'arm64' ? '8' : vars.arm_version) || '' -var uv = (process.versions.uv || '').split('.')[0] - -module.exports = load - -function load (dir) { - return runtimeRequire(load.resolve(dir)) -} - -load.resolve = load.path = function (dir) { - dir = path.resolve(dir || '.') - - try { - var name = runtimeRequire(path.join(dir, 'package.json')).name.toUpperCase().replace(/-/g, '_') - if (process.env[name + '_PREBUILD']) dir = process.env[name + '_PREBUILD'] - } catch (err) {} - - if (!prebuildsOnly) { - var release = getFirst(path.join(dir, 'build/Release'), matchBuild) - if (release) return release - - var debug = getFirst(path.join(dir, 'build/Debug'), matchBuild) - if (debug) return debug - } - - var prebuild = resolve(dir) - if (prebuild) return prebuild - - var nearby = resolve(path.dirname(process.execPath)) - if (nearby) return nearby - - var target = [ - 'platform=' + platform, - 'arch=' + arch, - 'runtime=' + runtime, - 'abi=' + abi, - 'uv=' + uv, - armv ? 'armv=' + armv : '', - 'libc=' + libc, - 'node=' + process.versions.node, - process.versions.electron ? 'electron=' + process.versions.electron : '', - typeof __webpack_require__ === 'function' ? 'webpack=true' : '' // eslint-disable-line - ].filter(Boolean).join(' ') - - throw new Error('No native build was found for ' + target + '\n loaded from: ' + dir + '\n') - - function resolve (dir) { - // Find matching "prebuilds/-" directory - var tuples = readdirSync(path.join(dir, 'prebuilds')).map(parseTuple) - var tuple = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0] - if (!tuple) return - - // Find most specific flavor first - var prebuilds = path.join(dir, 'prebuilds', tuple.name) - var parsed = readdirSync(prebuilds).map(parseTags) - var candidates = parsed.filter(matchTags(runtime, abi)) - var winner = candidates.sort(compareTags(runtime))[0] - if (winner) return path.join(prebuilds, winner.file) - } -} - -function readdirSync (dir) { - try { - return fs.readdirSync(dir) - } catch (err) { - return [] - } -} - -function getFirst (dir, filter) { - var files = readdirSync(dir).filter(filter) - return files[0] && path.join(dir, files[0]) -} - -function matchBuild (name) { - return /\.node$/.test(name) -} - -function parseTuple (name) { - // Example: darwin-x64+arm64 - var arr = name.split('-') - if (arr.length !== 2) return - - var platform = arr[0] - var architectures = arr[1].split('+') - - if (!platform) return - if (!architectures.length) return - if (!architectures.every(Boolean)) return - - return { name, platform, architectures } -} - -function matchTuple (platform, arch) { - return function (tuple) { - if (tuple == null) return false - if (tuple.platform !== platform) return false - return tuple.architectures.includes(arch) - } -} - -function compareTuples (a, b) { - // Prefer single-arch prebuilds over multi-arch - return a.architectures.length - b.architectures.length -} - -function parseTags (file) { - var arr = file.split('.') - var extension = arr.pop() - var tags = { file: file, specificity: 0 } - - if (extension !== 'node') return - - for (var i = 0; i < arr.length; i++) { - var tag = arr[i] - - if (tag === 'node' || tag === 'electron' || tag === 'node-webkit') { - tags.runtime = tag - } else if (tag === 'napi') { - tags.napi = true - } else if (tag.slice(0, 3) === 'abi') { - tags.abi = tag.slice(3) - } else if (tag.slice(0, 2) === 'uv') { - tags.uv = tag.slice(2) - } else if (tag.slice(0, 4) === 'armv') { - tags.armv = tag.slice(4) - } else if (tag === 'glibc' || tag === 'musl') { - tags.libc = tag - } else { - continue - } - - tags.specificity++ - } - - return tags -} - -function matchTags (runtime, abi) { - return function (tags) { - if (tags == null) return false - if (tags.runtime && tags.runtime !== runtime && !runtimeAgnostic(tags)) return false - if (tags.abi && tags.abi !== abi && !tags.napi) return false - if (tags.uv && tags.uv !== uv) return false - if (tags.armv && tags.armv !== armv) return false - if (tags.libc && tags.libc !== libc) return false - - return true - } -} - -function runtimeAgnostic (tags) { - return tags.runtime === 'node' && tags.napi -} - -function compareTags (runtime) { - // Precedence: non-agnostic runtime, abi over napi, then by specificity. - return function (a, b) { - if (a.runtime !== b.runtime) { - return a.runtime === runtime ? -1 : 1 - } else if (a.abi !== b.abi) { - return a.abi ? -1 : 1 - } else if (a.specificity !== b.specificity) { - return a.specificity > b.specificity ? -1 : 1 - } else { - return 0 - } - } -} - -function isNwjs () { - return !!(process.versions && process.versions.nw) -} - -function isElectron () { - if (process.versions && process.versions.electron) return true - if (process.env.ELECTRON_RUN_AS_NODE) return true - return typeof window !== 'undefined' && window.process && window.process.type === 'renderer' -} - -function isAlpine (platform) { - return platform === 'linux' && fs.existsSync('/etc/alpine-release') -} - -// Exposed for unit tests -// TODO: move to lib -load.parseTags = parseTags -load.matchTags = matchTags -load.compareTags = compareTags -load.parseTuple = parseTuple -load.matchTuple = matchTuple -load.compareTuples = compareTuples diff --git a/system/websocket_test/node_modules/node-gyp-build/optional.js b/system/websocket_test/node_modules/node-gyp-build/optional.js deleted file mode 100755 index 8daa04a..0000000 --- a/system/websocket_test/node_modules/node-gyp-build/optional.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -/* -I am only useful as an install script to make node-gyp not compile for purely optional native deps -*/ - -process.exit(0) diff --git a/system/websocket_test/node_modules/node-gyp-build/package.json b/system/websocket_test/node_modules/node-gyp-build/package.json deleted file mode 100644 index 86319f3..0000000 --- a/system/websocket_test/node_modules/node-gyp-build/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "node-gyp-build", - "version": "4.8.0", - "description": "Build tool and bindings loader for node-gyp that supports prebuilds", - "main": "index.js", - "devDependencies": { - "array-shuffle": "^1.0.1", - "standard": "^14.0.0", - "tape": "^5.0.0" - }, - "scripts": { - "test": "standard && node test" - }, - "bin": { - "node-gyp-build": "./bin.js", - "node-gyp-build-optional": "./optional.js", - "node-gyp-build-test": "./build-test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/prebuild/node-gyp-build.git" - }, - "author": "Mathias Buus (@mafintosh)", - "license": "MIT", - "bugs": { - "url": "https://github.com/prebuild/node-gyp-build/issues" - }, - "homepage": "https://github.com/prebuild/node-gyp-build" -} diff --git a/system/websocket_test/node_modules/type/CHANGELOG.md b/system/websocket_test/node_modules/type/CHANGELOG.md deleted file mode 100644 index 001636b..0000000 --- a/system/websocket_test/node_modules/type/CHANGELOG.md +++ /dev/null @@ -1,172 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [2.7.2](https://github.com/medikoo/type/compare/v2.7.1...v2.7.2) (2022-08-05) - -### Maintenance Improvements - -- **TS:** Improve `ensure` options handling ([#8](https://github.com/medikoo/type/issues/8)) ([4a54066](https://github.com/medikoo/type/commit/4a54066d7b55cef14ac4aa25a6f070296a043a6f)) ([Marco](https://github.com/borracciaBlu)) - -### [2.7.1](https://github.com/medikoo/type/compare/v2.7.0...v2.7.1) (2022-08-04) - -### Maintenance Improvements - -- **TS:** Fix support for `isOptional` in `ensure` options ([#7](https://github.com/medikoo/type/issues/7)) ([320f89b](https://github.com/medikoo/type/commit/320f89b89237e3e0ceff5e26b67cb18bd52cb42d)) ([Marco](https://github.com/borracciaBlu)) - -## [2.7.0](https://github.com/medikoo/type/compare/v2.6.1...v2.7.0) (2022-08-03) - -### Features - -- `BigInt.coerce` and `BigInt.ensure` ([e49ad78](https://github.com/medikoo/type/commit/e49ad787bd3aa67b7aa9f7a8ea4cde22a08bebc5)) - -### [2.6.1](https://github.com/medikoo/type/compare/v2.6.0...v2.6.1) (2022-07-29) - -### Maintenance Improvements - -- Declare TS types ([#6](https://github.com/medikoo/type/issues/6)) ([6378e2c](https://github.com/medikoo/type/commit/6378e2c457670bcb8a9b898e0f2502ed5b942d44)) ([Marco](https://github.com/borracciaBlu)) - -## [2.6.0](https://github.com/medikoo/type/compare/v2.5.0...v2.6.0) (2022-02-02) - -### Features - -- `constructor` validation utils ([74b99bb](https://github.com/medikoo/type/commit/74b99bbf6be27083bf9a053961edb2a585ae3e77)) - -## [2.5.0](https://github.com/medikoo/type/compare/v2.4.0...v2.5.0) (2021-03-08) - -### Features - -- `errorCode` option for `ensure*` utils ([777a1f2](https://github.com/medikoo/type/commit/777a1f2c9fd76defcd24d3a30cce49491947fef7)) - -## [2.4.0](https://github.com/medikoo/type/compare/v2.3.0...v2.4.0) (2021-03-08) - -### Features - -- `set/is` and `set/ensure` utils ([083ec23](https://github.com/medikoo/type/commit/083ec2351718c310f316dcfd8c624a13201e227f)) - -## [2.3.0](https://github.com/medikoo/type/compare/v2.2.0...v2.3.0) (2021-02-16) - -### Features - -- `map/is` and `map/ensure` utils ([aafd1cb](https://github.com/medikoo/type/commit/aafd1cbd8c888fda98d39fd17e59f38b078d7bcf)) - -## [2.2.0](https://github.com/medikoo/type/compare/v2.1.0...v2.2.0) (2021-02-11) - -### Features - -- Support `ensureItem` option in `array/ensure` ([8f74973](https://github.com/medikoo/type/commit/8f749739df9bfebf44087093e09c8f7341a33a09)) - -## [2.1.0](https://github.com/medikoo/type/compare/v2.0.0...v2.1.0) (2020-08-21) - -### Features - -- `ensure` util for cumulated input validation ([814c5a8](https://github.com/medikoo/type/commit/814c5a801ecac23d06d8a5f4bcafc4763a04408c)) -- Provide an alternative error message with `options.name` ([c7751c0](https://github.com/medikoo/type/commit/c7751c084ee4f3d3ed10500db0edde2ff00e03a1)) -- Support `%n` (meaningful name) token in error message resolver ([b0f374e](https://github.com/medikoo/type/commit/b0f374e54345c714fe37a90887ecfe60577ce133)) -- Support `min` validation for natural numbers ([e703512](https://github.com/medikoo/type/commit/e70351248818d3e113110106ad174b42c5fd9b25)) -- Support custom Error constructors ([c6ecb90](https://github.com/medikoo/type/commit/c6ecb90e21c1c778210934204cbe393fb89ef2f6)) - -### Bug Fixes - -- Fix typo in error message ([2735533](https://github.com/medikoo/type/commit/2735533de28d33dfa13222743698169c92d08c09)) - -## [2.0.0](https://github.com/medikoo/type/compare/v1.2.0...v2.0.0) (2019-10-10) - -### Features - -- `allowedKeys` option for plain-object/ensure ([f81e72e](https://github.com/medikoo/type/commit/f81e72e)) -- `ensurePropertyValue` option for plain-object/ensure ([c5ff8fb](https://github.com/medikoo/type/commit/c5ff8fb)) -- Replace `coerceItem` with `ensureItem` option in iterable/ensure ([721494f](https://github.com/medikoo/type/commit/721494f)) -- Seclude lib/resolve-error-message ([12636d9](https://github.com/medikoo/type/commit/12636d9)) -- Validate options.ensureItem in iterable/ensure ([78da6c1](https://github.com/medikoo/type/commit/78da6c1)) - -### BREAKING CHANGES - -- iterable/ensure no longer supports `coerceItem` option. Instead `ensureItem` was introduced - -## [1.2.0](https://github.com/medikoo/type/compare/v1.1.0...v1.2.0) (2019-09-20) - -### Bug Fixes - -- Improve error message so it's not confusing ([97cd6b9](https://github.com/medikoo/type/commit/97cd6b9)) - -### Features - -- 'coerceItem' option for iterable/ensure ([0818860](https://github.com/medikoo/type/commit/0818860)) - -## [1.1.0](https://github.com/medikoo/type/compare/v1.0.3...v1.1.0) (2019-09-20) - -### Features - -- `denyEmpty` option for iterables validation ([301d071](https://github.com/medikoo/type/commit/301d071)) - -### [1.0.3](https://github.com/medikoo/type/compare/v1.0.2...v1.0.3) (2019-08-06) - -### Bug Fixes - -- Recognize custom built ES5 era errors ([6462fac](https://github.com/medikoo/type/commit/6462fac)) - -### [1.0.2](https://github.com/medikoo/type/compare/v1.0.1...v1.0.2) (2019-08-06) - -### Bug Fixes - -- Recognize host errors (e.g. DOMException) ([96ef399](https://github.com/medikoo/type/commit/96ef399)) - -## [1.0.1](https://github.com/medikoo/type/compare/v1.0.0...v1.0.1) (2019-04-08) - -# 1.0.0 (2019-04-05) - -### Bug Fixes - -- ensure 'is' functions can't crash ([59ceb78](https://github.com/medikoo/type/commit/59ceb78)) - -### Features - -- array-length/coerce ([af8ddec](https://github.com/medikoo/type/commit/af8ddec)) -- array-length/ensure ([d313eb6](https://github.com/medikoo/type/commit/d313eb6)) -- array-like/ensure ([45f1ddd](https://github.com/medikoo/type/commit/45f1ddd)) -- array-like/is ([9a026a5](https://github.com/medikoo/type/commit/9a026a5)) -- array/ensure ([9db1515](https://github.com/medikoo/type/commit/9db1515)) -- array/is ([9672839](https://github.com/medikoo/type/commit/9672839)) -- date/ensure ([44e25a0](https://github.com/medikoo/type/commit/44e25a0)) -- date/is ([0316558](https://github.com/medikoo/type/commit/0316558)) -- ensure to not crash ([3998348](https://github.com/medikoo/type/commit/3998348)) -- ensure/number ([134b5cb](https://github.com/medikoo/type/commit/134b5cb)) -- error/ensure ([d5c8a30](https://github.com/medikoo/type/commit/d5c8a30)) -- error/is-error ([4d6b899](https://github.com/medikoo/type/commit/4d6b899)) -- finite/coerce ([accaad1](https://github.com/medikoo/type/commit/accaad1)) -- finite/ensure ([51e4174](https://github.com/medikoo/type/commit/51e4174)) -- function/ensure ([b624c9a](https://github.com/medikoo/type/commit/b624c9a)) -- function/is ([dab8026](https://github.com/medikoo/type/commit/dab8026)) -- integer/coerce ([89dea2e](https://github.com/medikoo/type/commit/89dea2e)) -- integer/ensure ([44a7071](https://github.com/medikoo/type/commit/44a7071)) -- iterable/ensure ([3d48841](https://github.com/medikoo/type/commit/3d48841)) -- iterable/is ([cf09513](https://github.com/medikoo/type/commit/cf09513)) -- lib/is-to-string-tag-supported ([c8c001d](https://github.com/medikoo/type/commit/c8c001d)) -- natural-number/coerce ([d08fdd9](https://github.com/medikoo/type/commit/d08fdd9)) -- natural-number/ensure ([6c24d12](https://github.com/medikoo/type/commit/6c24d12)) -- number/coerce ([86ccf08](https://github.com/medikoo/type/commit/86ccf08)) -- object/ensure ([a9e8eed](https://github.com/medikoo/type/commit/a9e8eed)) -- object/is ([d2d7251](https://github.com/medikoo/type/commit/d2d7251)) -- plain-function/ensure ([5186518](https://github.com/medikoo/type/commit/5186518)) -- plain-function/is ([51bc791](https://github.com/medikoo/type/commit/51bc791)) -- plain-object/ensure ([91cf5e5](https://github.com/medikoo/type/commit/91cf5e5)) -- plain-object/is ([4dcf393](https://github.com/medikoo/type/commit/4dcf393)) -- promise/ensure ([8d096a4](https://github.com/medikoo/type/commit/8d096a4)) -- promise/is ([a00de02](https://github.com/medikoo/type/commit/a00de02)) -- prototype/is ([b23bdcc](https://github.com/medikoo/type/commit/b23bdcc)) -- reg-exp/ensure ([6f7bbcb](https://github.com/medikoo/type/commit/6f7bbcb)) -- reg-exp/is ([9728519](https://github.com/medikoo/type/commit/9728519)) -- safe-integer/coerce ([b8549c4](https://github.com/medikoo/type/commit/b8549c4)) -- safe-integer/ensure ([a70ef3f](https://github.com/medikoo/type/commit/a70ef3f)) -- string/coerce ([b25c71f](https://github.com/medikoo/type/commit/b25c71f)) -- string/ensure ([b62577d](https://github.com/medikoo/type/commit/b62577d)) -- support 'default' in resolveException ([e08332a](https://github.com/medikoo/type/commit/e08332a)) -- switch config to ES3 based ([37606d9](https://github.com/medikoo/type/commit/37606d9)) -- thenable/ensure ([6762c0d](https://github.com/medikoo/type/commit/6762c0d)) -- thenable/is ([2711d70](https://github.com/medikoo/type/commit/2711d70)) -- time-value/coerce ([27fd109](https://github.com/medikoo/type/commit/27fd109)) -- time-value/ensure ([1f6a8ea](https://github.com/medikoo/type/commit/1f6a8ea)) -- **string/coerce:** restrict toString acceptance ([2a87100](https://github.com/medikoo/type/commit/2a87100)) -- value/ensure ([dd6d8cb](https://github.com/medikoo/type/commit/dd6d8cb)) -- value/is ([fdf4763](https://github.com/medikoo/type/commit/fdf4763)) diff --git a/system/websocket_test/node_modules/type/LICENSE b/system/websocket_test/node_modules/type/LICENSE deleted file mode 100644 index ce541c9..0000000 --- a/system/websocket_test/node_modules/type/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2019-2022, Mariusz Nowak, @medikoo, medikoo.com - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/system/websocket_test/node_modules/type/README.md b/system/websocket_test/node_modules/type/README.md deleted file mode 100644 index 6b20794..0000000 --- a/system/websocket_test/node_modules/type/README.md +++ /dev/null @@ -1,168 +0,0 @@ -[![Build status][build-image]][build-url] -[![Tests coverage][cov-image]][cov-url] -[![npm version][npm-image]][npm-url] - -# type - -## Runtime validation and processing of JavaScript types - -- Respects language nature and acknowledges its quirks -- Allows coercion in restricted forms (rejects clearly invalid input, normalizes permissible type deviations) -- No transpilation implied, written to work in all ECMAScript 3+ engines - -## Use case - -Validate arguments input in public API endpoints. - -_For validation of more sophisticated input structures (as deeply nested configuration objects) it's recommended to consider more powerful schema based utlities (as [AJV](https://ajv.js.org/) or [@hapi/joi](https://hapi.dev/family/joi/))_ - -### Example usage - -Bulletproof input arguments normalization and validation: - -```javascript -const ensureString = require('type/string/ensure') - , ensureDate = require('type/date/ensure') - , ensureNaturalNumber = require('type/natural-number/ensure') - , isObject = require('type/object/is'); - -module.exports = (path, options = { min: 0 }) { - path = ensureString(path, { errorMessage: "%v is not a path" }); - if (!isObject(options)) options = {}; - const min = ensureNaturalNumber(options.min, { default: 0 }) - , max = ensureNaturalNumber(options.max, { isOptional: true }) - , startTime = ensureDate(options.startTime, { isOptional: true }); - - // ...logic -}; -``` - -### Installation - -```bash -npm install type -``` - -## Utilities - -Aside of general [`ensure`](docs/ensure.md) validation util, following kind of utilities for recognized JavaScript types are provided: - -##### `*/coerce` - -Restricted coercion into primitive type. Returns coerced value or `null` if value is not coercible per rules. - -##### `*/is` - -Object type/kind confirmation, returns either `true` or `false`. - -##### `*/ensure` - -Value validation. Returns input value (in primitive cases possibly coerced) or if value doesn't meet the constraints throws `TypeError` . - -Each `*/ensure` utility, accepts following options (eventually passed with second argument): - -- `isOptional` - Makes `null` or `undefined` accepted as valid value. In such case instead of `TypeError` being thrown, `null` is returned. -- `default` - A value to be returned if `null` or `undefined` is passed as an input value. -- `errorMessage` - Custom error message. Following placeholders can be used: - - `%v` - To be replaced with short string representation of invalid value - - `%n` - To be replaced with meaninfgul name (to be passed with `name` option) of validated value. Not effective if `name` option is not present -- `errorCode` - Eventual error code to be exposed on `.code` error property -- `name` - Meaningful name for validated value, to be used in error message, assuming it contains `%n` placeholder -- `Error` - Alternative error constructor to be used (defaults to `TypeError`) - -### Index - -#### General utils: - -- [`ensure`](docs/ensure.md) - -#### Type specific utils: - -- **Value** - - [`value/is`](docs/value.md#valueis) - - [`value/ensure`](docs/value.md#valueensure) -- **Object** - - [`object/is`](docs/object.md#objectis) - - [`object/ensure`](docs/object.md#objectensure) - - **Plain Object** - - [`plain-object/is`](docs/plain-object.md#plain-objectis) - - [`plain-object/ensure`](docs/plain-object.md#plain-objectensure) -- **String** - - [`string/coerce`](docs/string.md#stringcoerce) - - [`string/ensure`](docs/string.md#stringensure) -- **Number** - - [`number/coerce`](docs/number.md#numbercoerce) - - [`number/ensure`](docs/number.md#numberensure) - - **Finite Number** - - [`finite/coerce`](docs/finite.md#finitecoerce) - - [`finite/ensure`](docs/finite.md#finiteensure) - - **Integer Number** - - [`integer/coerce`](docs/integer.md#integercoerce) - - [`integer/ensure`](docs/integer.md#integerensure) - - **Safe Integer Number** - - [`safe-integer/coerce`](docs/safe-integer.md#safe-integercoerce) - - [`safe-integer/ensure`](docs/.md#safe-integerensure) - - **Natural Number** - - [`natural-number/coerce`](docs/natural-number.md#natural-numbercoerce) - - [`natural-number/ensure`](docs/natural-number.md#natural-numberensure) - - **Array Length** - - [`array-length/coerce`](docs/array-length.md#array-lengthcoerce) - - [`array-length/ensure`](docs/array-length.md#array-lengthensure) - - **Time Value** - - [`time-value/coerce`](docs/time-value.md#time-valuecoerce) - - [`time-value/ensure`](docs/time-value.md#time-valueensure) -- **BigInt** - - [`big-int/coerce`](docs/big-int.md#big-intcoerce) - - [`big-int/ensure`](docs/big-int.md#big-intensure) -- **Array Like** - - [`array-like/is`](docs/array-like.md#array-likeis) - - [`array-like/ensure`](docs/array-like.md#array-likeensure) - - **Array** - - [`array/is`](docs/array.md#arrayis) - - [`array/ensure`](docs/array.md#arrayensure) -- **Iterable** - - [`iterable/is`](docs/iterable.md#iterableis) - - [`iterable/ensure`](docs/iterable.md#iterableensure) -- **Set** - - [`set/is`](docs/set.md#setis) - - [`set/ensure`](docs/set.md#setensure) -- **Map** - - [`map/is`](docs/map.md#mapis) - - [`map/ensure`](docs/map.md#mapensure) -- **Date** - - [`date/is`](docs/date.md#dateis) - - [`date/ensure`](docs/date.md#dateensure) -- **Function** - - [`function/is`](docs/function.md#functionis) - - [`function/ensure`](docs/function.md#functionensure) - - **Constructor** - - [`constructor/is`](docs/constructor.md#plain-functionis) - - [`constructor/ensure`](docs/constructor.md#plain-functionensure) - - **Plain Function** - - [`plain-function/is`](docs/plain-function.md#plain-functionis) - - [`plain-function/ensure`](docs/plain-function.md#plain-functionensure) -- **Reg Exp** - - [`reg-exp/is`](docs/reg-exp.md#reg-expis) - - [`reg-exp/ensure`](docs/.md#reg-expensure) -- **Thenable** - - [`thenable/is`](docs/thenable.md#thenableis) - - [`thenable/ensure`](docs/thenable.md#thenableensure) - - **Promise** - - [`promise/is`](docs/promise.md#promiseis) - - [`promise/ensure`](docs/promise.md#promiseensure) -- **Error** - - [`error/is`](docs/error.md#erroris) - - [`error/ensure`](docs/error.md#errorensure) -- **Prototype** - - [`prototype/is`](docs/prototype.md#prototypeis) - -### Tests - - $ npm test - -[build-image]: https://github.com/medikoo/type/workflows/Integrate/badge.svg -[build-url]: https://github.com/medikoo/type/actions?query=workflow%3AIntegrate -[cov-image]: https://img.shields.io/codecov/c/github/medikoo/type.svg -[cov-url]: https://codecov.io/gh/medikoo/type -[npm-image]: https://img.shields.io/npm/v/type.svg -[npm-url]: https://www.npmjs.com/package/type diff --git a/system/websocket_test/node_modules/type/array-length/coerce.js b/system/websocket_test/node_modules/type/array-length/coerce.js deleted file mode 100644 index 3dbbf97..0000000 --- a/system/websocket_test/node_modules/type/array-length/coerce.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var coerceToSafeInteger = require("../safe-integer/coerce"); - -module.exports = function (value) { - value = coerceToSafeInteger(value); - if (!value) return value; - if (value < 0) return null; - return value; -}; diff --git a/system/websocket_test/node_modules/type/array-length/ensure.js b/system/websocket_test/node_modules/type/array-length/ensure.js deleted file mode 100644 index 2b48ddc..0000000 --- a/system/websocket_test/node_modules/type/array-length/ensure.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected an array length for %n, received %v" - : "%v is not an array length"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/array-like/ensure.js b/system/websocket_test/node_modules/type/array-like/ensure.js deleted file mode 100644 index 0d1a9f7..0000000 --- a/system/websocket_test/node_modules/type/array-like/ensure.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value, arguments[1])) return value; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected an array like for %n, received %v" - : "%v is not an array like"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/array-like/is.js b/system/websocket_test/node_modules/type/array-like/is.js deleted file mode 100644 index 7778fed..0000000 --- a/system/websocket_test/node_modules/type/array-like/is.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -var coerceToArrayLength = require("../array-length/coerce") - , isObject = require("../object/is"); - -module.exports = function (value/*, options*/) { - if (!isObject(value)) { - var options = arguments[1]; - if (isObject(options) && options.allowString && typeof value === "string") return true; - return false; - } - - if (typeof value === "function") return false; - - var length; - try { length = value.length; } - catch (error) { return false; } - - if (coerceToArrayLength(length) === null) return false; - return true; -}; diff --git a/system/websocket_test/node_modules/type/array/ensure.js b/system/websocket_test/node_modules/type/array/ensure.js deleted file mode 100644 index 19e4599..0000000 --- a/system/websocket_test/node_modules/type/array/ensure.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , resolveErrorMessage = require("../lib/resolve-error-message") - , toShortString = require("../lib/to-short-string") - , ensurePlainFunction = require("../plain-function/ensure") - , is = require("./is"); - -var objHasOwnProperty = Object.prototype.hasOwnProperty, invalidItemsLimit = 3; - -module.exports = function (value /*, options*/) { - var options = arguments[1]; - var mainErrorMessage = - options && options.name ? "Expected an array for %n, received %v" : "%v is not an array"; - if (!is(value)) return resolveException(value, mainErrorMessage, options); - if (!options) return value; - - var ensureItem = ensurePlainFunction(options.ensureItem, { isOptional: true }); - if (ensureItem) { - var coercedValue = [], invalidItems; - for (var index = 0, length = value.length; index < length; ++index) { - if (!objHasOwnProperty.call(value, index)) continue; - var coercedItem; - try { - coercedItem = ensureItem(value[index]); - } catch (error) { - if (!invalidItems) invalidItems = []; - if (invalidItems.push(toShortString(value[index])) === invalidItemsLimit) break; - } - if (invalidItems) continue; - coercedValue[index] = coercedItem; - } - if (invalidItems) { - throw new TypeError( - resolveErrorMessage(mainErrorMessage, value, options) + - ".\n Following items are invalid: " + - invalidItems.join(", ") - ); - } - return coercedValue; - } - return value; -}; diff --git a/system/websocket_test/node_modules/type/array/is.js b/system/websocket_test/node_modules/type/array/is.js deleted file mode 100644 index 13fd8d3..0000000 --- a/system/websocket_test/node_modules/type/array/is.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is"); - -var isArray; -if (typeof Array.isArray === "function") { - isArray = Array.isArray; -} else { - var objectToString = Object.prototype.toString, objectTaggedString = objectToString.call([]); - isArray = function (value) { return objectToString.call(value) === objectTaggedString; }; -} - -module.exports = function (value) { - if (!isArray(value)) return false; - - // Sanity check (reject objects which do not expose common Array interface) - if (!hasOwnProperty.call(value, "length")) return false; - try { - if (typeof value.length !== "number") return false; - if (typeof value.push !== "function") return false; - if (typeof value.splice !== "function") return false; - } catch (error) { - return false; - } - - return !isPrototype(value); -}; diff --git a/system/websocket_test/node_modules/type/big-int/coerce.js b/system/websocket_test/node_modules/type/big-int/coerce.js deleted file mode 100644 index a600a20..0000000 --- a/system/websocket_test/node_modules/type/big-int/coerce.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var isValue = require("../value/is"); - -// Sanity BigInt support check -BigInt(0); - -module.exports = function (value) { - if (!isValue(value)) return null; - if (typeof value === "bigint") return value; - try { return BigInt(value); } - catch (error) { return null; } -}; diff --git a/system/websocket_test/node_modules/type/big-int/ensure.js b/system/websocket_test/node_modules/type/big-int/ensure.js deleted file mode 100644 index 319b1b7..0000000 --- a/system/websocket_test/node_modules/type/big-int/ensure.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value /*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected bigint for %n, received %v" : "%v is not a bigint"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/constructor/ensure.js b/system/websocket_test/node_modules/type/constructor/ensure.js deleted file mode 100644 index 4f3e846..0000000 --- a/system/websocket_test/node_modules/type/constructor/ensure.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value /*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a constructor function for %n, received %v" - : "%v is not a constructor function"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/constructor/is.js b/system/websocket_test/node_modules/type/constructor/is.js deleted file mode 100644 index 058a156..0000000 --- a/system/websocket_test/node_modules/type/constructor/is.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var isFunction = require("../function/is"); - -var constructorRe = /^\s*(?:class[\s{/}]|function[\s(])/ - , functionToString = Function.prototype.toString; - -module.exports = function (value) { - if (!isFunction(value)) return false; - if (!constructorRe.test(functionToString.call(value))) return false; - return true; -}; diff --git a/system/websocket_test/node_modules/type/date/ensure.js b/system/websocket_test/node_modules/type/date/ensure.js deleted file mode 100644 index 0fae4d3..0000000 --- a/system/websocket_test/node_modules/type/date/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a date for %n, received %v" : "%v is not a date"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/date/is.js b/system/websocket_test/node_modules/type/date/is.js deleted file mode 100644 index 0754085..0000000 --- a/system/websocket_test/node_modules/type/date/is.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is"); - -var dateValueOf = Date.prototype.valueOf; - -module.exports = function (value) { - if (!value) return false; - - try { - // Sanity check (reject objects which do not expose common Date interface) - if (typeof value.getFullYear !== "function") return false; - if (typeof value.getTimezoneOffset !== "function") return false; - if (typeof value.setFullYear !== "function") return false; - - // Ensure its native Date object (has [[DateValue]] slot) - dateValueOf.call(value); - } catch (error) { - return false; - } - - // Ensure it hosts valid date - if (isNaN(value)) return false; - - return !isPrototype(value); -}; diff --git a/system/websocket_test/node_modules/type/docs/array-length.md b/system/websocket_test/node_modules/type/docs/array-length.md deleted file mode 100644 index cca7d8a..0000000 --- a/system/websocket_test/node_modules/type/docs/array-length.md +++ /dev/null @@ -1,27 +0,0 @@ -# Array length - -_number_ primitive that conforms as valid _array length_ - -## `array-length/coerce` - -Follows [`safe-integer/coerce`](safe-integer.md#safe-integercoerce) but returns `null` in place of values which are below `0` - -```javascript -const coerceToArrayLength = require("type/safe-integer/coerce"); - -coerceToArrayLength("12.95"); // 12 -coerceToArrayLength(9007199254740992); // null -coerceToArrayLength(null); // null -``` - -## `array-length/ensure` - -If given argument is an _array length_ coercible value (via [`array-length/coerce`](#array-lengthcoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureArrayLength = require("type/array-length/ensure"); - -ensureArrayLength(12.93); // "12" -ensureArrayLength(9007199254740992); // Thrown TypeError: 9007199254740992 is not a valid array length -``` diff --git a/system/websocket_test/node_modules/type/docs/array-like.md b/system/websocket_test/node_modules/type/docs/array-like.md deleted file mode 100644 index 2a48df8..0000000 --- a/system/websocket_test/node_modules/type/docs/array-like.md +++ /dev/null @@ -1,33 +0,0 @@ -# Array Like - -_Array-like_ value (any value with `length` property) - -## `array-like/is` - -Restricted _array-like_ confirmation. Returns true for every value that meets following contraints - -- is an _object_ (or with `allowString` option, a _string_) -- is not a _function_ -- Exposes `length` that meets [`array-length`](array-length.md#array-lengthcoerce) constraints - -```javascript -const isArrayLike = require("type/array-like/is"); - -isArrayLike([]); // true -isArrayLike({}); // false -isArrayLike({ length: 0 }); // true -isArrayLike("foo"); // false -isArrayLike("foo", { allowString: true }); // true -``` - -## `array-like/ensure` - -If given argument is an _array-like_, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureArrayLike = require("type/array-like/ensure"); - -ensureArrayLike({ length: 0 }); // { length: 0 } -ensureArrayLike("foo", { allowString: true }); // "foo" -ensureArrayLike({}); // Thrown TypeError: null is not an iterable -``` diff --git a/system/websocket_test/node_modules/type/docs/array.md b/system/websocket_test/node_modules/type/docs/array.md deleted file mode 100644 index 0c6ac4e..0000000 --- a/system/websocket_test/node_modules/type/docs/array.md +++ /dev/null @@ -1,46 +0,0 @@ -# Array - -_Array_ instance - -## `array/is` - -Confirms if given object is a native array - -```javascript -const isArray = require("type/array/is"); - -isArray([]); // true -isArray({}); // false -isArray("foo"); // false -``` - -## `array/ensure` - -If given argument is an array, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureArray = require("type/array/ensure"); - -ensureArray(["foo"]); // ["foo"] -ensureArray("foo"); // Thrown TypeError: foo is not an array -``` - -### Confirming on items - -Items can be validated by passing `ensureItem` option. Note that in this case: - -- A newly created instance of an array with coerced item values is returned -- Error message lists up to three items which are invalid - -```javascript -const ensureString = require("type/string/ensure"); - -ensureArray([12], { ensureItem: ensureString }); // ["12"] - -/* - Below invocation with crash with: - TypeError: 23, [object Object], [object Object] is not a valid array. - Following items are invalid: [object Object], [object Object] -*/ -ensureArray([23, {}, {}], { ensureItem: ensureString }); -``` diff --git a/system/websocket_test/node_modules/type/docs/big-int.md b/system/websocket_test/node_modules/type/docs/big-int.md deleted file mode 100644 index 78626fd..0000000 --- a/system/websocket_test/node_modules/type/docs/big-int.md +++ /dev/null @@ -1,27 +0,0 @@ -# BigInt - -_bigint_ primitive - -## `big-int/coerce` - -BigInt coercion. If value can be coerced by `BigInt` its result is returned. -For all other values `null` is returned - -```javascript -const coerceToBigInt = require("type/big-int/coerce"); - -coerceToBigInt(12); // 12n -coerceToBigInt(undefined); // null -``` - -## `big-int/ensure` - -If given argument is a _bigint_ coercible value (via [`big-int/coerce`](#big-intcoerce)) returns result bigint. -Otherwise `TypeError` is thrown. - -```javascript -const ensureBigInt = require("type/big-int/ensure"); - -ensureBigInt(12); // 12n -ensureBigInt(null); // Thrown TypeError: null is not a bigint -``` diff --git a/system/websocket_test/node_modules/type/docs/constructor.md b/system/websocket_test/node_modules/type/docs/constructor.md deleted file mode 100644 index 172462a..0000000 --- a/system/websocket_test/node_modules/type/docs/constructor.md +++ /dev/null @@ -1,28 +0,0 @@ -# Constructor - -A _Function_ instance that's a _constructor_ (either regular function or _class_) - -## `constructor/is` - -Confirms if given object is a constructor function\_ - -```javascript -const isConstructor = require("type/constructor/is"); - -isConstructor(function () {}); // true -isConstructor(() => {}); // false -isConstructor(class {}); // true -isConstructor("foo"); // false -``` - -## `constructor/ensure` - -If given argument is a _constructor function_, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureConstructor = require("type/constructor/ensure"); - -const fn = function () {}; -ensureConstructor(fn); // fn -ensureConstructor(() => {}); // Thrown TypeError: () => {} is not a constructor function -``` diff --git a/system/websocket_test/node_modules/type/docs/date.md b/system/websocket_test/node_modules/type/docs/date.md deleted file mode 100644 index 98d3654..0000000 --- a/system/websocket_test/node_modules/type/docs/date.md +++ /dev/null @@ -1,28 +0,0 @@ -# Date - -_Date_ instance - -## `date/is` - -Confirms if given object is a native date, and is not an _Invalid Date_ - -```javascript -const isDate = require("type/date/is"); - -isDate(new Date()); // true -isDate(new Date("Invalid date")); // false -isDate(Date.now()); // false -isDate("foo"); // false -``` - -## `date/ensure` - -If given argument is a date object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureDate = require("type/date/ensure"); - -const date = new Date(); -ensureDate(date); // date -ensureDate(123123); // Thrown TypeError: 123123 is not a date object -``` diff --git a/system/websocket_test/node_modules/type/docs/ensure.md b/system/websocket_test/node_modules/type/docs/ensure.md deleted file mode 100644 index c3a9527..0000000 --- a/system/websocket_test/node_modules/type/docs/ensure.md +++ /dev/null @@ -1,40 +0,0 @@ -# `ensure(validationDatum1[, ...validationDatumN[, options]])` - -Provides a complete cumulated input validation for an API endpoint. Validates multiple input arguments and consolidates eventual errors into one. - -## Arguments - -### `validationDatum1[, ...validationDatumN]` - -For each argument to be validated a `validationDatum` of following stucture should be defined: - -```javascript -[argumentName, inputValue, ensureFunction, (options = {})]; -``` - -- `argumentName` - Name of validated argument (used for meaningful error messaging) -- `inputValue` - An argument value as passed to function -- `ensureFunction` - An `ensureX` function with which argument should be validated (e.g. if we're after string, then we need [string/ensure](string.md#stringensure)) -- `options` - Optional, extra options to be passed to `ensureX` function - -### `[options]` - -Eventual options be passed to underlying `ensureX` functions. If custom error constructor is passed with an `Error` option, then cumulated error is created with this constructor. - -## Usage example - -```javascript -const ensure = require("type/ensure"); -const ensureString = require("type/string/ensure"); -const ensureNaturalNumber = require("type/natural-number/ensure"); - -const resolveRepositoryIssue = (repoName, issueNumber) => { - // Validate input - [repoName, issueNumber] = ensure( - ["repoName", repoName, ensureString], - ["issueNumber", issueNumber, ensureNaturalNumber], - { Error: UserError } - ); - // ... logic -}; -``` diff --git a/system/websocket_test/node_modules/type/docs/error.md b/system/websocket_test/node_modules/type/docs/error.md deleted file mode 100644 index c779333..0000000 --- a/system/websocket_test/node_modules/type/docs/error.md +++ /dev/null @@ -1,26 +0,0 @@ -# Error - -_Error_ instance - -## `error/is` - -Confirms if given object is a native error object - -```javascript -const isError = require("type/error/is"); - -isError(new Error()); // true -isError({ message: "Fake error" }); // false -``` - -## `error/ensure` - -If given argument is an error object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureError = require("type/error/ensure"); - -const someError = new Error("Some error"); -ensureError(someError); // someError -ensureError({ message: "Fake error" }); // Thrown TypeError: [object Object] is not an error object -``` diff --git a/system/websocket_test/node_modules/type/docs/finite.md b/system/websocket_test/node_modules/type/docs/finite.md deleted file mode 100644 index 68786ca..0000000 --- a/system/websocket_test/node_modules/type/docs/finite.md +++ /dev/null @@ -1,27 +0,0 @@ -# Finite Number - -Finite _number_ primitive - -## `finite/coerce` - -Follows [`number/coerce`](number.md#numbercoerce) additionally rejecting `Infinity` and `-Infinity` values (`null` is returned if given values coerces to them) - -```javascript -const coerceToFinite = require("type/finite/coerce"); - -coerceToFinite("12"); // 12 -coerceToFinite(Infinity); // null -coerceToFinite(null); // null -``` - -## `finite/ensure` - -If given argument is a finite number coercible value (via [`finite/coerce`](#finitecoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureFinite = require("type/finite/ensure"); - -ensureFinite(12); // "12" -ensureFinite(null); // Thrown TypeError: null is not a finite number -``` diff --git a/system/websocket_test/node_modules/type/docs/function.md b/system/websocket_test/node_modules/type/docs/function.md deleted file mode 100644 index 23f3827..0000000 --- a/system/websocket_test/node_modules/type/docs/function.md +++ /dev/null @@ -1,28 +0,0 @@ -# Function - -_Function_ instance - -## `function/is` - -Confirms if given object is a native function - -```javascript -const isFunction = require("type/function/is"); - -isFunction(function () {}); // true -isFunction(() => {}); // true -isFunction(class {}); // true -isFunction("foo"); // false -``` - -## `function/ensure` - -If given argument is a function object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureFunction = require("type/function/ensure"); - -const fn = function () {}; -ensureFunction(fn); // fn -ensureFunction(/foo/); // Thrown TypeError: /foo/ is not a function -``` diff --git a/system/websocket_test/node_modules/type/docs/integer.md b/system/websocket_test/node_modules/type/docs/integer.md deleted file mode 100644 index 9260a46..0000000 --- a/system/websocket_test/node_modules/type/docs/integer.md +++ /dev/null @@ -1,27 +0,0 @@ -# Integer Number - -Integer _number_ primitive - -## `integer/coerce` - -Follows [`finite/coerce`](finite.md#finitecoerce) additionally stripping decimal part from the number - -```javascript -const coerceToInteger = require("type/integer/coerce"); - -coerceToInteger("12.95"); // 12 -coerceToInteger(Infinity); // null -coerceToInteger(null); // null -``` - -## `integer/ensure` - -If given argument is an integer coercible value (via [`integer/coerce`](#integercoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureInteger = require("type/integer/ensure"); - -ensureInteger(12.93); // "12" -ensureInteger(null); // Thrown TypeError: null is not an integer -``` diff --git a/system/websocket_test/node_modules/type/docs/iterable.md b/system/websocket_test/node_modules/type/docs/iterable.md deleted file mode 100644 index 862e6c8..0000000 --- a/system/websocket_test/node_modules/type/docs/iterable.md +++ /dev/null @@ -1,65 +0,0 @@ -# Iterable - -Value which implements _iterable_ protocol - -## `iterable/is` - -Confirms if given object is an _iterable_ and is not a _string_ (unless `allowString` option is passed) - -```javascript -const isIterable = require("type/iterable/is"); - -isIterable([]); // true -isIterable({}); // false -isIterable("foo"); // false -isIterable("foo", { allowString: true }); // true -``` - -Supports also `denyEmpty` option - -```javascript -isIterable([], { denyEmpty: true }); // false -isIterable(["foo"], { denyEmpty: true }); // true -``` - -## `iterable/ensure` - -If given argument is an _iterable_, it is returned back. Otherwise `TypeError` is thrown. -By default _string_ primitives are rejected unless `allowString` option is passed. - -```javascript -const ensureIterable = require("type/iterable/ensure"); - -ensureIterable([]); // [] -ensureIterable("foo", { allowString: true }); // "foo" -ensureIterable({}); // Thrown TypeError: null is not expected iterable -``` - -### Denying empty iterables - -Pass `denyEmpty` option to require non empty iterables - -```javascript -ensureIterable([], { denyEmpty: true }); // Thrown TypeError: [] is not expected iterable -``` - -### Confirming on items - -Items can be validated by passing `ensureItem` option. Note that in this case: - -- A newly created instance of array with coerced values is returned -- Error message lists up to three invalid items - -```javascript -const ensureString = require("type/string/ensure"); - -ensureIterable(new Set(["foo", 12]), { ensureItem: ensureString }); // ["foo", "12"] - -/* - Below invocation with crash with: - TypeError: [object Set] is not expected iterable value. - Following items are invalid: - - [object Object] -*/ -ensureIterable(new Set(["foo", {}]), { ensureItem: ensureString }); -``` diff --git a/system/websocket_test/node_modules/type/docs/map.md b/system/websocket_test/node_modules/type/docs/map.md deleted file mode 100644 index c128022..0000000 --- a/system/websocket_test/node_modules/type/docs/map.md +++ /dev/null @@ -1,27 +0,0 @@ -# Map - -_Map_ instance - -## `map/is` - -Confirms if given object is a native _map_ - -```javascript -const isMap = require("type/map/is"); - -isMap(new Map()); // true -isMap(new Set()); // false -isMap({}); // false -``` - -## `map/ensure` - -If given argument is a _map_, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureMap = require("type/map/ensure"); - -const map = new Map(); -ensureMap(map); // map -eensureMap({}); // Thrown TypeError: [object Object] is not a map -``` diff --git a/system/websocket_test/node_modules/type/docs/natural-number.md b/system/websocket_test/node_modules/type/docs/natural-number.md deleted file mode 100644 index c91ee16..0000000 --- a/system/websocket_test/node_modules/type/docs/natural-number.md +++ /dev/null @@ -1,27 +0,0 @@ -# Natural Number - -Natural _number_ primitive - -## `natural-number/coerce` - -Follows [`integer/coerce`](integer.md#integercoerce) but returns `null` for values below `0` - -```javascript -const coerceToNaturalNumber = require("type/natural-number/coerce"); - -coerceToNaturalNumber("12.95"); // 12 -coerceToNaturalNumber(-120); // null -coerceToNaturalNumber(null); // null -``` - -## `natural-number/ensure` - -If given argument is a natural number coercible value (via [`natural-number/coerce`](#natural-numbercoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureNaturalNumber = require("type/natural-number/ensure"); - -ensureNaturalNumber(12.93); // "12" -ensureNaturalNumber(-230); // Thrown TypeError: null is not a natural number -``` diff --git a/system/websocket_test/node_modules/type/docs/number.md b/system/websocket_test/node_modules/type/docs/number.md deleted file mode 100644 index 5f4dfa9..0000000 --- a/system/websocket_test/node_modules/type/docs/number.md +++ /dev/null @@ -1,33 +0,0 @@ -# Number - -_number_ primitive - -## `number/coerce` - -Restricted number coercion. Returns number presentation for every value that follows below constraints - -- is implicitly coercible to number -- is neither `null` nor `undefined` -- is not `NaN` and doesn't coerce to `NaN` - -For all other values `null` is returned - -```javascript -const coerceToNumber = require("type/number/coerce"); - -coerceToNumber("12"); // 12 -coerceToNumber({}); // null -coerceToNumber(null); // null -``` - -## `number/ensure` - -If given argument is a number coercible value (via [`number/coerce`](#numbercoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureNumber = require("type/number/ensure"); - -ensureNumber(12); // "12" -ensureNumber(null); // Thrown TypeError: null is not a number -``` diff --git a/system/websocket_test/node_modules/type/docs/object.md b/system/websocket_test/node_modules/type/docs/object.md deleted file mode 100644 index ed43b1f..0000000 --- a/system/websocket_test/node_modules/type/docs/object.md +++ /dev/null @@ -1,28 +0,0 @@ -# Object - -_Object_, any non-primitive value - -## `object/is` - -Confirms if passed value is an object - -```javascript -const isObject = require("type/object/is"); - -isObject({}); // true -isObject(true); // false -isObject(null); // false -``` - -## `object/ensure` - -If given argument is an object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureObject = require("type/object/ensure"); - -const obj = {}; - -ensureObject(obj); // obj -ensureString(null); // Thrown TypeError: null is not an object -``` diff --git a/system/websocket_test/node_modules/type/docs/plain-function.md b/system/websocket_test/node_modules/type/docs/plain-function.md deleted file mode 100644 index e3a8895..0000000 --- a/system/websocket_test/node_modules/type/docs/plain-function.md +++ /dev/null @@ -1,28 +0,0 @@ -# Plain Function - -A _Function_ instance that is not a _Class_ - -## `plain-function/is` - -Confirms if given object is a _plain function_ - -```javascript -const isPlainFunction = require("type/plain-function/is"); - -isPlainFunction(function () {}); // true -isPlainFunction(() => {}); // true -isPlainFunction(class {}); // false -isPlainFunction("foo"); // false -``` - -## `plain-function/ensure` - -If given argument is a _plain function_ object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensurePlainFunction = require("type/function/ensure"); - -const fn = function () {}; -ensurePlainFunction(fn); // fn -ensurePlainFunction(class {}); // Thrown TypeError: class is not a plain function -``` diff --git a/system/websocket_test/node_modules/type/docs/plain-object.md b/system/websocket_test/node_modules/type/docs/plain-object.md deleted file mode 100644 index ce3f522..0000000 --- a/system/websocket_test/node_modules/type/docs/plain-object.md +++ /dev/null @@ -1,69 +0,0 @@ -# Plain Object - -A _plain object_ - -- Inherits directly from `Object.prototype` or `null` -- Is not a constructor's `prototype` property - -## `plain-object/is` - -Confirms if given object is a _plain object_ - -```javascript -const isPlainObject = require("type/plain-object/is"); - -isPlainObject({}); // true -isPlainObject(Object.create(null)); // true -isPlainObject([]); // false -``` - -## `plain-object/ensure` - -If given argument is a plain object it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensurePlainObject = require("type/plain-object/ensure"); - -ensurePlainObject({}); // {} -ensurePlainObject("foo"); // Thrown TypeError: foo is not a plain object -``` - -### Confirming on keys - -Keys can be validated by passing `allowedKeys` option. Note that in this case: - -- Error message lists up to three invalid keys - -```javascript -const allowedKeys = ["foo"]; - -ensurePlainObject({}, { allowedKeys }); // {} -ensurePlainObject({ foo: "bar" }, { allowedKeys }); // { foo: 'bar' } - -/* - Below invocation with crash with: - TypeError: [object Object] is not a valid plain object. - Following keys are unexpected: lorem, ipsum -*/ -ensurePlainObject({ foo: "bar", lorem: 1, ipsum: 2 }, { allowedKeys }); -``` - -### Confirming on property values - -Property values can be validated by passing `ensurePropertyValue` option. Note that in this case: - -- A newly created instance of plain object with coerced values is returned -- Error message lists up to three keys that contain invalid values - -```javascript -const ensureString = require("type/string/ensure"); - -ensurePlainObject({ foo: 12 }, { ensurePropertyValue: ensureString }); // { foo: '12' } - -/* - Below invocation with crash with: - TypeError: [object Object] is not a valid plain object. - Valuees for following keys are invalid: lorem, ipsum -*/ -ensurePlainObject({ foo: 23, lorem: {}, ipsum: {} }, { ensurePropertyValue: ensureString }); -``` diff --git a/system/websocket_test/node_modules/type/docs/promise.md b/system/websocket_test/node_modules/type/docs/promise.md deleted file mode 100644 index ce38794..0000000 --- a/system/websocket_test/node_modules/type/docs/promise.md +++ /dev/null @@ -1,27 +0,0 @@ -# Promise - -_Promise_ instance - -## `promise/is` - -Confirms if given object is a native _promise_ - -```javascript -const isPromise = require("type/promise/is"); - -isPromise(Promise.resolve()); // true -isPromise({ then: () => {} }); // false -isPromise({}); // false -``` - -## `promise/ensure` - -If given argument is a promise, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensurePromise = require("type/promise/ensure"); - -const promise = Promise.resolve(); -ensurePromise(promise); // promise -eensurePromise({}); // Thrown TypeError: [object Object] is not a promise -``` diff --git a/system/websocket_test/node_modules/type/docs/prototype.md b/system/websocket_test/node_modules/type/docs/prototype.md deleted file mode 100644 index 926c256..0000000 --- a/system/websocket_test/node_modules/type/docs/prototype.md +++ /dev/null @@ -1,15 +0,0 @@ -# Prototype - -Some constructor's `prototype` property - -## `prototype/is` - -Confirms if given object serves as a _prototype_ property - -```javascript -const isPrototype = require("type/prototype/is"); - -isPrototype({}); // false -isPrototype(Object.prototype); // true -isPrototype(Array.prototype); // true -``` diff --git a/system/websocket_test/node_modules/type/docs/reg-exp.md b/system/websocket_test/node_modules/type/docs/reg-exp.md deleted file mode 100644 index 00d081c..0000000 --- a/system/websocket_test/node_modules/type/docs/reg-exp.md +++ /dev/null @@ -1,26 +0,0 @@ -# RegExp - -_RegExp_ instance - -## `reg-exp/is` - -Confirms if given object is a native regular expression object - -```javascript -const isRegExp = require("type/reg-exp/is"); - -isRegExp(/foo/); -isRegExp({}); // false -isRegExp("foo"); // false -``` - -## `reg-exp/ensure` - -If given argument is a regular expression object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureRegExp = require("type/reg-exp/ensure"); - -ensureRegExp(/foo/); // /foo/ -ensureRegExp("foo"); // Thrown TypeError: null is not a regular expression object -``` diff --git a/system/websocket_test/node_modules/type/docs/safe-integer.md b/system/websocket_test/node_modules/type/docs/safe-integer.md deleted file mode 100644 index cf4bb1c..0000000 --- a/system/websocket_test/node_modules/type/docs/safe-integer.md +++ /dev/null @@ -1,27 +0,0 @@ -# Safe Integer Number - -Safe integer _number_ primitive - -## `safe-integer/coerce` - -Follows [`integer/coerce`](integer.md#integercoerce) but returns `null` in place of values which are beyond `Number.MIN_SAFE_INTEGER` and `Number.MAX_SAFE_INTEGER` range. - -```javascript -const coerceToSafeInteger = require("type/safe-integer/coerce"); - -coerceToInteger("12.95"); // 12 -coerceToInteger(9007199254740992); // null -coerceToInteger(null); // null -``` - -## `safe-integer/ensure` - -If given argument is a safe integer coercible value (via [`safe-integer/coerce`](#safe-integercoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureSafeInteger = require("type/safe-integer/ensure"); - -ensureSafeInteger(12.93); // "12" -ensureSafeInteger(9007199254740992); // Thrown TypeError: null is not a safe integer -``` diff --git a/system/websocket_test/node_modules/type/docs/set.md b/system/websocket_test/node_modules/type/docs/set.md deleted file mode 100644 index 33f8876..0000000 --- a/system/websocket_test/node_modules/type/docs/set.md +++ /dev/null @@ -1,27 +0,0 @@ -# Set - -_Set_ instance - -## `set/is` - -Confirms if given object is a native set\_ - -```javascript -const isSet = require("type/set/is"); - -isSet(new Set()); // true -isSet(new Map()); // false -isSet({}); // false -``` - -## `Set/ensure` - -If given argument is a _set_, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureSet = require("type/set/ensure"); - -const set = new Set(); -ensureSet(set); // set -eensureSet({}); // Thrown TypeError: [object Object] is not a set -``` diff --git a/system/websocket_test/node_modules/type/docs/string.md b/system/websocket_test/node_modules/type/docs/string.md deleted file mode 100644 index 051b4a3..0000000 --- a/system/websocket_test/node_modules/type/docs/string.md +++ /dev/null @@ -1,32 +0,0 @@ -# String - -_string_ primitive - -## `string/coerce` - -Restricted string coercion. Returns string presentation for every value that follows below constraints - -- is implicitly coercible to string -- is neither`null` nor `undefined` -- its `toString` method is not `Object.prototype.toString` - -For all other values `null` is returned - -```javascript -const coerceToString = require("type/string/coerce"); - -coerceToString(12); // "12" -coerceToString(undefined); // null -``` - -## `string/ensure` - -If given argument is a string coercible value (via [`string/coerce`](#stringcoerce)) returns result string. -Otherwise `TypeError` is thrown. - -```javascript -const ensureString = require("type/string/ensure"); - -ensureString(12); // "12" -ensureString(null); // Thrown TypeError: null is not a string -``` diff --git a/system/websocket_test/node_modules/type/docs/thenable.md b/system/websocket_test/node_modules/type/docs/thenable.md deleted file mode 100644 index 1bdf92d..0000000 --- a/system/websocket_test/node_modules/type/docs/thenable.md +++ /dev/null @@ -1,27 +0,0 @@ -# Thenable - -_Thenable_ object (an object with `then` method) - -## `thenable/is` - -Confirms if given object is a _thenable_ - -```javascript -const isThenable = require("type/thenable/is"); - -isThenable(Promise.resolve()); // true -isThenable({ then: () => {} }); // true -isThenable({}); // false -``` - -## `thenable/ensure` - -If given argument is a _thenable_ object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureThenable = require("type/thenable/ensure"); - -const promise = Promise.resolve(); -ensureThenable(promise); // promise -ensureThenable({}); // Thrown TypeError: [object Object] is not a thenable object -``` diff --git a/system/websocket_test/node_modules/type/docs/time-value.md b/system/websocket_test/node_modules/type/docs/time-value.md deleted file mode 100644 index 98e9e8e..0000000 --- a/system/websocket_test/node_modules/type/docs/time-value.md +++ /dev/null @@ -1,27 +0,0 @@ -# Time value - -_number_ primitive which is a valid _time value_ (as used internally in _Date_ instances) - -## `time-value/coerce` - -Follows [`integer/coerce`](integer.md#integercoerce) but returns `null` in place of values which go beyond 100 000 0000 days from unix epoch - -```javascript -const coerceToTimeValue = require("type/time-value/coerce"); - -coerceToTimeValue(12312312); // true -coerceToTimeValue(Number.MAX_SAFE_INTEGER); // false -coerceToTimeValue("foo"); // false -``` - -## `time-value/ensure` - -If given argument is a _time value_ coercible value (via [`time-value/coerce`](#time-valuecoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureTimeValue = require("type/time-value/ensure"); - -ensureTimeValue(12.93); // "12" -ensureTimeValue(Number.MAX_SAFE_INTEGER); // Thrown TypeError: null is not a natural number -``` diff --git a/system/websocket_test/node_modules/type/docs/value.md b/system/websocket_test/node_modules/type/docs/value.md deleted file mode 100644 index 1310609..0000000 --- a/system/websocket_test/node_modules/type/docs/value.md +++ /dev/null @@ -1,27 +0,0 @@ -# Value - -_Value_, any value that's neither `null` nor `undefined` . - -## `value/is` - -Confirms whether passed argument is a _value_ - -```javascript -const isValue = require("type/value/is"); - -isValue({}); // true -isValue(null); // false -``` - -## `value/ensure` - -Ensures if given argument is a _value_. If it's a value it is returned back, if not `TypeError` is thrown - -```javascript -const ensureValue = require("type/value/ensure"); - -const obj = {}; - -ensureValue(obj); // obj -ensureValue(null); // Thrown TypeError: Cannot use null -``` diff --git a/system/websocket_test/node_modules/type/ensure.js b/system/websocket_test/node_modules/type/ensure.js deleted file mode 100644 index 7fe8220..0000000 --- a/system/websocket_test/node_modules/type/ensure.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; - -var isArray = require("./array/is") - , toShortString = require("./lib/to-short-string"); - -var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; - -var assign = function (target, source) { - for (var key in source) { - if (objPropertyIsEnumerable.call(source, key)) target[key] = source[key]; - } -}; - -module.exports = function (validationDatum1/*, ...validationDatumN, options */) { - var validationData = [validationDatum1]; - var globalOptions; - if (arguments.length > 1) { - var hasOptions = !isArray(arguments[arguments.length - 1]); - if (hasOptions) globalOptions = arguments[arguments.length - 1]; - var lastDatumIndex = hasOptions ? arguments.length - 2 : arguments.length - 1; - for (var i = 1; i <= lastDatumIndex; ++i) validationData.push(arguments[i]); - } - var result = [], errors; - for (var j = 0; j < validationData.length; ++j) { - var validationDatum = validationData[j]; - var options = { name: validationDatum[0] }; - if (globalOptions) assign(options, globalOptions); - if (validationDatum[3]) assign(options, validationDatum[3]); - var resultItem; - if (typeof validationDatum[2] !== "function") { - throw new TypeError(toShortString(validationDatum[2]) + " is not a function"); - } - try { - resultItem = validationDatum[2](validationDatum[1], options); - } catch (error) { - if (!errors) errors = []; - errors.push(error); - } - if (errors) continue; - result.push(resultItem); - } - if (!errors) return result; - - if (errors.length === 1) throw errors[0]; - var ErrorConstructor = (globalOptions && globalOptions.Error) || TypeError; - var errorMessage = "Approached following errors:"; - for (var k = 0; k < errors.length; ++k) { - errorMessage += "\n - " + errors[k].message.split("\n").join("\n "); - } - throw new ErrorConstructor(errorMessage); -}; diff --git a/system/websocket_test/node_modules/type/error/ensure.js b/system/websocket_test/node_modules/type/error/ensure.js deleted file mode 100644 index 8b28d85..0000000 --- a/system/websocket_test/node_modules/type/error/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected an error for %n, received %v" : "%v is not an error"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/error/is.js b/system/websocket_test/node_modules/type/error/is.js deleted file mode 100644 index bf04c80..0000000 --- a/system/websocket_test/node_modules/type/error/is.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is") - , isPlainObject = require("../plain-object/is"); - -var objectToString = Object.prototype.toString; - -// Recognize host specific errors (e.g. DOMException) -var errorTaggedStringRe = /^\[object .*(?:Error|Exception)\]$/ - , errorNameRe = /^[^\s]*(?:Error|Exception)$/; - -module.exports = function (value) { - if (!value) return false; - - var name; - // Sanity check (reject objects which do not expose common Error interface) - try { - name = value.name; - if (typeof name !== "string") return false; - if (typeof value.message !== "string") return false; - } catch (error) { - return false; - } - - // Ensure its a native-like Error object - // (has [[ErrorData]] slot, or was created to resemble one) - // Note: It's not a 100% bulletproof check of confirming that as: - // - In ES2015+ string tag can be overriden via Symbol.toStringTag property - // - Host errors do not share native error tag. Still we rely on assumption that - // tag for each error will end either with `Error` or `Exception` string - // - In pre ES2015 era, no custom errors will share the error tag. - if (!errorTaggedStringRe.test(objectToString.call(value))) { - // Definitely not an ES2015 error instance, but could still be an error - // (created via e.g. CustomError.prototype = Object.create(Error.prototype)) - try { - if (name !== value.constructor.name) return false; - } catch (error) { - return false; - } - if (!errorNameRe.test(name)) return false; - if (isPlainObject(value)) return false; - } - - return !isPrototype(value); -}; diff --git a/system/websocket_test/node_modules/type/finite/coerce.js b/system/websocket_test/node_modules/type/finite/coerce.js deleted file mode 100644 index a3783be..0000000 --- a/system/websocket_test/node_modules/type/finite/coerce.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var coerceToNumber = require("../number/coerce"); - -module.exports = function (value) { - value = coerceToNumber(value); - return isFinite(value) ? value : null; -}; diff --git a/system/websocket_test/node_modules/type/finite/ensure.js b/system/websocket_test/node_modules/type/finite/ensure.js deleted file mode 100644 index aac96be..0000000 --- a/system/websocket_test/node_modules/type/finite/ensure.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a finite number for %n, received %v" - : "%v is not a finite number"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/function/ensure.js b/system/websocket_test/node_modules/type/function/ensure.js deleted file mode 100644 index d133701..0000000 --- a/system/websocket_test/node_modules/type/function/ensure.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a function for %n, received %v" - : "%v is not a function"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/function/is.js b/system/websocket_test/node_modules/type/function/is.js deleted file mode 100644 index 981990a..0000000 --- a/system/websocket_test/node_modules/type/function/is.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is"); - -module.exports = function (value) { - if (typeof value !== "function") return false; - - if (!hasOwnProperty.call(value, "length")) return false; - - try { - if (typeof value.length !== "number") return false; - if (typeof value.call !== "function") return false; - if (typeof value.apply !== "function") return false; - } catch (error) { - return false; - } - - return !isPrototype(value); -}; diff --git a/system/websocket_test/node_modules/type/integer/coerce.js b/system/websocket_test/node_modules/type/integer/coerce.js deleted file mode 100644 index cba5e17..0000000 --- a/system/websocket_test/node_modules/type/integer/coerce.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var coerceToFinite = require("../finite/coerce"); - -var abs = Math.abs, floor = Math.floor; - -module.exports = function (value) { - value = coerceToFinite(value); - if (!value) return value; - return (value > 0 ? 1 : -1) * floor(abs(value)); -}; diff --git a/system/websocket_test/node_modules/type/integer/ensure.js b/system/websocket_test/node_modules/type/integer/ensure.js deleted file mode 100644 index df1a975..0000000 --- a/system/websocket_test/node_modules/type/integer/ensure.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected an integer for %n, received %v" - : "%v is not an integer"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/iterable/ensure.js b/system/websocket_test/node_modules/type/iterable/ensure.js deleted file mode 100644 index b1a2489..0000000 --- a/system/websocket_test/node_modules/type/iterable/ensure.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , resolveErrorMessage = require("../lib/resolve-error-message") - , toShortString = require("../lib/to-short-string") - , ensurePlainFunction = require("../plain-function/ensure") - , is = require("./is"); - -var invalidItemsLimit = 3; - -module.exports = function (value/*, options*/) { - var options = arguments[1]; - var mainErrorMessage = - options && options.name - ? "Expected an iterable for %n, received %v" - : "%v is not expected iterable"; - if (!is(value, options)) return resolveException(value, mainErrorMessage, options); - if (!options) return value; - - var ensureItem = ensurePlainFunction(options.ensureItem, { isOptional: true }); - if (ensureItem) { - var coercedValue = []; - var iterator = value[Symbol.iterator](); - var item, invalidItems; - while (!(item = iterator.next()).done) { - var newItemValue; - try { - newItemValue = ensureItem(item.value); - } catch (error) { - if (!invalidItems) invalidItems = []; - if (invalidItems.push(item.value) === invalidItemsLimit) break; - } - if (invalidItems) continue; - coercedValue.push(newItemValue); - } - if (invalidItems) { - var errorMessage = - resolveErrorMessage(mainErrorMessage, value, options) + - ".\n Following items are invalid:"; - for (var i = 0; i < invalidItems.length; ++i) { - errorMessage += "\n - " + toShortString(invalidItems[i]); - } - throw new TypeError(errorMessage); - } - return coercedValue; - } - - return value; -}; diff --git a/system/websocket_test/node_modules/type/iterable/is.js b/system/websocket_test/node_modules/type/iterable/is.js deleted file mode 100644 index d35408c..0000000 --- a/system/websocket_test/node_modules/type/iterable/is.js +++ /dev/null @@ -1,32 +0,0 @@ -// Polyfills friendly, therefore ES5 syntax - -"use strict"; - -var isObject = require("../object/is"); - -var iteratorSymbol = Symbol.iterator; - -if (!iteratorSymbol) { - throw new Error("Cannot initialize iterator/is due to Symbol.iterator not being implemented"); -} - -module.exports = function (value/*, options*/) { - var options = arguments[1]; - if (!isObject(value)) { - if (!isObject(options) || !options.allowString || typeof value !== "string") return false; - } - try { - if (typeof value[iteratorSymbol] !== "function") return false; - } catch (error) { - return false; - } - if (!options) return true; - if (options.denyEmpty) { - try { - if (value[iteratorSymbol]().next().done) return false; - } catch (error) { - return false; - } - } - return true; -}; diff --git a/system/websocket_test/node_modules/type/lib/ensure/min.js b/system/websocket_test/node_modules/type/lib/ensure/min.js deleted file mode 100644 index df878bd..0000000 --- a/system/websocket_test/node_modules/type/lib/ensure/min.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../resolve-exception"); - -module.exports = function (value, coerced, options) { - if (coerced >= options.min) return coerced; - var errorMessage = - options && options.name - ? "Expected %n to be greater or equal " + options.min + ", received %v" - : "%v is not greater or equal " + options.min; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/lib/is-to-string-tag-supported.js b/system/websocket_test/node_modules/type/lib/is-to-string-tag-supported.js deleted file mode 100644 index 254d8b3..0000000 --- a/system/websocket_test/node_modules/type/lib/is-to-string-tag-supported.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol"; diff --git a/system/websocket_test/node_modules/type/lib/resolve-error-message.js b/system/websocket_test/node_modules/type/lib/resolve-error-message.js deleted file mode 100644 index 3cb000b..0000000 --- a/system/websocket_test/node_modules/type/lib/resolve-error-message.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -var stringCoerce = require("../string/coerce") - , toShortString = require("./to-short-string"); - -module.exports = function (errorMessage, value, inputOptions) { - if (inputOptions && inputOptions.errorMessage) { - errorMessage = stringCoerce(inputOptions.errorMessage); - } - - var valueInsertIndex = errorMessage.indexOf("%v"); - var valueToken = valueInsertIndex > -1 ? toShortString(value) : null; - if (inputOptions && inputOptions.name) { - var nameInsertIndex = errorMessage.indexOf("%n"); - if (nameInsertIndex > -1) { - if (valueInsertIndex > -1) { - var firstToken, secondToken, firstInsertIndex, secondInsertIndex; - if (nameInsertIndex > valueInsertIndex) { - firstToken = valueToken; - firstInsertIndex = valueInsertIndex; - secondToken = inputOptions.name; - secondInsertIndex = nameInsertIndex; - } else { - firstToken = inputOptions.name; - firstInsertIndex = nameInsertIndex; - secondToken = valueToken; - secondInsertIndex = valueInsertIndex; - } - return ( - errorMessage.slice(0, firstInsertIndex) + - firstToken + - errorMessage.slice(firstInsertIndex + 2, secondInsertIndex) + - secondToken + - errorMessage.slice(secondInsertIndex + 2) - ); - } - return ( - errorMessage.slice(0, nameInsertIndex) + - inputOptions.name + - errorMessage.slice(nameInsertIndex + 2) - ); - } - } - if (valueInsertIndex > -1) { - return ( - errorMessage.slice(0, valueInsertIndex) + - valueToken + - errorMessage.slice(valueInsertIndex + 2) - ); - } - return errorMessage; -}; diff --git a/system/websocket_test/node_modules/type/lib/resolve-exception.js b/system/websocket_test/node_modules/type/lib/resolve-exception.js deleted file mode 100644 index 6c99286..0000000 --- a/system/websocket_test/node_modules/type/lib/resolve-exception.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var isValue = require("../value/is") - , resolveErrorMessage = require("./resolve-error-message"); - -module.exports = function (value, defaultMessage, inputOptions) { - if (inputOptions && !isValue(value)) { - if ("default" in inputOptions) return inputOptions["default"]; - if (inputOptions.isOptional) return null; - } - var ErrorConstructor = (inputOptions && inputOptions.Error) || TypeError; - var error = new ErrorConstructor(resolveErrorMessage(defaultMessage, value, inputOptions)); - if (inputOptions && inputOptions.errorCode) error.code = inputOptions.errorCode; - throw error; -}; diff --git a/system/websocket_test/node_modules/type/lib/safe-to-string.js b/system/websocket_test/node_modules/type/lib/safe-to-string.js deleted file mode 100644 index a756dd3..0000000 --- a/system/websocket_test/node_modules/type/lib/safe-to-string.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -module.exports = function (value) { - try { - return value.toString(); - } catch (error) { - try { return String(value); } - catch (error2) { return null; } - } -}; diff --git a/system/websocket_test/node_modules/type/lib/to-short-string.js b/system/websocket_test/node_modules/type/lib/to-short-string.js deleted file mode 100644 index c8d7ed8..0000000 --- a/system/websocket_test/node_modules/type/lib/to-short-string.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; - -var safeToString = require("./safe-to-string"); - -var reNewLine = /[\n\r\u2028\u2029]/g; - -module.exports = function (value) { - var string = safeToString(value); - if (string === null) return ""; - // Trim if too long - if (string.length > 100) string = string.slice(0, 99) + "…"; - // Replace eventual new lines - string = string.replace(reNewLine, function (char) { - switch (char) { - case "\n": - return "\\n"; - case "\r": - return "\\r"; - case "\u2028": - return "\\u2028"; - case "\u2029": - return "\\u2029"; - /* istanbul ignore next */ - default: - throw new Error("Unexpected character"); - } - }); - return string; -}; diff --git a/system/websocket_test/node_modules/type/map/ensure.js b/system/websocket_test/node_modules/type/map/ensure.js deleted file mode 100644 index 3e3325a..0000000 --- a/system/websocket_test/node_modules/type/map/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value /*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a map for %n, received %v" : "%v is not a map"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/map/is.js b/system/websocket_test/node_modules/type/map/is.js deleted file mode 100644 index 4ed7bae..0000000 --- a/system/websocket_test/node_modules/type/map/is.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is"); - -// In theory we could rely on Symbol.toStringTag directly, -// still early native implementation (e.g. in FF) predated symbols -var objectToString = Object.prototype.toString, objectTaggedString = objectToString.call(new Map()); - -module.exports = function (value) { - if (!value) return false; - - // Sanity check (reject objects which do not expose common Promise interface) - try { - if (typeof value.set !== "function") return false; - if (typeof value.get !== "function") return false; - if (typeof value.has !== "function") return false; - if (typeof value.clear !== "function") return false; - } catch (error) { - return false; - } - - // Ensure its native Promise object (has [[MapData]] slot) - // Note: it's not 100% precise as string tag may be overriden - // and other objects could be hacked to expose it - if (objectToString.call(value) !== objectTaggedString) return false; - - return !isPrototype(value); -}; diff --git a/system/websocket_test/node_modules/type/natural-number/coerce.js b/system/websocket_test/node_modules/type/natural-number/coerce.js deleted file mode 100644 index 4b7931c..0000000 --- a/system/websocket_test/node_modules/type/natural-number/coerce.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var coerceToInteger = require("../integer/coerce"); - -module.exports = function (value) { - value = coerceToInteger(value); - if (!value) return value; - if (value < 0) return null; - return value; -}; diff --git a/system/websocket_test/node_modules/type/natural-number/ensure.js b/system/websocket_test/node_modules/type/natural-number/ensure.js deleted file mode 100644 index 1f09174..0000000 --- a/system/websocket_test/node_modules/type/natural-number/ensure.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , ensureMin = require("../lib/ensure/min") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value), options = arguments[1]; - if (coerced !== null) { - if (options) { - if (options.min) ensureMin(value, coerced, options); - } - return coerced; - } - - var errorMessage = - options && options.name - ? "Expected a natural number for %n, received %v" - : "%v is not a natural number"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/number/coerce.js b/system/websocket_test/node_modules/type/number/coerce.js deleted file mode 100644 index 1bb1512..0000000 --- a/system/websocket_test/node_modules/type/number/coerce.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var isValue = require("../value/is"); - -module.exports = function (value) { - if (!isValue(value)) return null; - try { - value = +value; // Ensure implicit coercion - } catch (error) { - return null; - } - if (isNaN(value)) return null; - return value; -}; diff --git a/system/websocket_test/node_modules/type/number/ensure.js b/system/websocket_test/node_modules/type/number/ensure.js deleted file mode 100644 index 9ae705d..0000000 --- a/system/websocket_test/node_modules/type/number/ensure.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a number for %n, received %v" : "%v is not a number"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/object/ensure.js b/system/websocket_test/node_modules/type/object/ensure.js deleted file mode 100644 index 341f55c..0000000 --- a/system/websocket_test/node_modules/type/object/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected an object for %n, received %v" : "%v is not an object"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/object/is.js b/system/websocket_test/node_modules/type/object/is.js deleted file mode 100644 index a254dcb..0000000 --- a/system/websocket_test/node_modules/type/object/is.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var isValue = require("../value/is"); - -// prettier-ignore -var possibleTypes = { "object": true, "function": true, "undefined": true /* document.all */ }; - -module.exports = function (value) { - if (!isValue(value)) return false; - return hasOwnProperty.call(possibleTypes, typeof value); -}; diff --git a/system/websocket_test/node_modules/type/package.json b/system/websocket_test/node_modules/type/package.json deleted file mode 100644 index a863fbf..0000000 --- a/system/websocket_test/node_modules/type/package.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "name": "type", - "version": "2.7.2", - "description": "Runtime validation and processing of JavaScript types", - "author": "Mariusz Nowak (https://www.medikoo.com/)", - "keywords": [ - "type", - "coercion" - ], - "repository": "medikoo/type", - "devDependencies": { - "chai": "^4.3.6", - "eslint": "^8.21.0", - "eslint-config-medikoo": "^4.1.2", - "git-list-updated": "^1.2.1", - "github-release-from-cc-changelog": "^2.3.0", - "husky": "^4.3.8", - "lint-staged": "^13.0.3", - "mocha": "^6.2.3", - "nyc": "^15.1.0", - "prettier-elastic": "^2.2.1" - }, - "typesVersions": { - ">=4": { - "*": [ - "ts-types/*" - ] - } - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.js": [ - "eslint" - ], - "*.{css,html,js,json,md,yaml,yml}": [ - "prettier -c" - ] - }, - "eslintConfig": { - "extends": "medikoo/es3", - "root": true, - "globals": { - "BigInt": true, - "Map": true, - "Promise": true, - "Set": true, - "Symbol": true - }, - "overrides": [ - { - "files": "test/**/*.js", - "env": { - "mocha": true - }, - "rules": { - "no-eval": "off", - "no-new-wrappers": "off" - } - }, - { - "files": [ - "string/coerce.js", - "number/coerce.js" - ], - "rules": { - "no-implicit-coercion": "off" - } - }, - { - "files": "plain-object/is.js", - "rules": { - "no-proto": "off" - } - } - ] - }, - "prettier": { - "printWidth": 100, - "tabWidth": 4, - "overrides": [ - { - "files": [ - "*.md", - "*.yml" - ], - "options": { - "tabWidth": 2 - } - } - ] - }, - "nyc": { - "all": true, - "exclude": [ - ".github", - "coverage/**", - "test/**", - "*.config.js" - ], - "reporter": [ - "lcov", - "html", - "text-summary" - ] - }, - "scripts": { - "coverage": "nyc npm test", - "lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'", - "prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettier-check:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", - "prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettify:updated": "pipe-git-updated ---base=main -ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write", - "test": "mocha --recursive" - }, - "license": "ISC" -} diff --git a/system/websocket_test/node_modules/type/plain-function/ensure.js b/system/websocket_test/node_modules/type/plain-function/ensure.js deleted file mode 100644 index d3a20e6..0000000 --- a/system/websocket_test/node_modules/type/plain-function/ensure.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a plain function for %n, received %v" - : "%v is not a plain function"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/plain-function/is.js b/system/websocket_test/node_modules/type/plain-function/is.js deleted file mode 100644 index b55d4ff..0000000 --- a/system/websocket_test/node_modules/type/plain-function/is.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var isFunction = require("../function/is"); - -var classRe = /^\s*class[\s{/}]/, functionToString = Function.prototype.toString; - -module.exports = function (value) { - if (!isFunction(value)) return false; - if (classRe.test(functionToString.call(value))) return false; - return true; -}; diff --git a/system/websocket_test/node_modules/type/plain-object/ensure.js b/system/websocket_test/node_modules/type/plain-object/ensure.js deleted file mode 100644 index 519261e..0000000 --- a/system/websocket_test/node_modules/type/plain-object/ensure.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , resolveErrorMessage = require("../lib/resolve-error-message") - , ensurePlainFunction = require("../plain-function/ensure") - , ensureArray = require("../array/ensure") - , is = require("./is"); - -var objHasOwnProperty = Object.prototype.hasOwnProperty, invalidItemsLimit = 3; - -module.exports = function (value/*, options*/) { - var options = arguments[1]; - var mainErrorMessage = - options && options.name - ? "Expected a plain object for %n, received %v" - : "%v is not a plain object"; - if (!is(value)) return resolveException(value, mainErrorMessage, options); - if (!options) return value; - - var invalidKeys, key, errorMessage; - var allowedKeys = ensureArray(options.allowedKeys, { isOptional: true }); - if (allowedKeys) { - for (key in value) { - if (!objHasOwnProperty.call(value, key)) continue; - if (allowedKeys.indexOf(key) > -1) continue; - if (!invalidKeys) invalidKeys = []; - if (invalidKeys.push(key) === invalidItemsLimit) break; - } - if (invalidKeys) { - errorMessage = - resolveErrorMessage(mainErrorMessage, value, options) + - ".\n Following keys are unexpected: " + - invalidKeys.join(", "); - throw new TypeError(errorMessage); - } - } - - var ensurePropertyValue = ensurePlainFunction(options.ensurePropertyValue, { - isOptional: true - }); - if (ensurePropertyValue) { - var coercedValue = {}; - for (key in value) { - if (!objHasOwnProperty.call(value, key)) continue; - var coercedPropertyValue; - try { - coercedPropertyValue = ensurePropertyValue(value[key]); - } catch (error) { - if (!invalidKeys) invalidKeys = []; - if (invalidKeys.push(key) === invalidItemsLimit) break; - } - if (invalidKeys) continue; - coercedValue[key] = coercedPropertyValue; - } - if (invalidKeys) { - errorMessage = - resolveErrorMessage(mainErrorMessage, value, options) + - ".\n Values for following keys are invalid: " + - invalidKeys.join(", "); - throw new TypeError(errorMessage); - } - - return coercedValue; - } - - return value; -}; diff --git a/system/websocket_test/node_modules/type/plain-object/is.js b/system/websocket_test/node_modules/type/plain-object/is.js deleted file mode 100644 index 50d6713..0000000 --- a/system/websocket_test/node_modules/type/plain-object/is.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -var isObject = require("../object/is") - , isPrototype = require("../prototype/is"); - -var getPrototypeOf; -if (typeof Object.getPrototypeOf === "function") { - getPrototypeOf = Object.getPrototypeOf; -} else if ({}.__proto__ === Object.prototype) { - getPrototypeOf = function (object) { return object.__proto__; }; -} - -module.exports = function (value) { - if (!isObject(value)) return false; - var prototype; - if (getPrototypeOf) { - prototype = getPrototypeOf(value); - } else { - try { - var valueConstructor = value.constructor; - if (valueConstructor) prototype = valueConstructor.prototype; - } catch (error) { - return false; - } - } - if (prototype && !hasOwnProperty.call(prototype, "propertyIsEnumerable")) return false; - return !isPrototype(value); -}; diff --git a/system/websocket_test/node_modules/type/promise/ensure.js b/system/websocket_test/node_modules/type/promise/ensure.js deleted file mode 100644 index 7fbebb3..0000000 --- a/system/websocket_test/node_modules/type/promise/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a promise for %n, received %v" : "%v is not a promise"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/promise/is.js b/system/websocket_test/node_modules/type/promise/is.js deleted file mode 100644 index 5353362..0000000 --- a/system/websocket_test/node_modules/type/promise/is.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is"); - -// In theory we could rely on Symbol.toStringTag directly, -// still early native implementation (e.g. in FF) predated symbols -var objectToString = Object.prototype.toString - , objectTaggedString = objectToString.call(Promise.resolve()); - -module.exports = function (value) { - if (!value) return false; - - // Sanity check (reject objects which do not expose common Promise interface) - try { - if (typeof value.then !== "function") return false; - if (typeof value["catch"] !== "function") return false; - } catch (error) { - return false; - } - - // Ensure its native Promise object (has [[PromiseState]] slot) - // Note: it's not 100% precise as string tag may be overriden - // and other objects could be hacked to expose it - if (objectToString.call(value) !== objectTaggedString) return false; - - return !isPrototype(value); -}; diff --git a/system/websocket_test/node_modules/type/prototype/is.js b/system/websocket_test/node_modules/type/prototype/is.js deleted file mode 100644 index aaddb2a..0000000 --- a/system/websocket_test/node_modules/type/prototype/is.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var isObject = require("../object/is"); - -module.exports = function (value) { - if (!isObject(value)) return false; - try { - if (!value.constructor) return false; - return value.constructor.prototype === value; - } catch (error) { - return false; - } -}; diff --git a/system/websocket_test/node_modules/type/reg-exp/ensure.js b/system/websocket_test/node_modules/type/reg-exp/ensure.js deleted file mode 100644 index 50669f3..0000000 --- a/system/websocket_test/node_modules/type/reg-exp/ensure.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a regular expression for %n, received %v" - : "%v is not a regular expression"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/reg-exp/is.js b/system/websocket_test/node_modules/type/reg-exp/is.js deleted file mode 100644 index f0c69d5..0000000 --- a/system/websocket_test/node_modules/type/reg-exp/is.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; - -var isToStringTagSupported = require("../lib/is-to-string-tag-supported") - , isPrototype = require("../prototype/is"); - -var regExpTest = RegExp.prototype.test - , objectToString = Object.prototype.toString - , objectTaggedString = objectToString.call(/a/); - -module.exports = function (value) { - if (!value) return false; - - // Sanity check (reject objects which do not expose common RegExp interface) - if (!hasOwnProperty.call(value, "lastIndex")) return false; - try { - if (typeof value.lastIndex !== "number") return false; - if (typeof value.test !== "function") return false; - if (typeof value.exec !== "function") return false; - } catch (error) { - return false; - } - - // Ensure its native RegExp object (has [[RegExpMatcher]] slot) - if (isToStringTagSupported && typeof value[Symbol.toStringTag] === "string") { - // Edge case (possibly a regExp with custom Symbol.toStringTag) - try { - var lastIndex = value.lastIndex; - regExpTest.call(value, ""); - if (value.lastIndex !== lastIndex) value.lastIndex = lastIndex; - return true; - } catch (error) { - return false; - } - } - if (objectToString.call(value) !== objectTaggedString) return false; - return !isPrototype(value); -}; diff --git a/system/websocket_test/node_modules/type/safe-integer/coerce.js b/system/websocket_test/node_modules/type/safe-integer/coerce.js deleted file mode 100644 index b97e4aa..0000000 --- a/system/websocket_test/node_modules/type/safe-integer/coerce.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var coerceToInteger = require("../integer/coerce"); - -var MAX_SAFE_INTEGER = 9007199254740991, MIN_SAFE_INTEGER = -9007199254740991; - -module.exports = function (value) { - value = coerceToInteger(value); - if (!value) return value; - if (value > MAX_SAFE_INTEGER) return null; - if (value < MIN_SAFE_INTEGER) return null; - return value; -}; diff --git a/system/websocket_test/node_modules/type/safe-integer/ensure.js b/system/websocket_test/node_modules/type/safe-integer/ensure.js deleted file mode 100644 index dbdc46d..0000000 --- a/system/websocket_test/node_modules/type/safe-integer/ensure.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a safe integer for %n, received %v" - : "%v is not a safe integer"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/set/ensure.js b/system/websocket_test/node_modules/type/set/ensure.js deleted file mode 100644 index c5b6a41..0000000 --- a/system/websocket_test/node_modules/type/set/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value /*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a set for %n, received %v" : "%v is not a set"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/set/is.js b/system/websocket_test/node_modules/type/set/is.js deleted file mode 100644 index d0b137b..0000000 --- a/system/websocket_test/node_modules/type/set/is.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is"); - -// In theory we could rely on Symbol.toStringTag directly, -// still early native implementation (e.g. in FF) predated symbols -var objectToString = Object.prototype.toString, objectTaggedString = objectToString.call(new Set()); - -module.exports = function (value) { - if (!value) return false; - - // Sanity check (reject objects which do not expose common Set interface) - try { - if (typeof value.add !== "function") return false; - if (typeof value.has !== "function") return false; - if (typeof value.clear !== "function") return false; - } catch (error) { - return false; - } - - // Ensure its native Set object (has [[SetData]] slot) - // Note: it's not 100% precise as string tag may be overriden - // and other objects could be hacked to expose it - if (objectToString.call(value) !== objectTaggedString) return false; - - return !isPrototype(value); -}; diff --git a/system/websocket_test/node_modules/type/string/coerce.js b/system/websocket_test/node_modules/type/string/coerce.js deleted file mode 100644 index 43cd931..0000000 --- a/system/websocket_test/node_modules/type/string/coerce.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var isValue = require("../value/is") - , isObject = require("../object/is"); - -var objectToString = Object.prototype.toString; - -module.exports = function (value) { - if (!isValue(value)) return null; - if (isObject(value)) { - // Reject Object.prototype.toString coercion - var valueToString = value.toString; - if (typeof valueToString !== "function") return null; - if (valueToString === objectToString) return null; - // Note: It can be object coming from other realm, still as there's no ES3 and CSP compliant - // way to resolve its realm's Object.prototype.toString it's left as not addressed edge case - } - try { - return "" + value; // Ensure implicit coercion - } catch (error) { - return null; - } -}; diff --git a/system/websocket_test/node_modules/type/string/ensure.js b/system/websocket_test/node_modules/type/string/ensure.js deleted file mode 100644 index e26b5f0..0000000 --- a/system/websocket_test/node_modules/type/string/ensure.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a string for %n, received %v" : "%v is not a string"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/thenable/ensure.js b/system/websocket_test/node_modules/type/thenable/ensure.js deleted file mode 100644 index 8397c7c..0000000 --- a/system/websocket_test/node_modules/type/thenable/ensure.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a thenable for %n, received %v" - : "%v is not a thenable"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/thenable/is.js b/system/websocket_test/node_modules/type/thenable/is.js deleted file mode 100644 index 1f3d399..0000000 --- a/system/websocket_test/node_modules/type/thenable/is.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var isObject = require("../object/is"); - -module.exports = function (value) { - if (!isObject(value)) return false; - try { return typeof value.then === "function"; } - catch (error) { return false; } -}; diff --git a/system/websocket_test/node_modules/type/time-value/coerce.js b/system/websocket_test/node_modules/type/time-value/coerce.js deleted file mode 100644 index 7124864..0000000 --- a/system/websocket_test/node_modules/type/time-value/coerce.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var coerceToInteger = require("../integer/coerce"); - -var abs = Math.abs; - -module.exports = function (value) { - value = coerceToInteger(value); - if (!value) return value; - if (abs(value) > 8.64e15) return null; - return value; -}; diff --git a/system/websocket_test/node_modules/type/time-value/ensure.js b/system/websocket_test/node_modules/type/time-value/ensure.js deleted file mode 100644 index ddf4f61..0000000 --- a/system/websocket_test/node_modules/type/time-value/ensure.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a time value for %n, received %v" - : "%v is not a time value"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/ts-types/array-length/coerce.d.ts b/system/websocket_test/node_modules/type/ts-types/array-length/coerce.d.ts deleted file mode 100644 index e949e11..0000000 --- a/system/websocket_test/node_modules/type/ts-types/array-length/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToArrayLength(value: any): number | null; -export default coerceToArrayLength; diff --git a/system/websocket_test/node_modules/type/ts-types/array-length/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/array-length/ensure.d.ts deleted file mode 100644 index 25c9370..0000000 --- a/system/websocket_test/node_modules/type/ts-types/array-length/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureArrayLength(value: any, options?: EnsureBaseOptions): number; -declare function ensureArrayLength(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureArrayLength(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; - -export default ensureArrayLength; diff --git a/system/websocket_test/node_modules/type/ts-types/array-like/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/array-like/ensure.d.ts deleted file mode 100644 index 549febe..0000000 --- a/system/websocket_test/node_modules/type/ts-types/array-like/ensure.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -type LengthwiseObject = { length: number } & object; -type ArrayLikeEnsureOptions = { allowString?: boolean }; - - -declare function ensureArrayLike(value: any, options?: ArrayLikeEnsureOptions & EnsureBaseOptions): T[] | string | LengthwiseObject; -declare function ensureArrayLike(value: any, options?: ArrayLikeEnsureOptions & EnsureBaseOptions & EnsureIsOptional): T[] | string | LengthwiseObject | null; -declare function ensureArrayLike(value: any, options?: ArrayLikeEnsureOptions & EnsureBaseOptions & EnsureIsOptional & EnsureDefault): T[] | string | LengthwiseObject; - -export default ensureArrayLike; diff --git a/system/websocket_test/node_modules/type/ts-types/array-like/is.d.ts b/system/websocket_test/node_modules/type/ts-types/array-like/is.d.ts deleted file mode 100644 index acdd657..0000000 --- a/system/websocket_test/node_modules/type/ts-types/array-like/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isArrayLike(value: any, options?: {allowString?: boolean}): boolean; -export default isArrayLike; diff --git a/system/websocket_test/node_modules/type/ts-types/array/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/array/ensure.d.ts deleted file mode 100644 index 6c249b7..0000000 --- a/system/websocket_test/node_modules/type/ts-types/array/ensure.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -type EnsureArrayOptions = { ensureItem?: EnsureFunction }; - - -declare function ensureArray(value: any, options?: EnsureArrayOptions & EnsureBaseOptions): T[]; -declare function ensureArray(value: any, options?: EnsureArrayOptions & EnsureBaseOptions & EnsureIsOptional): T[] | null; -declare function ensureArray(value: any, options?: EnsureArrayOptions & EnsureBaseOptions & EnsureIsOptional & EnsureDefault): T[]; - -export default ensureArray; diff --git a/system/websocket_test/node_modules/type/ts-types/array/is.d.ts b/system/websocket_test/node_modules/type/ts-types/array/is.d.ts deleted file mode 100644 index 71af03e..0000000 --- a/system/websocket_test/node_modules/type/ts-types/array/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isArray(value: any): boolean; -export default isArray; diff --git a/system/websocket_test/node_modules/type/ts-types/big-int/coerce.d.ts b/system/websocket_test/node_modules/type/ts-types/big-int/coerce.d.ts deleted file mode 100644 index 8c73fc6..0000000 --- a/system/websocket_test/node_modules/type/ts-types/big-int/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToBigInt(value: any): bigint | null; -export default coerceToBigInt; diff --git a/system/websocket_test/node_modules/type/ts-types/big-int/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/big-int/ensure.d.ts deleted file mode 100644 index 93073cb..0000000 --- a/system/websocket_test/node_modules/type/ts-types/big-int/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureBigInt(value: any, options?: EnsureBaseOptions): bigint; -declare function ensureBigInt(value: any, options?: EnsureBaseOptions & EnsureIsOptional): bigint | null; -declare function ensureBigInt(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): bigint; - -export default ensureBigInt; diff --git a/system/websocket_test/node_modules/type/ts-types/constructor/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/constructor/ensure.d.ts deleted file mode 100644 index 79dd28c..0000000 --- a/system/websocket_test/node_modules/type/ts-types/constructor/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureConstructor(value: any, options?: EnsureBaseOptions): EnsureFunction | object; -declare function ensureConstructor(value: any, options?: EnsureBaseOptions & EnsureIsOptional): EnsureFunction | object | null; -declare function ensureConstructor(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): EnsureFunction | object; - -export default ensureConstructor; diff --git a/system/websocket_test/node_modules/type/ts-types/constructor/is.d.ts b/system/websocket_test/node_modules/type/ts-types/constructor/is.d.ts deleted file mode 100644 index 768a635..0000000 --- a/system/websocket_test/node_modules/type/ts-types/constructor/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isConstructor(value: any): boolean; -export default isConstructor; diff --git a/system/websocket_test/node_modules/type/ts-types/date/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/date/ensure.d.ts deleted file mode 100644 index d96ad31..0000000 --- a/system/websocket_test/node_modules/type/ts-types/date/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureDate(value: any, options?: EnsureBaseOptions): Date; -declare function ensureDate(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Date | null; -declare function ensureDate(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): Date; - -export default ensureDate; diff --git a/system/websocket_test/node_modules/type/ts-types/date/is.d.ts b/system/websocket_test/node_modules/type/ts-types/date/is.d.ts deleted file mode 100644 index 7907a8f..0000000 --- a/system/websocket_test/node_modules/type/ts-types/date/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isDate(value: any): boolean; -export default isDate; diff --git a/system/websocket_test/node_modules/type/ts-types/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/ensure.d.ts deleted file mode 100644 index 62ba597..0000000 --- a/system/websocket_test/node_modules/type/ts-types/ensure.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export type EnsureFunction = (...args: any[]) => any; -export interface EnsureBaseOptions { - name?: string; - errorMessage?: string; - errorCode?: number; - Error?: ErrorConstructor; -} - -export interface EnsureIsOptional { - isOptional: boolean; -} - -export interface EnsureDefault { - default: T; -} - -type EnsureOptions = EnsureBaseOptions & { isOptional?: boolean } & { default?: any }; - -type ValidationDatum = [argumentName: string, inputValue: any, ensureFunction: EnsureFunction, options?: object]; -type ValidationDatumList = ValidationDatum[]; - -declare function ensure(...args: [...ValidationDatumList, EnsureOptions]): T; -declare function ensure(...args: [...ValidationDatumList]): T; -export default ensure; diff --git a/system/websocket_test/node_modules/type/ts-types/error/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/error/ensure.d.ts deleted file mode 100644 index b42f446..0000000 --- a/system/websocket_test/node_modules/type/ts-types/error/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureError(value: any, options?: EnsureBaseOptions): Error; -declare function ensureError(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Error | null; -declare function ensureError(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): Error; - -export default ensureError; diff --git a/system/websocket_test/node_modules/type/ts-types/error/is.d.ts b/system/websocket_test/node_modules/type/ts-types/error/is.d.ts deleted file mode 100644 index db64ea3..0000000 --- a/system/websocket_test/node_modules/type/ts-types/error/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isError(value: any): boolean; -export default isError; diff --git a/system/websocket_test/node_modules/type/ts-types/finite/coerce.d.ts b/system/websocket_test/node_modules/type/ts-types/finite/coerce.d.ts deleted file mode 100644 index f1edc2d..0000000 --- a/system/websocket_test/node_modules/type/ts-types/finite/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToFinite(value: any): number | null; -export default coerceToFinite; diff --git a/system/websocket_test/node_modules/type/ts-types/finite/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/finite/ensure.d.ts deleted file mode 100644 index 988c511..0000000 --- a/system/websocket_test/node_modules/type/ts-types/finite/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureFinite(value: any, options?: EnsureBaseOptions): number; -declare function ensureFinite(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureFinite(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; - -export default ensureFinite; diff --git a/system/websocket_test/node_modules/type/ts-types/function/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/function/ensure.d.ts deleted file mode 100644 index 30839e5..0000000 --- a/system/websocket_test/node_modules/type/ts-types/function/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureFunction(value: any, options?: EnsureBaseOptions): EnsureFunction; -declare function ensureFunction(value: any, options?: EnsureBaseOptions & EnsureIsOptional): EnsureFunction | null; -declare function ensureFunction(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): EnsureFunction; - -export default ensureFunction; diff --git a/system/websocket_test/node_modules/type/ts-types/function/is.d.ts b/system/websocket_test/node_modules/type/ts-types/function/is.d.ts deleted file mode 100644 index 9d94f95..0000000 --- a/system/websocket_test/node_modules/type/ts-types/function/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isFunction(value: any): boolean; -export default isFunction; diff --git a/system/websocket_test/node_modules/type/ts-types/integer/coerce.d.ts b/system/websocket_test/node_modules/type/ts-types/integer/coerce.d.ts deleted file mode 100644 index 3bbb00f..0000000 --- a/system/websocket_test/node_modules/type/ts-types/integer/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToInteger(value: any): number | null; -export default coerceToInteger; diff --git a/system/websocket_test/node_modules/type/ts-types/integer/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/integer/ensure.d.ts deleted file mode 100644 index 06f1c8a..0000000 --- a/system/websocket_test/node_modules/type/ts-types/integer/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureInteger(value: any, options?: EnsureBaseOptions): number; -declare function ensureInteger(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureInteger(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; - -export default ensureInteger; diff --git a/system/websocket_test/node_modules/type/ts-types/iterable/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/iterable/ensure.d.ts deleted file mode 100644 index 973d3ea..0000000 --- a/system/websocket_test/node_modules/type/ts-types/iterable/ensure.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -type IterableEnsureOptions = { ensureItem?: EnsureFunction, allowString?: boolean, denyEmpty?: boolean}; - - -declare function ensureIterable(value: any, options?: IterableEnsureOptions & EnsureBaseOptions): T[]; -declare function ensureIterable(value: any, options?: IterableEnsureOptions & EnsureBaseOptions & EnsureIsOptional): T[] | null; -declare function ensureIterable(value: any, options?: IterableEnsureOptions & EnsureBaseOptions & EnsureIsOptional & EnsureDefault): T[]; - -export default ensureIterable; diff --git a/system/websocket_test/node_modules/type/ts-types/iterable/is.d.ts b/system/websocket_test/node_modules/type/ts-types/iterable/is.d.ts deleted file mode 100644 index 93686d2..0000000 --- a/system/websocket_test/node_modules/type/ts-types/iterable/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isIterable(value: any, options?: { allowString?: boolean, denyEmpty?: boolean }): boolean; -export default isIterable; diff --git a/system/websocket_test/node_modules/type/ts-types/map/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/map/ensure.d.ts deleted file mode 100644 index 6a23851..0000000 --- a/system/websocket_test/node_modules/type/ts-types/map/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureMap(value: any, options?: EnsureBaseOptions): Map; -declare function ensureMap(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Map | null; -declare function ensureMap(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault>): Map; - -export default ensureMap; diff --git a/system/websocket_test/node_modules/type/ts-types/map/is.d.ts b/system/websocket_test/node_modules/type/ts-types/map/is.d.ts deleted file mode 100644 index 340ed1b..0000000 --- a/system/websocket_test/node_modules/type/ts-types/map/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isMap(value: any): boolean; -export default isMap; diff --git a/system/websocket_test/node_modules/type/ts-types/natural-number/coerce.d.ts b/system/websocket_test/node_modules/type/ts-types/natural-number/coerce.d.ts deleted file mode 100644 index 633317c..0000000 --- a/system/websocket_test/node_modules/type/ts-types/natural-number/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToNaturalNumber(value: any): number | null; -export default coerceToNaturalNumber; diff --git a/system/websocket_test/node_modules/type/ts-types/natural-number/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/natural-number/ensure.d.ts deleted file mode 100644 index 2f6d6b5..0000000 --- a/system/websocket_test/node_modules/type/ts-types/natural-number/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureNaturalNumber(value: any, options?: EnsureBaseOptions): number; -declare function ensureNaturalNumber(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureNaturalNumber(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; - -export default ensureNaturalNumber; diff --git a/system/websocket_test/node_modules/type/ts-types/number/coerce.d.ts b/system/websocket_test/node_modules/type/ts-types/number/coerce.d.ts deleted file mode 100644 index cc9f355..0000000 --- a/system/websocket_test/node_modules/type/ts-types/number/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToNumber(value: any): number | null; -export default coerceToNumber; diff --git a/system/websocket_test/node_modules/type/ts-types/number/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/number/ensure.d.ts deleted file mode 100644 index 326b222..0000000 --- a/system/websocket_test/node_modules/type/ts-types/number/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureNumber(value: any, options?: EnsureBaseOptions): number; -declare function ensureNumber(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureNumber(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; - -export default ensureNumber; diff --git a/system/websocket_test/node_modules/type/ts-types/object/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/object/ensure.d.ts deleted file mode 100644 index f5ccce1..0000000 --- a/system/websocket_test/node_modules/type/ts-types/object/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureObject(value: any, options?: EnsureBaseOptions): object; -declare function ensureObject(value: any, options?: EnsureBaseOptions & EnsureIsOptional): object | null; -declare function ensureObject(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): object; - -export default ensureObject; diff --git a/system/websocket_test/node_modules/type/ts-types/object/is.d.ts b/system/websocket_test/node_modules/type/ts-types/object/is.d.ts deleted file mode 100644 index 47fdd9c..0000000 --- a/system/websocket_test/node_modules/type/ts-types/object/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isObject(value: any): boolean; -export default isObject; diff --git a/system/websocket_test/node_modules/type/ts-types/plain-function/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/plain-function/ensure.d.ts deleted file mode 100644 index 8681e77..0000000 --- a/system/websocket_test/node_modules/type/ts-types/plain-function/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensurePlainFunction(value: any, options?: EnsureBaseOptions): EnsureFunction; -declare function ensurePlainFunction(value: any, options?: EnsureBaseOptions & EnsureIsOptional): EnsureFunction | null; -declare function ensurePlainFunction(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): EnsureFunction; - -export default ensurePlainFunction; diff --git a/system/websocket_test/node_modules/type/ts-types/plain-function/is.d.ts b/system/websocket_test/node_modules/type/ts-types/plain-function/is.d.ts deleted file mode 100644 index de32a5e..0000000 --- a/system/websocket_test/node_modules/type/ts-types/plain-function/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isPlainFunction(value: any): boolean; -export default isPlainFunction; diff --git a/system/websocket_test/node_modules/type/ts-types/plain-object/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/plain-object/ensure.d.ts deleted file mode 100644 index 063d709..0000000 --- a/system/websocket_test/node_modules/type/ts-types/plain-object/ensure.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -type PlainObjectEnsureOptions = {allowedKeys?: string[], ensurePropertyValue?: EnsureFunction}; - - -declare function ensurePlainObject(value: any, options?: PlainObjectEnsureOptions & EnsureBaseOptions): object; -declare function ensurePlainObject(value: any, options?: PlainObjectEnsureOptions & EnsureBaseOptions & EnsureIsOptional): object | null; -declare function ensurePlainObject(value: any, options?: PlainObjectEnsureOptions & EnsureBaseOptions & EnsureIsOptional & EnsureDefault): object; - -export default ensurePlainObject; diff --git a/system/websocket_test/node_modules/type/ts-types/plain-object/is.d.ts b/system/websocket_test/node_modules/type/ts-types/plain-object/is.d.ts deleted file mode 100644 index 8626085..0000000 --- a/system/websocket_test/node_modules/type/ts-types/plain-object/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isPlainObject(value: any): boolean; -export default isPlainObject; diff --git a/system/websocket_test/node_modules/type/ts-types/promise/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/promise/ensure.d.ts deleted file mode 100644 index 3ddf4ea..0000000 --- a/system/websocket_test/node_modules/type/ts-types/promise/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensurePromise(value: any, options?: EnsureBaseOptions): Promise; -declare function ensurePromise(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Promise | null; -declare function ensurePromise(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault>): Promise; - -export default ensurePromise; diff --git a/system/websocket_test/node_modules/type/ts-types/promise/is.d.ts b/system/websocket_test/node_modules/type/ts-types/promise/is.d.ts deleted file mode 100644 index 9306fe5..0000000 --- a/system/websocket_test/node_modules/type/ts-types/promise/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isPromise(value: any): boolean; -export default isPromise; diff --git a/system/websocket_test/node_modules/type/ts-types/prototype/is.d.ts b/system/websocket_test/node_modules/type/ts-types/prototype/is.d.ts deleted file mode 100644 index 7f2eb12..0000000 --- a/system/websocket_test/node_modules/type/ts-types/prototype/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isPrototype(value: any): boolean; -export default isPrototype; diff --git a/system/websocket_test/node_modules/type/ts-types/reg-exp/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/reg-exp/ensure.d.ts deleted file mode 100644 index 95a2c9b..0000000 --- a/system/websocket_test/node_modules/type/ts-types/reg-exp/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureRegExp(value: any, options?: EnsureBaseOptions): RegExp; -declare function ensureRegExp(value: any, options?: EnsureBaseOptions & EnsureIsOptional): RegExp | null; -declare function ensureRegExp(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): RegExp; - -export default ensureRegExp; diff --git a/system/websocket_test/node_modules/type/ts-types/reg-exp/is.d.ts b/system/websocket_test/node_modules/type/ts-types/reg-exp/is.d.ts deleted file mode 100644 index a325e34..0000000 --- a/system/websocket_test/node_modules/type/ts-types/reg-exp/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isRegExp(value: any): boolean; -export default isRegExp; diff --git a/system/websocket_test/node_modules/type/ts-types/safe-integer/coerce.d.ts b/system/websocket_test/node_modules/type/ts-types/safe-integer/coerce.d.ts deleted file mode 100644 index 5e6539c..0000000 --- a/system/websocket_test/node_modules/type/ts-types/safe-integer/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToSafeInteger(value: any): number | null; -export default coerceToSafeInteger; diff --git a/system/websocket_test/node_modules/type/ts-types/safe-integer/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/safe-integer/ensure.d.ts deleted file mode 100644 index 5d4b953..0000000 --- a/system/websocket_test/node_modules/type/ts-types/safe-integer/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureSafeInteger(value: any, options?: EnsureBaseOptions): number; -declare function ensureSafeInteger(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureSafeInteger(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; - -export default ensureSafeInteger; diff --git a/system/websocket_test/node_modules/type/ts-types/set/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/set/ensure.d.ts deleted file mode 100644 index 2b14259..0000000 --- a/system/websocket_test/node_modules/type/ts-types/set/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureSet(value: any, options?: EnsureBaseOptions): Set; -declare function ensureSet(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Set | null; -declare function ensureSet(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault>): Set; - -export default ensureSet; diff --git a/system/websocket_test/node_modules/type/ts-types/set/is.d.ts b/system/websocket_test/node_modules/type/ts-types/set/is.d.ts deleted file mode 100644 index 530aed3..0000000 --- a/system/websocket_test/node_modules/type/ts-types/set/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isSet(value: any): boolean; -export default isSet; diff --git a/system/websocket_test/node_modules/type/ts-types/string/coerce.d.ts b/system/websocket_test/node_modules/type/ts-types/string/coerce.d.ts deleted file mode 100644 index 603519d..0000000 --- a/system/websocket_test/node_modules/type/ts-types/string/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToString(value: any): string | null; -export default coerceToString; diff --git a/system/websocket_test/node_modules/type/ts-types/string/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/string/ensure.d.ts deleted file mode 100644 index d31965a..0000000 --- a/system/websocket_test/node_modules/type/ts-types/string/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureString(value: any, options?: EnsureBaseOptions): string; -declare function ensureString(value: any, options?: EnsureBaseOptions & EnsureIsOptional): string | null; -declare function ensureString(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): string; - -export default ensureString; diff --git a/system/websocket_test/node_modules/type/ts-types/thenable/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/thenable/ensure.d.ts deleted file mode 100644 index 741faad..0000000 --- a/system/websocket_test/node_modules/type/ts-types/thenable/ensure.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -type ThenableObject = { then: EnsureFunction } & object; - - -declare function ensureThenable(value: any, options?: EnsureBaseOptions): Promise | ThenableObject; -declare function ensureThenable(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Promise | ThenableObject | null; -declare function ensureThenable(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault | ThenableObject>): Promise | ThenableObject; - -export default ensureThenable; diff --git a/system/websocket_test/node_modules/type/ts-types/thenable/is.d.ts b/system/websocket_test/node_modules/type/ts-types/thenable/is.d.ts deleted file mode 100644 index c8f207f..0000000 --- a/system/websocket_test/node_modules/type/ts-types/thenable/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isThenable(value: any): boolean; -export default isThenable; diff --git a/system/websocket_test/node_modules/type/ts-types/time-value/coerce.d.ts b/system/websocket_test/node_modules/type/ts-types/time-value/coerce.d.ts deleted file mode 100644 index 44849ba..0000000 --- a/system/websocket_test/node_modules/type/ts-types/time-value/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToTimeValue(value: any): number | null; -export default coerceToTimeValue; diff --git a/system/websocket_test/node_modules/type/ts-types/time-value/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/time-value/ensure.d.ts deleted file mode 100644 index f8084b8..0000000 --- a/system/websocket_test/node_modules/type/ts-types/time-value/ensure.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureTimeValue(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureTimeValue(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; -export default ensureTimeValue; diff --git a/system/websocket_test/node_modules/type/ts-types/value/ensure.d.ts b/system/websocket_test/node_modules/type/ts-types/value/ensure.d.ts deleted file mode 100644 index 928b29e..0000000 --- a/system/websocket_test/node_modules/type/ts-types/value/ensure.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { EnsureOptions } from '../ensure'; - -declare function ensureValue(value: any, options?: EnsureOptions): T; -export default ensureValue; diff --git a/system/websocket_test/node_modules/type/ts-types/value/is.d.ts b/system/websocket_test/node_modules/type/ts-types/value/is.d.ts deleted file mode 100644 index 31f306d..0000000 --- a/system/websocket_test/node_modules/type/ts-types/value/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isValue(value: any): boolean; -export default isValue; diff --git a/system/websocket_test/node_modules/type/value/ensure.js b/system/websocket_test/node_modules/type/value/ensure.js deleted file mode 100644 index 3067a3e..0000000 --- a/system/websocket_test/node_modules/type/value/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a value for %n, received %v" : "Cannot use %v"; - return resolveException(value, errorMessage, options); -}; diff --git a/system/websocket_test/node_modules/type/value/is.js b/system/websocket_test/node_modules/type/value/is.js deleted file mode 100644 index 648aa9c..0000000 --- a/system/websocket_test/node_modules/type/value/is.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -// ES3 safe -var _undefined = void 0; - -module.exports = function (value) { return value !== _undefined && value !== null; }; diff --git a/system/websocket_test/node_modules/typedarray-to-buffer/.airtap.yml b/system/websocket_test/node_modules/typedarray-to-buffer/.airtap.yml deleted file mode 100644 index 3417780..0000000 --- a/system/websocket_test/node_modules/typedarray-to-buffer/.airtap.yml +++ /dev/null @@ -1,15 +0,0 @@ -sauce_connect: true -loopback: airtap.local -browsers: - - name: chrome - version: latest - - name: firefox - version: latest - - name: safari - version: latest - - name: microsoftedge - version: latest - - name: ie - version: latest - - name: iphone - version: latest diff --git a/system/websocket_test/node_modules/typedarray-to-buffer/.travis.yml b/system/websocket_test/node_modules/typedarray-to-buffer/.travis.yml deleted file mode 100644 index f25afbd..0000000 --- a/system/websocket_test/node_modules/typedarray-to-buffer/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: - - lts/* -addons: - sauce_connect: true - hosts: - - airtap.local -env: - global: - - secure: i51rE9rZGHbcZWlL58j3H1qtL23OIV2r0X4TcQKNI3pw2mubdHFJmfPNNO19ItfReu8wwQMxOehKamwaNvqMiKWyHfn/QcThFQysqzgGZ6AgnUbYx9od6XFNDeWd1sVBf7QBAL07y7KWlYGWCwFwWjabSVySzQhEBdisPcskfkI= - - secure: BKq6/5z9LK3KDkTjs7BGeBZ1KsWgz+MsAXZ4P64NSeVGFaBdXU45+ww1mwxXFt5l22/mhyOQZfebQl+kGVqRSZ+DEgQeCymkNZ6CD8c6w6cLuOJXiXwuu/cDM2DD0tfGeu2YZC7yEikP7BqEFwH3D324rRzSGLF2RSAAwkOI7bE= diff --git a/system/websocket_test/node_modules/typedarray-to-buffer/LICENSE b/system/websocket_test/node_modules/typedarray-to-buffer/LICENSE deleted file mode 100644 index 0c068ce..0000000 --- a/system/websocket_test/node_modules/typedarray-to-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/system/websocket_test/node_modules/typedarray-to-buffer/README.md b/system/websocket_test/node_modules/typedarray-to-buffer/README.md deleted file mode 100644 index 35761fb..0000000 --- a/system/websocket_test/node_modules/typedarray-to-buffer/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# typedarray-to-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/typedarray-to-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/typedarray-to-buffer -[npm-image]: https://img.shields.io/npm/v/typedarray-to-buffer.svg -[npm-url]: https://npmjs.org/package/typedarray-to-buffer -[downloads-image]: https://img.shields.io/npm/dm/typedarray-to-buffer.svg -[downloads-url]: https://npmjs.org/package/typedarray-to-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Convert a typed array to a [Buffer](https://github.com/feross/buffer) without a copy. - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[saucelabs-image]: https://saucelabs.com/browser-matrix/typedarray-to-buffer.svg -[saucelabs-url]: https://saucelabs.com/u/typedarray-to-buffer - -Say you're using the ['buffer'](https://github.com/feross/buffer) module on npm, or -[browserify](http://browserify.org/) and you're working with lots of binary data. - -Unfortunately, sometimes the browser or someone else's API gives you a typed array like -`Uint8Array` to work with and you need to convert it to a `Buffer`. What do you do? - -Of course: `Buffer.from(uint8array)` - -But, alas, every time you do `Buffer.from(uint8array)` **the entire array gets copied**. -The `Buffer` constructor does a copy; this is -defined by the [node docs](http://nodejs.org/api/buffer.html) and the 'buffer' module -matches the node API exactly. - -So, how can we avoid this expensive copy in -[performance critical applications](https://github.com/feross/buffer/issues/22)? - -***Simply use this module, of course!*** - -If you have an `ArrayBuffer`, you don't need this module, because -`Buffer.from(arrayBuffer)` -[is already efficient](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length). - -## install - -```bash -npm install typedarray-to-buffer -``` - -## usage - -To convert a typed array to a `Buffer` **without a copy**, do this: - -```js -var toBuffer = require('typedarray-to-buffer') - -var arr = new Uint8Array([1, 2, 3]) -arr = toBuffer(arr) - -// arr is a buffer now! - -arr.toString() // '\u0001\u0002\u0003' -arr.readUInt16BE(0) // 258 -``` - -## how it works - -If the browser supports typed arrays, then `toBuffer` will **augment the typed array** you -pass in with the `Buffer` methods and return it. See [how does Buffer -work?](https://github.com/feross/buffer#how-does-it-work) for more about how augmentation -works. - -This module uses the typed array's underlying `ArrayBuffer` to back the new `Buffer`. This -respects the "view" on the `ArrayBuffer`, i.e. `byteOffset` and `byteLength`. In other -words, if you do `toBuffer(new Uint32Array([1, 2, 3]))`, then the new `Buffer` will -contain `[1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0]`, **not** `[1, 2, 3]`. And it still doesn't -require a copy. - -If the browser doesn't support typed arrays, then `toBuffer` will create a new `Buffer` -object, copy the data into it, and return it. There's no simple performance optimization -we can do for old browsers. Oh well. - -If this module is used in node, then it will just call `Buffer.from`. This is just for -the convenience of modules that work in both node and the browser. - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/system/websocket_test/node_modules/typedarray-to-buffer/index.js b/system/websocket_test/node_modules/typedarray-to-buffer/index.js deleted file mode 100644 index 5fa394d..0000000 --- a/system/websocket_test/node_modules/typedarray-to-buffer/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Convert a typed array to a Buffer without a copy - * - * Author: Feross Aboukhadijeh - * License: MIT - * - * `npm install typedarray-to-buffer` - */ - -var isTypedArray = require('is-typedarray').strict - -module.exports = function typedarrayToBuffer (arr) { - if (isTypedArray(arr)) { - // To avoid a copy, use the typed array's underlying ArrayBuffer to back new Buffer - var buf = Buffer.from(arr.buffer) - if (arr.byteLength !== arr.buffer.byteLength) { - // Respect the "view", i.e. byteOffset and byteLength, without doing a copy - buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength) - } - return buf - } else { - // Pass through all other types to `Buffer.from` - return Buffer.from(arr) - } -} diff --git a/system/websocket_test/node_modules/typedarray-to-buffer/package.json b/system/websocket_test/node_modules/typedarray-to-buffer/package.json deleted file mode 100644 index 5ec5656..0000000 --- a/system/websocket_test/node_modules/typedarray-to-buffer/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "typedarray-to-buffer", - "description": "Convert a typed array to a Buffer without a copy", - "version": "3.1.5", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org/" - }, - "bugs": { - "url": "https://github.com/feross/typedarray-to-buffer/issues" - }, - "dependencies": { - "is-typedarray": "^1.0.0" - }, - "devDependencies": { - "airtap": "0.0.4", - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "http://feross.org", - "keywords": [ - "buffer", - "typed array", - "convert", - "no copy", - "uint8array", - "uint16array", - "uint32array", - "int16array", - "int32array", - "float32array", - "float64array", - "browser", - "arraybuffer", - "dataview" - ], - "license": "MIT", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/feross/typedarray-to-buffer.git" - }, - "scripts": { - "test": "standard && npm run test-node && npm run test-browser", - "test-browser": "airtap -- test/*.js", - "test-browser-local": "airtap --local -- test/*.js", - "test-node": "tape test/*.js" - } -} diff --git a/system/websocket_test/node_modules/typedarray-to-buffer/test/basic.js b/system/websocket_test/node_modules/typedarray-to-buffer/test/basic.js deleted file mode 100644 index 3521096..0000000 --- a/system/websocket_test/node_modules/typedarray-to-buffer/test/basic.js +++ /dev/null @@ -1,50 +0,0 @@ -var test = require('tape') -var toBuffer = require('../') - -test('convert to buffer from Uint8Array', function (t) { - if (typeof Uint8Array !== 'undefined') { - var arr = new Uint8Array([1, 2, 3]) - arr = toBuffer(arr) - - t.deepEqual(arr, Buffer.from([1, 2, 3]), 'contents equal') - t.ok(Buffer.isBuffer(arr), 'is buffer') - t.equal(arr.readUInt8(0), 1) - t.equal(arr.readUInt8(1), 2) - t.equal(arr.readUInt8(2), 3) - } else { - t.pass('browser lacks Uint8Array support, skip test') - } - t.end() -}) - -test('convert to buffer from another arrayview type (Uint32Array)', function (t) { - if (typeof Uint32Array !== 'undefined' && Buffer.TYPED_ARRAY_SUPPORT !== false) { - var arr = new Uint32Array([1, 2, 3]) - arr = toBuffer(arr) - - t.deepEqual(arr, Buffer.from([1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0]), 'contents equal') - t.ok(Buffer.isBuffer(arr), 'is buffer') - t.equal(arr.readUInt32LE(0), 1) - t.equal(arr.readUInt32LE(4), 2) - t.equal(arr.readUInt32LE(8), 3) - t.equal(arr instanceof Uint8Array, true) - } else { - t.pass('browser lacks Uint32Array support, skip test') - } - t.end() -}) - -test('convert to buffer from ArrayBuffer', function (t) { - if (typeof Uint32Array !== 'undefined' && Buffer.TYPED_ARRAY_SUPPORT !== false) { - var arr = new Uint32Array([1, 2, 3]).subarray(1, 2) - arr = toBuffer(arr) - - t.deepEqual(arr, Buffer.from([2, 0, 0, 0]), 'contents equal') - t.ok(Buffer.isBuffer(arr), 'is buffer') - t.equal(arr.readUInt32LE(0), 2) - t.equal(arr instanceof Uint8Array, true) - } else { - t.pass('browser lacks ArrayBuffer support, skip test') - } - t.end() -}) diff --git a/system/websocket_test/node_modules/utf-8-validate/LICENSE b/system/websocket_test/node_modules/utf-8-validate/LICENSE deleted file mode 100644 index 710d09f..0000000 --- a/system/websocket_test/node_modules/utf-8-validate/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -This project is licensed for use as follows: - -""" -Copyright (c) 2011 Einar Otto Stangvik (http://2x.io) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -""" - -This license applies to parts originating from -https://www.cl.cam.ac.uk/~mgk25/ucs/utf8_check.c: - -""" -Markus Kuhn -- 2005-03-30 -License: http://www.cl.cam.ac.uk/~mgk25/short-license.html -""" diff --git a/system/websocket_test/node_modules/utf-8-validate/README.md b/system/websocket_test/node_modules/utf-8-validate/README.md deleted file mode 100644 index 3a95ff8..0000000 --- a/system/websocket_test/node_modules/utf-8-validate/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# utf-8-validate - -[![Version npm](https://img.shields.io/npm/v/utf-8-validate.svg?logo=npm)](https://www.npmjs.com/package/utf-8-validate) -[![Linux/macOS/Windows Build](https://img.shields.io/github/workflow/status/websockets/utf-8-validate/CI/master?label=build&logo=github)](https://github.com/websockets/utf-8-validate/actions?query=workflow%3ACI+branch%3Amaster) - -Check if a buffer contains valid UTF-8 encoded text. - -## Installation - -``` -npm install utf-8-validate --save-optional -``` - -The `--save-optional` flag tells npm to save the package in your package.json -under the -[`optionalDependencies`](https://docs.npmjs.com/files/package.json#optionaldependencies) -key. - -## API - -The module exports a single function which takes one argument. - -### `isValidUTF8(buffer)` - -Checks whether a buffer contains valid UTF-8. - -#### Arguments - -- `buffer` - The buffer to check. - -#### Return value - -`true` if the buffer contains only correct UTF-8, else `false`. - -#### Example - -```js -'use strict'; - -const isValidUTF8 = require('utf-8-validate'); - -const buf = Buffer.from([0xf0, 0x90, 0x80, 0x80]); - -console.log(isValidUTF8(buf)); -// => true -``` - -## License - -[MIT](LICENSE) diff --git a/system/websocket_test/node_modules/utf-8-validate/binding.gyp b/system/websocket_test/node_modules/utf-8-validate/binding.gyp deleted file mode 100644 index 30edf27..0000000 --- a/system/websocket_test/node_modules/utf-8-validate/binding.gyp +++ /dev/null @@ -1,18 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'validation', - 'sources': ['src/validation.c'], - 'cflags': ['-std=c99'], - 'conditions': [ - ["OS=='mac'", { - 'xcode_settings': { - 'MACOSX_DEPLOYMENT_TARGET': '10.7', - 'OTHER_CFLAGS': ['-arch x86_64', '-arch arm64'], - 'OTHER_LDFLAGS': ['-arch x86_64', '-arch arm64'] - } - }] - ] - } - ] -} diff --git a/system/websocket_test/node_modules/utf-8-validate/fallback.js b/system/websocket_test/node_modules/utf-8-validate/fallback.js deleted file mode 100644 index c493d49..0000000 --- a/system/websocket_test/node_modules/utf-8-validate/fallback.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -/** - * Checks if a given buffer contains only correct UTF-8. - * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by - * Markus Kuhn. - * - * @param {Buffer} buf The buffer to check - * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false` - * @public - */ -function isValidUTF8(buf) { - const len = buf.length; - let i = 0; - - while (i < len) { - if ((buf[i] & 0x80) === 0x00) { // 0xxxxxxx - i++; - } else if ((buf[i] & 0xe0) === 0xc0) { // 110xxxxx 10xxxxxx - if ( - i + 1 === len || - (buf[i + 1] & 0xc0) !== 0x80 || - (buf[i] & 0xfe) === 0xc0 // overlong - ) { - return false; - } - - i += 2; - } else if ((buf[i] & 0xf0) === 0xe0) { // 1110xxxx 10xxxxxx 10xxxxxx - if ( - i + 2 >= len || - (buf[i + 1] & 0xc0) !== 0x80 || - (buf[i + 2] & 0xc0) !== 0x80 || - buf[i] === 0xe0 && (buf[i + 1] & 0xe0) === 0x80 || // overlong - buf[i] === 0xed && (buf[i + 1] & 0xe0) === 0xa0 // surrogate (U+D800 - U+DFFF) - ) { - return false; - } - - i += 3; - } else if ((buf[i] & 0xf8) === 0xf0) { // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - if ( - i + 3 >= len || - (buf[i + 1] & 0xc0) !== 0x80 || - (buf[i + 2] & 0xc0) !== 0x80 || - (buf[i + 3] & 0xc0) !== 0x80 || - buf[i] === 0xf0 && (buf[i + 1] & 0xf0) === 0x80 || // overlong - buf[i] === 0xf4 && buf[i + 1] > 0x8f || buf[i] > 0xf4 // > U+10FFFF - ) { - return false; - } - - i += 4; - } else { - return false; - } - } - - return true; -} - -module.exports = isValidUTF8; diff --git a/system/websocket_test/node_modules/utf-8-validate/index.js b/system/websocket_test/node_modules/utf-8-validate/index.js deleted file mode 100644 index 8c30561..0000000 --- a/system/websocket_test/node_modules/utf-8-validate/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -try { - module.exports = require('node-gyp-build')(__dirname); -} catch (e) { - module.exports = require('./fallback'); -} diff --git a/system/websocket_test/node_modules/utf-8-validate/package.json b/system/websocket_test/node_modules/utf-8-validate/package.json deleted file mode 100644 index 149e652..0000000 --- a/system/websocket_test/node_modules/utf-8-validate/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "utf-8-validate", - "version": "5.0.10", - "description": "Check if a buffer contains valid UTF-8", - "main": "index.js", - "engines": { - "node": ">=6.14.2" - }, - "scripts": { - "install": "node-gyp-build", - "prebuild": "prebuildify --napi --strip --target=14.0.0", - "prebuild-darwin-x64+arm64": "prebuildify --arch x64+arm64 --napi --strip --target=14.0.0", - "test": "mocha" - }, - "repository": { - "type": "git", - "url": "https://github.com/websockets/utf-8-validate" - }, - "keywords": [ - "utf-8-validate" - ], - "author": "Einar Otto Stangvik (http://2x.io)", - "license": "MIT", - "bugs": { - "url": "https://github.com/websockets/utf-8-validate/issues" - }, - "homepage": "https://github.com/websockets/utf-8-validate", - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "devDependencies": { - "mocha": "^10.0.0", - "node-gyp": "^9.1.0", - "prebuildify": "^5.0.0" - } -} diff --git a/system/websocket_test/node_modules/utf-8-validate/prebuilds/darwin-x64+arm64/node.napi.node b/system/websocket_test/node_modules/utf-8-validate/prebuilds/darwin-x64+arm64/node.napi.node deleted file mode 100644 index bed98d4..0000000 --- a/system/websocket_test/node_modules/utf-8-validate/prebuilds/darwin-x64+arm64/node.napi.node +++ /dev/null Binary files differ diff --git a/system/websocket_test/node_modules/utf-8-validate/prebuilds/linux-x64/node.napi.node b/system/websocket_test/node_modules/utf-8-validate/prebuilds/linux-x64/node.napi.node deleted file mode 100644 index bf547d8..0000000 --- a/system/websocket_test/node_modules/utf-8-validate/prebuilds/linux-x64/node.napi.node +++ /dev/null Binary files differ diff --git a/system/websocket_test/node_modules/utf-8-validate/prebuilds/win32-ia32/node.napi.node b/system/websocket_test/node_modules/utf-8-validate/prebuilds/win32-ia32/node.napi.node deleted file mode 100644 index bb40b23..0000000 --- a/system/websocket_test/node_modules/utf-8-validate/prebuilds/win32-ia32/node.napi.node +++ /dev/null Binary files differ diff --git a/system/websocket_test/node_modules/utf-8-validate/prebuilds/win32-x64/node.napi.node b/system/websocket_test/node_modules/utf-8-validate/prebuilds/win32-x64/node.napi.node deleted file mode 100644 index 861d661..0000000 --- a/system/websocket_test/node_modules/utf-8-validate/prebuilds/win32-x64/node.napi.node +++ /dev/null Binary files differ diff --git a/system/websocket_test/node_modules/utf-8-validate/src/validation.c b/system/websocket_test/node_modules/utf-8-validate/src/validation.c deleted file mode 100644 index dd260b1..0000000 --- a/system/websocket_test/node_modules/utf-8-validate/src/validation.c +++ /dev/null @@ -1,109 +0,0 @@ -#define NAPI_VERSION 1 -#include -#include -#include - -napi_value IsValidUTF8(napi_env env, napi_callback_info info) { - napi_status status; - size_t argc = 1; - napi_value argv[1]; - - status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); - assert(status == napi_ok); - - uint8_t *buf; - size_t len; - - status = napi_get_buffer_info(env, argv[0], (void **)&buf, &len); - assert(status == napi_ok); - - size_t i = 0; - - // - // This code has been taken from utf8_check.c which was developed by - // Markus Kuhn . - // - // For original code / licensing please refer to - // https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c - // - while (i < len) { - size_t j = i + 8; - - if (j <= len) { - // - // Read 8 bytes and check if they are ASCII. - // - uint64_t chunk; - memcpy(&chunk, buf + i, 8); - - if ((chunk & 0x8080808080808080) == 0x00) { - i = j; - continue; - } - } - - while ((buf[i] & 0x80) == 0x00) { // 0xxxxxxx - if (++i == len) { - goto exit; - } - } - - if ((buf[i] & 0xe0) == 0xc0) { // 110xxxxx 10xxxxxx - if ( - i + 1 == len || - (buf[i + 1] & 0xc0) != 0x80 || - (buf[i] & 0xfe) == 0xc0 // overlong - ) { - break; - } - - i += 2; - } else if ((buf[i] & 0xf0) == 0xe0) { // 1110xxxx 10xxxxxx 10xxxxxx - if ( - i + 2 >= len || - (buf[i + 1] & 0xc0) != 0x80 || - (buf[i + 2] & 0xc0) != 0x80 || - (buf[i] == 0xe0 && (buf[i + 1] & 0xe0) == 0x80) || // overlong - (buf[i] == 0xed && (buf[i + 1] & 0xe0) == 0xa0) // surrogate (U+D800 - U+DFFF) - ) { - break; - } - - i += 3; - } else if ((buf[i] & 0xf8) == 0xf0) { // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - if ( - i + 3 >= len || - (buf[i + 1] & 0xc0) != 0x80 || - (buf[i + 2] & 0xc0) != 0x80 || - (buf[i + 3] & 0xc0) != 0x80 || - (buf[i] == 0xf0 && (buf[i + 1] & 0xf0) == 0x80) || // overlong - (buf[i] == 0xf4 && buf[i + 1] > 0x8f) || buf[i] > 0xf4 // > U+10FFFF - ) { - break; - } - - i += 4; - } else { - break; - } - } - -exit:; - napi_value result; - status = napi_get_boolean(env, i == len, &result); - assert(status == napi_ok); - - return result; -} - -napi_value Init(napi_env env, napi_value exports) { - napi_status status; - napi_value isValidUTF8; - - status = napi_create_function(env, NULL, 0, IsValidUTF8, NULL, &isValidUTF8); - assert(status == napi_ok); - - return isValidUTF8; -} - -NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/system/websocket_test/node_modules/websocket/.github/workflows/websocket-tests.yml b/system/websocket_test/node_modules/websocket/.github/workflows/websocket-tests.yml deleted file mode 100644 index cb05345..0000000 --- a/system/websocket_test/node_modules/websocket/.github/workflows/websocket-tests.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: websocket-tests -on: [push, pull_request] -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-node@v1 - with: - node-version: 10.x - - - uses: actions/checkout@v2 - - - run: npm install - - - run: npm run test - diff --git a/system/websocket_test/node_modules/websocket/.jshintrc b/system/websocket_test/node_modules/websocket/.jshintrc deleted file mode 100644 index 98d8766..0000000 --- a/system/websocket_test/node_modules/websocket/.jshintrc +++ /dev/null @@ -1,88 +0,0 @@ -{ - // JSHint Default Configuration File (as on JSHint website) - // See http://jshint.com/docs/ for more details - - "maxerr" : 50, // {int} Maximum error before stopping - - // Enforcing - "bitwise" : false, // true: Prohibit bitwise operators (&, |, ^, etc.) - "camelcase" : false, // true: Identifiers must be in camelCase - "curly" : true, // true: Require {} for every new block or scope - "eqeqeq" : true, // true: Require triple equals (===) for comparison - "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc. - "forin" : false, // true: Require filtering for..in loops with obj.hasOwnProperty() - "immed" : true, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` - "latedef" : "nofunc", // true: Require variables/functions to be defined before being used - "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()` - "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee` - "noempty" : true, // true: Prohibit use of empty blocks - "nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters. - "nonew" : true, // true: Prohibit use of constructors for side-effects (without assignment) - "plusplus" : false, // true: Prohibit use of `++` & `--` - "quotmark" : "single", // Quotation mark consistency: - // false : do nothing (default) - // true : ensure whatever is used is consistent - // "single" : require single quotes - // "double" : require double quotes - "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) - "unused" : "vars", // vars: Require all defined variables be used, ignore function params - "strict" : false, // true: Requires all functions run in ES5 Strict Mode - "maxparams" : false, // {int} Max number of formal params allowed per function - "maxdepth" : false, // {int} Max depth of nested blocks (within functions) - "maxstatements" : false, // {int} Max number statements per function - "maxcomplexity" : false, // {int} Max cyclomatic complexity per function - "maxlen" : false, // {int} Max number of characters per line - - // Relaxing - "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons) - "boss" : false, // true: Tolerate assignments where comparisons would be expected - "debug" : false, // true: Allow debugger statements e.g. browser breakpoints. - "eqnull" : false, // true: Tolerate use of `== null` - "es5" : false, // true: Allow ES5 syntax (ex: getters and setters) - "esnext" : true, // true: Allow ES.next (ES6) syntax (ex: `const`) - "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) - // (ex: `for each`, multiple try/catch, function expression…) - "evil" : false, // true: Tolerate use of `eval` and `new Function()` - "expr" : false, // true: Tolerate `ExpressionStatement` as Programs - "funcscope" : false, // true: Tolerate defining variables inside control statements - "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') - "iterator" : false, // true: Tolerate using the `__iterator__` property - "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block - "laxbreak" : false, // true: Tolerate possibly unsafe line breakings - "laxcomma" : false, // true: Tolerate comma-first style coding - "loopfunc" : false, // true: Tolerate functions being defined in loops - "multistr" : false, // true: Tolerate multi-line strings - "noyield" : false, // true: Tolerate generator functions with no yield statement in them. - "notypeof" : false, // true: Tolerate invalid typeof operator values - "proto" : false, // true: Tolerate using the `__proto__` property - "scripturl" : false, // true: Tolerate script-targeted URLs - "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;` - "sub" : true, // true: Tolerate using `[]` notation when it can still be expressed in dot notation - "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;` - "validthis" : false, // true: Tolerate using this in a non-constructor function - - // Environments - "browser" : true, // Web Browser (window, document, etc) - "browserify" : true, // Browserify (node.js code in the browser) - "couch" : false, // CouchDB - "devel" : true, // Development/debugging (alert, confirm, etc) - "dojo" : false, // Dojo Toolkit - "jasmine" : false, // Jasmine - "jquery" : false, // jQuery - "mocha" : false, // Mocha - "mootools" : false, // MooTools - "node" : true, // Node.js - "nonstandard" : false, // Widely adopted globals (escape, unescape, etc) - "prototypejs" : false, // Prototype and Scriptaculous - "qunit" : false, // QUnit - "rhino" : false, // Rhino - "shelljs" : false, // ShellJS - "worker" : false, // Web Workers - "wsh" : false, // Windows Scripting Host - "yui" : false, // Yahoo User Interface - - // Custom Globals - "globals" : { // additional predefined global variables - "WebSocket": true - } -} diff --git a/system/websocket_test/node_modules/websocket/CHANGELOG.md b/system/websocket_test/node_modules/websocket/CHANGELOG.md deleted file mode 100644 index 1953a4c..0000000 --- a/system/websocket_test/node_modules/websocket/CHANGELOG.md +++ /dev/null @@ -1,291 +0,0 @@ -Changelog -========= - -Version 1.0.34 --------------- -*Released 2021-04-14* - -* Updated browser shim to use the native `globalThis` property when available. See [this MDN page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) for context. Resolves [#415](https://github.com/theturtle32/WebSocket-Node/issues/415) - -Version 1.0.33 --------------- -*Released 2020-12-08* - -* Added new configuration options to WebSocketServer allowing implementors to bypass parsing WebSocket extensions and HTTP Cookies if they are not needed. (Thanks, [@aetheon](https://github.com/aetheon)) -* Added new `upgradeError` event to WebSocketServer to allow for visibility into and logging of any parsing errors that might occur during the HTTP Upgrade phase. (Thanks, [@aetheon](https://github.com/aetheon)) - -Version 1.0.32 --------------- -*Released 2020-08-28* - -* Refactor to use [N-API modules](https://nodejs.org/api/n-api.html) from [ws project](https://github.com/websockets). (Thanks, [@andreek](https://github.com/andreek)) - * Specifically: - * [utf-8-validate](https://github.com/websockets/utf-8-validate) - * [bufferutil](https://github.com/websockets/bufferutil) -* Removed some documentation notations about very old browsers and very old Websocket protocol drafts that are no longer relevant today in 2020. -* Removed outdated notations and instructions about building native extensions, since those functions are now delegated to dependencies. -* Add automated unit test executionn via Github Actions (Thanks, [@nebojsa94](https://github.com/nebojsa94)) -* Accept new connection close code `1015` ("TLS Handshake"). (More information at the [WebSocket Close Code Number Registry](https://www.iana.org/assignments/websocket/websocket.xhtml#close-code-number)) - -Version 1.0.31 --------------- -*Released 2019-12-06* - -* Fix [infinite loop in error handling](https://github.com/theturtle32/WebSocket-Node/issues/329) (Thanks, [@apirila](https://github.com/apirila)) -* Fix [memory leak with multiple WebSocket servers on the same HTTP server](https://github.com/theturtle32/WebSocket-Node/pull/339) (Thanks, [@nazar-pc](https://github.com/nazar-pc)) -* [Use es5-ext/global as a more robust way to resolve browser's window object](https://github.com/theturtle32/WebSocket-Node/pull/362) (Thanks, [@michaelsbradleyjr](https://github.com/michaelsbradleyjr)) -* [adding compatibility with V8 release greater than v7.6 (node and electron engines)](https://github.com/theturtle32/WebSocket-Node/pull/376) (Thanks, [@artynet](https://github.com/artynet)) - -Version 1.0.30 --------------- -*Released 2019-09-12* - -* Moved gulp back to devDependencies - -Version 1.0.29 --------------- -*Released 2019-07-03* - -* Updated some dependencies and updated the .gitignore and .npmignore files - -Version 1.0.28 --------------- -*Released 2018-09-19* - -* Updated to latest version of [nan](https://github.com/nodejs/nan) - -Version 1.0.27 --------------- -*Released 2018-09-19* - -* Allowing additional request `headers` to be specified in the `tlsOptions` config parameter for WebSocketClient. See pull request #323 -* Resolving deprecation warnings relating to usage of `new Buffer` - -Version 1.0.26 --------------- -*Released 2018-04-27* - -* No longer using the deprecated `noAssert` parameter for functions reading and writing binary numeric data. (Thanks, [@BridgeAR](https://github.com/BridgeAR)) - -Version 1.0.25 --------------- -*Released 2017-10-18* - -* Bumping minimum supported node version specified in package.json to v0.10.x because some upstream libraries no longer install on v0.8.x -* [Allowing use of close codes 1012, 1013, 1014](https://www.iana.org/assignments/websocket/websocket.xml) -* [Allowing the `Host` header to be overridden.](https://github.com/theturtle32/WebSocket-Node/pull/291) (Thanks, [@Juneil](https://github.com/Juneil)) -* [Mitigating infinite loop for broken connections](https://github.com/theturtle32/WebSocket-Node/pull/289) (Thanks, [@tvkit](https://github.com/tvkit)) -* [Fixed Markdown Typos](https://github.com/theturtle32/WebSocket-Node/pull/281) (Thanks, [@teramotodaiki](https://github.com/teramotodaiki)) -* [Adding old readyState constants for W3CWebSocket interface](https://github.com/theturtle32/WebSocket-Node/pull/282) (Thanks, [@thechriswalker](https://github.com/thechriswalker)) - - -Version 1.0.24 --------------- -*Released 2016-12-28* - -* Fixed a bug when using native keepalive on Node >= 6.0. (Thanks, [@prossin](https://github.com/prossin)) -* Upgrading outdated dependencies - -Version 1.0.23 --------------- -*Released 2016-05-18* - -* Official support for Node 6.x -* Updating dependencies. Specifically, updating nan to ^2.3.3 - -Version 1.0.22 --------------- -*Released 2015-09-28* - -* Updating to work with nan 2.x - -Version 1.0.21 --------------- -*Released 2015-07-22* - -* Incremented and re-published to work around an aborted npm publish of v1.0.20. - -Version 1.0.20 --------------- -*Released 2015-07-22* - -* Added EventTarget to the W3CWebSocket interface (Thanks, [@ibc](https://github.com/ibc)!) -* Corrected an inaccurate error message. (Thanks, [@lekoaf](https://github.com/lekoaf)!) - -Version 1.0.19 --------------- -*Released 2015-05-28* - -* Updated to nan v1.8.x (tested with v1.8.4) -* Added `"license": "Apache-2.0"` to package.json via [pull request #199](https://github.com/theturtle32/WebSocket-Node/pull/199) by [@pgilad](https://github.com/pgilad). See [npm1k.org](http://npm1k.org/). - - -Version 1.0.18 --------------- -*Released 2015-03-19* - -* Resolves [issue #195](https://github.com/theturtle32/WebSocket-Node/pull/179) - passing number to connection.send() causes crash -* [Added close code/reason arguments to W3CWebSocket#close()](https://github.com/theturtle32/WebSocket-Node/issues/184) - - -Version 1.0.17 --------------- -*Released 2015-01-17* - -* Resolves [issue #179](https://github.com/theturtle32/WebSocket-Node/pull/179) - Allow toBuffer to work with empty data - - -Version 1.0.16 --------------- -*Released 2015-01-16* - -* Resolves [issue #178](https://github.com/theturtle32/WebSocket-Node/issues/178) - Ping Frames with no data - - -Version 1.0.15 --------------- -*Released 2015-01-13* - -* Resolves [issue #177](https://github.com/theturtle32/WebSocket-Node/issues/177) - WebSocketClient ignores options unless it has a tlsOptions property - - -Version 1.0.14 --------------- -*Released 2014-12-03* - -* Resolves [issue #173](https://github.com/theturtle32/WebSocket-Node/issues/173) - To allow the W3CWebSocket interface to accept an optional non-standard configuration object as its third parameter, which will be ignored when running in a browser context. - - -Version 1.0.13 --------------- -*Released 2014-11-29* - -* Fixes [issue #171](https://github.com/theturtle32/WebSocket-Node/issues/171) - Code to prevent calling req.accept/req.reject multiple times breaks sanity checks in req.accept - - -Version 1.0.12 --------------- -*Released 2014-11-28* - -* Fixes [issue #170](https://github.com/theturtle32/WebSocket-Node/issues/170) - Non-native XOR implementation broken after making JSHint happy - - -Version 1.0.11 --------------- -*Released 2014-11-25* - -* Fixes some undefined behavior surrounding closing WebSocket connections and more reliably handles edge cases. -* Adds an implementation of the W3C WebSocket API for browsers to facilitate sharing code between client and server via browserify. (Thanks, [@ibc](https://github.com/ibc)!) -* `WebSocketConnection.prototype.close` now accepts optional `reasonCode` and `description` parameters. -* Calling `accept` or `reject` more than once on a `WebSocketRequest` will now throw an error. [Issue #149](https://github.com/theturtle32/WebSocket-Node/issues/149) -* Handling connections dropped by client before accepted by server [Issue #167](https://github.com/theturtle32/WebSocket-Node/issues/167) -* Integrating Gulp and JSHint (Thanks, [@ibc](https://github.com/ibc)!) -* Starting to add individual unit tests (using substack's [tape](github.com/substack/tape) and [faucet](github.com/substack/faucet)) - - -Version 1.0.10 --------------- -*Released 2014-10-22* - -* Fixed Issue [#146](https://github.com/theturtle32/WebSocket-Node/issues/146) that was causing WebSocketClient to throw errors when instantiated if passed `tlsOptions`. - -Version 1.0.9 -------------- -*Released 2014-10-20* - -* Fixing an insidious corner-case bug that prevented `WebSocketConnection` from firing the `close` event in certain cases when there was an error on the underlying `Socket`, leading to connections sticking around forever, stuck erroneously in the `connected` state. These "ghost" connections would cause an error event when trying to write to them. -* Removed deprecated `websocketVersion` property. Use `webSocketVersion` instead (case difference). -* Allowing user to specify all properties for `tlsOptions` in WebSocketClient, not just a few whitelisted properties. This keeps us from having to constantly add new config properties for new versions of Node. (Thanks, [jesusprubio](https://github.com/jesusprubio)) -* Removing support for Node 0.4.x and 0.6.x. -* Adding `fuzzingclient.json` spec file for the Autobahn Test Suite. -* Now more fairly emitting `message` events from the `WebSocketConnection`. Previously, all buffered frames for a connection would be processed and all `message` events emitted before moving on to processing the next connection with available data. Now We process one frame per connection (most of the time) in a more fair round-robin fashion. -* Now correctly calling the `EventEmitter` superclass constructor during class instance initialization. -* `WebSocketClient.prototype.connect` now accepts the empty string (`''`) to mean "no subprotocol requested." Previously either `null` or an empty array (`[]`) was required. -* Fixing a `TypeError` bug in `WebSocketRouter` (Thanks, [a0000778](https://github.com/a0000778)) -* Fixing a potential race condition when attaching event listeners to the underlying `Socket`. (Thanks [RichardBsolut](https://github.com/RichardBsolut)) -* `WebSocketClient` now accepts an optional options hash to be passed to `(http|https).request`. (Thanks [mildred](https://github.com/mildred) and [aus](https://github.com/aus)) This enables the following new abilities, amongst others: - * Use WebSocket-Node from behind HTTP/HTTPS proxy servers using [koichik/node-tunnel](https://github.com/koichik/node-tunnel) or similar. - * Specify the local port and local address to bind the outgoing request socket to. -* Adding option to ignore `X-Forwarded-For` headers when accepting connections from untrusted clients. -* Adding ability to mount a `WebSocketServer` instance to an arbitrary number of Node http/https servers. -* Adding browser shim so Browserify won't blow up when trying to package up code that uses WebSocket-Node. The shim is a no-op, it ***does not implement a wrapper*** providing the WebSocket-Node API in the browser. -* Incorporating upstream enhancements for the native C++ UTF-8 validation and xor masking functions. (Thanks [einaros](https://github.com/einaros) and [kkoopa](https://github.com/kkoopa)) - - -Version 1.0.8 -------------- -*Released 2012-12-26* - -* Fixed remaining naming inconsistency of "websocketVersion" as opposed to "webSocketVersion" throughout the code, and added deprecation warnings for use of the old casing throughout. -* Fixed an issue with our case-insensitive handling of WebSocket subprotocols. Clients that requested a mixed-case subprotocol would end up failing the connection when the server accepted the connection, returning a lower-case version of the subprotocol name. Now we return the subprotocol name in the exact casing that was requested by the client, while still maintaining the case-insensitive verification logic for convenience and practicality. -* Making sure that any socket-level activity timeout that may have been set on a TCP socket is removed when initializing a connection. -* Added support for native TCP Keep-Alive instead of using the WebSocket ping/pong packets to serve that function. -* Fixed cookie parsing to be compliant with RFC 2109 - -Version 1.0.7 -------------- -*Released 2012-08-12* - -* ***Native modules are now optional!*** If they fail to compile, WebSocket-Node will still work but will not verify that received UTF-8 data is valid, and xor masking/unmasking of payload data for security purposes will not be as efficient as it is performed in JavaScript instead of native code. -* Reduced Node.JS version requirement back to v0.6.10 - -Version 1.0.6 -------------- -*Released 2012-05-22* - -* Now requires Node v0.6.13 since that's the first version that I can manage to successfully build the native UTF-8 validator with node-gyp through npm. - -Version 1.0.5 -------------- -*Released 2012-05-21* - -* Fixes the issues that users were having building the native UTF-8 validator on Windows platforms. Special Thanks to: - * [zerodivisi0n](https://github.com/zerodivisi0n) - * [andreasbotsikas](https://github.com/andreasbotsikas) -* Fixed accidental global variable usage (Thanks, [hakobera](https://github.com/hakobera)!) -* Added callbacks to the send* methods that provide notification of messages being sent on the wire and any socket errors that may occur when sending a message. (Thanks, [zerodivisi0n](https://github.com/zerodivisi0n)!) -* Added option to disable logging in the echo-server in the test folder (Thanks, [oberstet](https://github.com/oberstet)!) - - -Version 1.0.4 -------------- -*Released 2011-12-18* - -* Now validates that incoming UTF-8 messages do, in fact, contain valid UTF-8 data. The connection is dropped with prejudice if invalid data is received. This strict behavior conforms to the WebSocket RFC and is verified by the Autobahn Test Suite. This is accomplished in a performant way by using a native C++ Node module created by [einaros](https://github.com/einaros). -* Updated handling of connection closure to pass more of the Autobahn Test Suite. - -Version 1.0.3 -------------- -*Released 2011-12-18* - -* Substantial speed increase (~150% on my machine, depending on the circumstances) due to an optimization in FastBufferList.js that drastically reduces the number of memory alloctions and buffer copying. ([kazuyukitanimura](https://github.com/kazuyukitanimura)) - - -Version 1.0.2 -------------- -*Released 2011-11-28* - -* Fixing whiteboard example to work under Node 0.6.x ([theturtle32](https://github.com/theturtle32)) -* Now correctly emitting a `close` event with a 1006 error code if there is a TCP error while writing to the socket during the handshake. ([theturtle32](https://github.com/theturtle32)) -* Catching errors when writing to the TCP socket during the handshake. ([justoneplanet](https://github.com/justoneplanet)) -* No longer outputting console.warn messages when there is an error writing to the TCP socket ([justoneplanet](https://github.com/justoneplanet)) -* Fixing some formatting errors, commas, semicolons, etc. ([kaisellgren](https://github.com/kaisellgren)) - - -Version 1.0.1 -------------- -*Released 2011-11-21* - -* Now works with Node 0.6.2 as well as 0.4.12 -* Support TLS in WebSocketClient -* Added support for setting and reading cookies -* Added WebSocketServer.prototype.broadcast(data) convenience method -* Added `resourceURL` property to WebSocketRequest objects. It is a Node URL object with the `resource` and any query string params already parsed. -* The WebSocket request router no longer includes the entire query string when trying to match the path name of the request. -* WebSocketRouterRequest objects now include all the properties and events of WebSocketRequest objects. -* Removed more console.log statements. Please rely on the various events emitted to be notified of error conditions. I decided that it is not a library's place to spew information to the console. -* Renamed the `websocketVersion` property to `webSocketVersion` throughout the code to fix inconsistent capitalization. `websocketVersion` has been kept for compatibility but is deprecated and may be removed in the future. -* Now outputting the sanitized version of custom header names rather than the raw value. This prevents invalid HTTP from being put onto the wire if given an illegal header name. - - -I decided it's time to start maintaining a changelog now, starting with version 1.0.1. diff --git a/system/websocket_test/node_modules/websocket/LICENSE b/system/websocket_test/node_modules/websocket/LICENSE deleted file mode 100644 index 430d42b..0000000 --- a/system/websocket_test/node_modules/websocket/LICENSE +++ /dev/null @@ -1,177 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "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. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "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. - - "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). - - "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. - - "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." - - "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. - -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. - -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. - -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: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) 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 - - (d) 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. - -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. - -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. - -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. - -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. - -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. - -END OF TERMS AND CONDITIONS diff --git a/system/websocket_test/node_modules/websocket/Makefile b/system/websocket_test/node_modules/websocket/Makefile deleted file mode 100644 index a781c4a..0000000 --- a/system/websocket_test/node_modules/websocket/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -autobahn: - @NODE_PATH=lib node test/autobahn-test-client.js --host=127.0.0.1 --port=9000 - -autobahn-server: - @NODE_PATH=lib node test/echo-server.js diff --git a/system/websocket_test/node_modules/websocket/README.md b/system/websocket_test/node_modules/websocket/README.md deleted file mode 100644 index d401bb5..0000000 --- a/system/websocket_test/node_modules/websocket/README.md +++ /dev/null @@ -1,253 +0,0 @@ -WebSocket Client & Server Implementation for Node -================================================= - -[![npm version](https://badge.fury.io/js/websocket.svg)](http://badge.fury.io/js/websocket) - -[![NPM Downloads](https://img.shields.io/npm/dm/websocket.svg)](https://www.npmjs.com/package/websocket) - -[ ![Codeship Status for theturtle32/WebSocket-Node](https://codeship.com/projects/70458270-8ee7-0132-7756-0a0cf4fe8e66/status?branch=master)](https://codeship.com/projects/61106) - -Overview --------- -This is a (mostly) pure JavaScript implementation of the WebSocket protocol versions 8 and 13 for Node. There are some example client and server applications that implement various interoperability testing protocols in the "test/scripts" folder. - - -Documentation -============= - -[You can read the full API documentation in the docs folder.](docs/index.md) - - -Changelog ---------- - -***Current Version: 1.0.34*** - Release 2021-04-14 - -* Updated browser shim to use the native `globalThis` property when available. See [this MDN page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) for context. Resolves [#415](https://github.com/theturtle32/WebSocket-Node/issues/415) - -[View the full changelog](CHANGELOG.md) - -Browser Support ---------------- - -All current browsers are fully supported. - -* Firefox 7-9 (Old) (Protocol Version 8) -* Firefox 10+ (Protocol Version 13) -* Chrome 14,15 (Old) (Protocol Version 8) -* Chrome 16+ (Protocol Version 13) -* Internet Explorer 10+ (Protocol Version 13) -* Safari 6+ (Protocol Version 13) - -Benchmarks ----------- -There are some basic benchmarking sections in the Autobahn test suite. I've put up a [benchmark page](http://theturtle32.github.com/WebSocket-Node/benchmarks/) that shows the results from the Autobahn tests run against AutobahnServer 0.4.10, WebSocket-Node 1.0.2, WebSocket-Node 1.0.4, and ws 0.3.4. - -(These benchmarks are quite a bit outdated at this point, so take them with a grain of salt. Anyone up for running new benchmarks? I'll link to your report.) - -Autobahn Tests --------------- -The very complete [Autobahn Test Suite](http://autobahn.ws/testsuite/) is used by most WebSocket implementations to test spec compliance and interoperability. - -- [View Server Test Results](http://theturtle32.github.com/WebSocket-Node/test-report/servers/) - -Installation ------------- - -In your project root: - - $ npm install websocket - -Then in your code: - -```javascript -var WebSocketServer = require('websocket').server; -var WebSocketClient = require('websocket').client; -var WebSocketFrame = require('websocket').frame; -var WebSocketRouter = require('websocket').router; -var W3CWebSocket = require('websocket').w3cwebsocket; -``` - -Current Features: ------------------ -- Licensed under the Apache License, Version 2.0 -- Protocol version "8" and "13" (Draft-08 through the final RFC) framing and handshake -- Can handle/aggregate received fragmented messages -- Can fragment outgoing messages -- Router to mount multiple applications to various path and protocol combinations -- TLS supported for outbound connections via WebSocketClient -- TLS supported for server connections (use https.createServer instead of http.createServer) - - Thanks to [pors](https://github.com/pors) for confirming this! -- Cookie setting and parsing -- Tunable settings - - Max Receivable Frame Size - - Max Aggregate ReceivedMessage Size - - Whether to fragment outgoing messages - - Fragmentation chunk size for outgoing messages - - Whether to automatically send ping frames for the purposes of keepalive - - Keep-alive ping interval - - Whether or not to automatically assemble received fragments (allows application to handle individual fragments directly) - - How long to wait after sending a close frame for acknowledgment before closing the socket. -- [W3C WebSocket API](http://www.w3.org/TR/websockets/) for applications running on both Node and browsers (via the `W3CWebSocket` class). - - -Known Issues/Missing Features: ------------------------------- -- No API for user-provided protocol extensions. - - -Usage Examples -============== - -Server Example --------------- - -Here's a short example showing a server that echos back anything sent to it, whether utf-8 or binary. - -```javascript -#!/usr/bin/env node -var WebSocketServer = require('websocket').server; -var http = require('http'); - -var server = http.createServer(function(request, response) { - console.log((new Date()) + ' Received request for ' + request.url); - response.writeHead(404); - response.end(); -}); -server.listen(8080, function() { - console.log((new Date()) + ' Server is listening on port 8080'); -}); - -wsServer = new WebSocketServer({ - httpServer: server, - // You should not use autoAcceptConnections for production - // applications, as it defeats all standard cross-origin protection - // facilities built into the protocol and the browser. You should - // *always* verify the connection's origin and decide whether or not - // to accept it. - autoAcceptConnections: false -}); - -function originIsAllowed(origin) { - // put logic here to detect whether the specified origin is allowed. - return true; -} - -wsServer.on('request', function(request) { - if (!originIsAllowed(request.origin)) { - // Make sure we only accept requests from an allowed origin - request.reject(); - console.log((new Date()) + ' Connection from origin ' + request.origin + ' rejected.'); - return; - } - - var connection = request.accept('echo-protocol', request.origin); - console.log((new Date()) + ' Connection accepted.'); - connection.on('message', function(message) { - if (message.type === 'utf8') { - console.log('Received Message: ' + message.utf8Data); - connection.sendUTF(message.utf8Data); - } - else if (message.type === 'binary') { - console.log('Received Binary Message of ' + message.binaryData.length + ' bytes'); - connection.sendBytes(message.binaryData); - } - }); - connection.on('close', function(reasonCode, description) { - console.log((new Date()) + ' Peer ' + connection.remoteAddress + ' disconnected.'); - }); -}); -``` - -Client Example --------------- - -This is a simple example client that will print out any utf-8 messages it receives on the console, and periodically sends a random number. - -*This code demonstrates a client in Node.js, not in the browser* - -```javascript -#!/usr/bin/env node -var WebSocketClient = require('websocket').client; - -var client = new WebSocketClient(); - -client.on('connectFailed', function(error) { - console.log('Connect Error: ' + error.toString()); -}); - -client.on('connect', function(connection) { - console.log('WebSocket Client Connected'); - connection.on('error', function(error) { - console.log("Connection Error: " + error.toString()); - }); - connection.on('close', function() { - console.log('echo-protocol Connection Closed'); - }); - connection.on('message', function(message) { - if (message.type === 'utf8') { - console.log("Received: '" + message.utf8Data + "'"); - } - }); - - function sendNumber() { - if (connection.connected) { - var number = Math.round(Math.random() * 0xFFFFFF); - connection.sendUTF(number.toString()); - setTimeout(sendNumber, 1000); - } - } - sendNumber(); -}); - -client.connect('ws://localhost:8080/', 'echo-protocol'); -``` - -Client Example using the *W3C WebSocket API* --------------------------------------------- - -Same example as above but using the [W3C WebSocket API](http://www.w3.org/TR/websockets/). - -```javascript -var W3CWebSocket = require('websocket').w3cwebsocket; - -var client = new W3CWebSocket('ws://localhost:8080/', 'echo-protocol'); - -client.onerror = function() { - console.log('Connection Error'); -}; - -client.onopen = function() { - console.log('WebSocket Client Connected'); - - function sendNumber() { - if (client.readyState === client.OPEN) { - var number = Math.round(Math.random() * 0xFFFFFF); - client.send(number.toString()); - setTimeout(sendNumber, 1000); - } - } - sendNumber(); -}; - -client.onclose = function() { - console.log('echo-protocol Client Closed'); -}; - -client.onmessage = function(e) { - if (typeof e.data === 'string') { - console.log("Received: '" + e.data + "'"); - } -}; -``` - -Request Router Example ----------------------- - -For an example of using the request router, see `libwebsockets-test-server.js` in the `test` folder. - - -Resources ---------- - -A presentation on the state of the WebSockets protocol that I gave on July 23, 2011 at the LA Hacker News meetup. [WebSockets: The Real-Time Web, Delivered](http://www.scribd.com/doc/60898569/WebSockets-The-Real-Time-Web-Delivered) diff --git a/system/websocket_test/node_modules/websocket/gulpfile.js b/system/websocket_test/node_modules/websocket/gulpfile.js deleted file mode 100644 index b515b92..0000000 --- a/system/websocket_test/node_modules/websocket/gulpfile.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Dependencies. - */ -var gulp = require('gulp'); -var jshint = require('gulp-jshint'); - -gulp.task('lint', function() { - return gulp.src(['gulpfile.js', 'lib/**/*.js', 'test/**/*.js']) - .pipe(jshint('.jshintrc')) - .pipe(jshint.reporter('jshint-stylish', {verbose: true})) - .pipe(jshint.reporter('fail')); -}); - -gulp.task('default', gulp.series('lint')); diff --git a/system/websocket_test/node_modules/websocket/index.js b/system/websocket_test/node_modules/websocket/index.js deleted file mode 100644 index 573969f..0000000 --- a/system/websocket_test/node_modules/websocket/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/websocket'); \ No newline at end of file diff --git a/system/websocket_test/node_modules/websocket/lib/Deprecation.js b/system/websocket_test/node_modules/websocket/lib/Deprecation.js deleted file mode 100644 index 094f160..0000000 --- a/system/websocket_test/node_modules/websocket/lib/Deprecation.js +++ /dev/null @@ -1,32 +0,0 @@ -/************************************************************************ - * Copyright 2010-2015 Brian McKelvey. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var Deprecation = { - disableWarnings: false, - - deprecationWarningMap: { - - }, - - warn: function(deprecationName) { - if (!this.disableWarnings && this.deprecationWarningMap[deprecationName]) { - console.warn('DEPRECATION WARNING: ' + this.deprecationWarningMap[deprecationName]); - this.deprecationWarningMap[deprecationName] = false; - } - } -}; - -module.exports = Deprecation; diff --git a/system/websocket_test/node_modules/websocket/lib/W3CWebSocket.js b/system/websocket_test/node_modules/websocket/lib/W3CWebSocket.js deleted file mode 100644 index 44a4ac9..0000000 --- a/system/websocket_test/node_modules/websocket/lib/W3CWebSocket.js +++ /dev/null @@ -1,257 +0,0 @@ -/************************************************************************ - * Copyright 2010-2015 Brian McKelvey. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var WebSocketClient = require('./WebSocketClient'); -var toBuffer = require('typedarray-to-buffer'); -var yaeti = require('yaeti'); - - -const CONNECTING = 0; -const OPEN = 1; -const CLOSING = 2; -const CLOSED = 3; - - -module.exports = W3CWebSocket; - - -function W3CWebSocket(url, protocols, origin, headers, requestOptions, clientConfig) { - // Make this an EventTarget. - yaeti.EventTarget.call(this); - - // Sanitize clientConfig. - clientConfig = clientConfig || {}; - clientConfig.assembleFragments = true; // Required in the W3C API. - - var self = this; - - this._url = url; - this._readyState = CONNECTING; - this._protocol = undefined; - this._extensions = ''; - this._bufferedAmount = 0; // Hack, always 0. - this._binaryType = 'arraybuffer'; // TODO: Should be 'blob' by default, but Node has no Blob. - - // The WebSocketConnection instance. - this._connection = undefined; - - // WebSocketClient instance. - this._client = new WebSocketClient(clientConfig); - - this._client.on('connect', function(connection) { - onConnect.call(self, connection); - }); - - this._client.on('connectFailed', function() { - onConnectFailed.call(self); - }); - - this._client.connect(url, protocols, origin, headers, requestOptions); -} - - -// Expose W3C read only attributes. -Object.defineProperties(W3CWebSocket.prototype, { - url: { get: function() { return this._url; } }, - readyState: { get: function() { return this._readyState; } }, - protocol: { get: function() { return this._protocol; } }, - extensions: { get: function() { return this._extensions; } }, - bufferedAmount: { get: function() { return this._bufferedAmount; } } -}); - - -// Expose W3C write/read attributes. -Object.defineProperties(W3CWebSocket.prototype, { - binaryType: { - get: function() { - return this._binaryType; - }, - set: function(type) { - // TODO: Just 'arraybuffer' supported. - if (type !== 'arraybuffer') { - throw new SyntaxError('just "arraybuffer" type allowed for "binaryType" attribute'); - } - this._binaryType = type; - } - } -}); - - -// Expose W3C readyState constants into the WebSocket instance as W3C states. -[['CONNECTING',CONNECTING], ['OPEN',OPEN], ['CLOSING',CLOSING], ['CLOSED',CLOSED]].forEach(function(property) { - Object.defineProperty(W3CWebSocket.prototype, property[0], { - get: function() { return property[1]; } - }); -}); - -// Also expose W3C readyState constants into the WebSocket class (not defined by the W3C, -// but there are so many libs relying on them). -[['CONNECTING',CONNECTING], ['OPEN',OPEN], ['CLOSING',CLOSING], ['CLOSED',CLOSED]].forEach(function(property) { - Object.defineProperty(W3CWebSocket, property[0], { - get: function() { return property[1]; } - }); -}); - - -W3CWebSocket.prototype.send = function(data) { - if (this._readyState !== OPEN) { - throw new Error('cannot call send() while not connected'); - } - - // Text. - if (typeof data === 'string' || data instanceof String) { - this._connection.sendUTF(data); - } - // Binary. - else { - // Node Buffer. - if (data instanceof Buffer) { - this._connection.sendBytes(data); - } - // If ArrayBuffer or ArrayBufferView convert it to Node Buffer. - else if (data.byteLength || data.byteLength === 0) { - data = toBuffer(data); - this._connection.sendBytes(data); - } - else { - throw new Error('unknown binary data:', data); - } - } -}; - - -W3CWebSocket.prototype.close = function(code, reason) { - switch(this._readyState) { - case CONNECTING: - // NOTE: We don't have the WebSocketConnection instance yet so no - // way to close the TCP connection. - // Artificially invoke the onConnectFailed event. - onConnectFailed.call(this); - // And close if it connects after a while. - this._client.on('connect', function(connection) { - if (code) { - connection.close(code, reason); - } else { - connection.close(); - } - }); - break; - case OPEN: - this._readyState = CLOSING; - if (code) { - this._connection.close(code, reason); - } else { - this._connection.close(); - } - break; - case CLOSING: - case CLOSED: - break; - } -}; - - -/** - * Private API. - */ - - -function createCloseEvent(code, reason) { - var event = new yaeti.Event('close'); - - event.code = code; - event.reason = reason; - event.wasClean = (typeof code === 'undefined' || code === 1000); - - return event; -} - - -function createMessageEvent(data) { - var event = new yaeti.Event('message'); - - event.data = data; - - return event; -} - - -function onConnect(connection) { - var self = this; - - this._readyState = OPEN; - this._connection = connection; - this._protocol = connection.protocol; - this._extensions = connection.extensions; - - this._connection.on('close', function(code, reason) { - onClose.call(self, code, reason); - }); - - this._connection.on('message', function(msg) { - onMessage.call(self, msg); - }); - - this.dispatchEvent(new yaeti.Event('open')); -} - - -function onConnectFailed() { - destroy.call(this); - this._readyState = CLOSED; - - try { - this.dispatchEvent(new yaeti.Event('error')); - } finally { - this.dispatchEvent(createCloseEvent(1006, 'connection failed')); - } -} - - -function onClose(code, reason) { - destroy.call(this); - this._readyState = CLOSED; - - this.dispatchEvent(createCloseEvent(code, reason || '')); -} - - -function onMessage(message) { - if (message.utf8Data) { - this.dispatchEvent(createMessageEvent(message.utf8Data)); - } - else if (message.binaryData) { - // Must convert from Node Buffer to ArrayBuffer. - // TODO: or to a Blob (which does not exist in Node!). - if (this.binaryType === 'arraybuffer') { - var buffer = message.binaryData; - var arraybuffer = new ArrayBuffer(buffer.length); - var view = new Uint8Array(arraybuffer); - for (var i=0, len=buffer.length; i', '@', - ',', ';', ':', '\\', '\"', - '/', '[', ']', '?', '=', - '{', '}', ' ', String.fromCharCode(9) -]; - -var excludedTlsOptions = ['hostname','port','method','path','headers']; - -function WebSocketClient(config) { - // Superclass Constructor - EventEmitter.call(this); - - // TODO: Implement extensions - - this.config = { - // 1MiB max frame size. - maxReceivedFrameSize: 0x100000, - - // 8MiB max message size, only applicable if - // assembleFragments is true - maxReceivedMessageSize: 0x800000, - - // Outgoing messages larger than fragmentationThreshold will be - // split into multiple fragments. - fragmentOutgoingMessages: true, - - // Outgoing frames are fragmented if they exceed this threshold. - // Default is 16KiB - fragmentationThreshold: 0x4000, - - // Which version of the protocol to use for this session. This - // option will be removed once the protocol is finalized by the IETF - // It is only available to ease the transition through the - // intermediate draft protocol versions. - // At present, it only affects the name of the Origin header. - webSocketVersion: 13, - - // If true, fragmented messages will be automatically assembled - // and the full message will be emitted via a 'message' event. - // If false, each frame will be emitted via a 'frame' event and - // the application will be responsible for aggregating multiple - // fragmented frames. Single-frame messages will emit a 'message' - // event in addition to the 'frame' event. - // Most users will want to leave this set to 'true' - assembleFragments: true, - - // The Nagle Algorithm makes more efficient use of network resources - // by introducing a small delay before sending small packets so that - // multiple messages can be batched together before going onto the - // wire. This however comes at the cost of latency, so the default - // is to disable it. If you don't need low latency and are streaming - // lots of small messages, you can change this to 'false' - disableNagleAlgorithm: true, - - // The number of milliseconds to wait after sending a close frame - // for an acknowledgement to come back before giving up and just - // closing the socket. - closeTimeout: 5000, - - // Options to pass to https.connect if connecting via TLS - tlsOptions: {} - }; - - if (config) { - var tlsOptions; - if (config.tlsOptions) { - tlsOptions = config.tlsOptions; - delete config.tlsOptions; - } - else { - tlsOptions = {}; - } - extend(this.config, config); - extend(this.config.tlsOptions, tlsOptions); - } - - this._req = null; - - switch (this.config.webSocketVersion) { - case 8: - case 13: - break; - default: - throw new Error('Requested webSocketVersion is not supported. Allowed values are 8 and 13.'); - } -} - -util.inherits(WebSocketClient, EventEmitter); - -WebSocketClient.prototype.connect = function(requestUrl, protocols, origin, headers, extraRequestOptions) { - var self = this; - - if (typeof(protocols) === 'string') { - if (protocols.length > 0) { - protocols = [protocols]; - } - else { - protocols = []; - } - } - if (!(protocols instanceof Array)) { - protocols = []; - } - this.protocols = protocols; - this.origin = origin; - - if (typeof(requestUrl) === 'string') { - this.url = url.parse(requestUrl); - } - else { - this.url = requestUrl; // in case an already parsed url is passed in. - } - if (!this.url.protocol) { - throw new Error('You must specify a full WebSocket URL, including protocol.'); - } - if (!this.url.host) { - throw new Error('You must specify a full WebSocket URL, including hostname. Relative URLs are not supported.'); - } - - this.secure = (this.url.protocol === 'wss:'); - - // validate protocol characters: - this.protocols.forEach(function(protocol) { - for (var i=0; i < protocol.length; i ++) { - var charCode = protocol.charCodeAt(i); - var character = protocol.charAt(i); - if (charCode < 0x0021 || charCode > 0x007E || protocolSeparators.indexOf(character) !== -1) { - throw new Error('Protocol list contains invalid character "' + String.fromCharCode(charCode) + '"'); - } - } - }); - - var defaultPorts = { - 'ws:': '80', - 'wss:': '443' - }; - - if (!this.url.port) { - this.url.port = defaultPorts[this.url.protocol]; - } - - var nonce = bufferAllocUnsafe(16); - for (var i=0; i < 16; i++) { - nonce[i] = Math.round(Math.random()*0xFF); - } - this.base64nonce = nonce.toString('base64'); - - var hostHeaderValue = this.url.hostname; - if ((this.url.protocol === 'ws:' && this.url.port !== '80') || - (this.url.protocol === 'wss:' && this.url.port !== '443')) { - hostHeaderValue += (':' + this.url.port); - } - - var reqHeaders = {}; - if (this.secure && this.config.tlsOptions.hasOwnProperty('headers')) { - // Allow for additional headers to be provided when connecting via HTTPS - extend(reqHeaders, this.config.tlsOptions.headers); - } - if (headers) { - // Explicitly provided headers take priority over any from tlsOptions - extend(reqHeaders, headers); - } - extend(reqHeaders, { - 'Upgrade': 'websocket', - 'Connection': 'Upgrade', - 'Sec-WebSocket-Version': this.config.webSocketVersion.toString(10), - 'Sec-WebSocket-Key': this.base64nonce, - 'Host': reqHeaders.Host || hostHeaderValue - }); - - if (this.protocols.length > 0) { - reqHeaders['Sec-WebSocket-Protocol'] = this.protocols.join(', '); - } - if (this.origin) { - if (this.config.webSocketVersion === 13) { - reqHeaders['Origin'] = this.origin; - } - else if (this.config.webSocketVersion === 8) { - reqHeaders['Sec-WebSocket-Origin'] = this.origin; - } - } - - // TODO: Implement extensions - - var pathAndQuery; - // Ensure it begins with '/'. - if (this.url.pathname) { - pathAndQuery = this.url.path; - } - else if (this.url.path) { - pathAndQuery = '/' + this.url.path; - } - else { - pathAndQuery = '/'; - } - - function handleRequestError(error) { - self._req = null; - self.emit('connectFailed', error); - } - - var requestOptions = { - agent: false - }; - if (extraRequestOptions) { - extend(requestOptions, extraRequestOptions); - } - // These options are always overridden by the library. The user is not - // allowed to specify these directly. - extend(requestOptions, { - hostname: this.url.hostname, - port: this.url.port, - method: 'GET', - path: pathAndQuery, - headers: reqHeaders - }); - if (this.secure) { - var tlsOptions = this.config.tlsOptions; - for (var key in tlsOptions) { - if (tlsOptions.hasOwnProperty(key) && excludedTlsOptions.indexOf(key) === -1) { - requestOptions[key] = tlsOptions[key]; - } - } - } - - var req = this._req = (this.secure ? https : http).request(requestOptions); - req.on('upgrade', function handleRequestUpgrade(response, socket, head) { - self._req = null; - req.removeListener('error', handleRequestError); - self.socket = socket; - self.response = response; - self.firstDataChunk = head; - self.validateHandshake(); - }); - req.on('error', handleRequestError); - - req.on('response', function(response) { - self._req = null; - if (utils.eventEmitterListenerCount(self, 'httpResponse') > 0) { - self.emit('httpResponse', response, self); - if (response.socket) { - response.socket.end(); - } - } - else { - var headerDumpParts = []; - for (var headerName in response.headers) { - headerDumpParts.push(headerName + ': ' + response.headers[headerName]); - } - self.failHandshake( - 'Server responded with a non-101 status: ' + - response.statusCode + ' ' + response.statusMessage + - '\nResponse Headers Follow:\n' + - headerDumpParts.join('\n') + '\n' - ); - } - }); - req.end(); -}; - -WebSocketClient.prototype.validateHandshake = function() { - var headers = this.response.headers; - - if (this.protocols.length > 0) { - this.protocol = headers['sec-websocket-protocol']; - if (this.protocol) { - if (this.protocols.indexOf(this.protocol) === -1) { - this.failHandshake('Server did not respond with a requested protocol.'); - return; - } - } - else { - this.failHandshake('Expected a Sec-WebSocket-Protocol header.'); - return; - } - } - - if (!(headers['connection'] && headers['connection'].toLocaleLowerCase() === 'upgrade')) { - this.failHandshake('Expected a Connection: Upgrade header from the server'); - return; - } - - if (!(headers['upgrade'] && headers['upgrade'].toLocaleLowerCase() === 'websocket')) { - this.failHandshake('Expected an Upgrade: websocket header from the server'); - return; - } - - var sha1 = crypto.createHash('sha1'); - sha1.update(this.base64nonce + '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'); - var expectedKey = sha1.digest('base64'); - - if (!headers['sec-websocket-accept']) { - this.failHandshake('Expected Sec-WebSocket-Accept header from server'); - return; - } - - if (headers['sec-websocket-accept'] !== expectedKey) { - this.failHandshake('Sec-WebSocket-Accept header from server didn\'t match expected value of ' + expectedKey); - return; - } - - // TODO: Support extensions - - this.succeedHandshake(); -}; - -WebSocketClient.prototype.failHandshake = function(errorDescription) { - if (this.socket && this.socket.writable) { - this.socket.end(); - } - this.emit('connectFailed', new Error(errorDescription)); -}; - -WebSocketClient.prototype.succeedHandshake = function() { - var connection = new WebSocketConnection(this.socket, [], this.protocol, true, this.config); - - connection.webSocketVersion = this.config.webSocketVersion; - connection._addSocketEventListeners(); - - this.emit('connect', connection); - if (this.firstDataChunk.length > 0) { - connection.handleSocketData(this.firstDataChunk); - } - this.firstDataChunk = null; -}; - -WebSocketClient.prototype.abort = function() { - if (this._req) { - this._req.abort(); - } -}; - -module.exports = WebSocketClient; diff --git a/system/websocket_test/node_modules/websocket/lib/WebSocketConnection.js b/system/websocket_test/node_modules/websocket/lib/WebSocketConnection.js deleted file mode 100644 index 219de63..0000000 --- a/system/websocket_test/node_modules/websocket/lib/WebSocketConnection.js +++ /dev/null @@ -1,896 +0,0 @@ -/************************************************************************ - * Copyright 2010-2015 Brian McKelvey. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var util = require('util'); -var utils = require('./utils'); -var EventEmitter = require('events').EventEmitter; -var WebSocketFrame = require('./WebSocketFrame'); -var BufferList = require('../vendor/FastBufferList'); -var isValidUTF8 = require('utf-8-validate'); -var bufferAllocUnsafe = utils.bufferAllocUnsafe; -var bufferFromString = utils.bufferFromString; - -// Connected, fully-open, ready to send and receive frames -const STATE_OPEN = 'open'; -// Received a close frame from the remote peer -const STATE_PEER_REQUESTED_CLOSE = 'peer_requested_close'; -// Sent close frame to remote peer. No further data can be sent. -const STATE_ENDING = 'ending'; -// Connection is fully closed. No further data can be sent or received. -const STATE_CLOSED = 'closed'; - -var setImmediateImpl = ('setImmediate' in global) ? - global.setImmediate.bind(global) : - process.nextTick.bind(process); - -var idCounter = 0; - -function WebSocketConnection(socket, extensions, protocol, maskOutgoingPackets, config) { - this._debug = utils.BufferingLogger('websocket:connection', ++idCounter); - this._debug('constructor'); - - if (this._debug.enabled) { - instrumentSocketForDebugging(this, socket); - } - - // Superclass Constructor - EventEmitter.call(this); - - this._pingListenerCount = 0; - this.on('newListener', function(ev) { - if (ev === 'ping'){ - this._pingListenerCount++; - } - }).on('removeListener', function(ev) { - if (ev === 'ping') { - this._pingListenerCount--; - } - }); - - this.config = config; - this.socket = socket; - this.protocol = protocol; - this.extensions = extensions; - this.remoteAddress = socket.remoteAddress; - this.closeReasonCode = -1; - this.closeDescription = null; - this.closeEventEmitted = false; - - // We have to mask outgoing packets if we're acting as a WebSocket client. - this.maskOutgoingPackets = maskOutgoingPackets; - - // We re-use the same buffers for the mask and frame header for all frames - // received on each connection to avoid a small memory allocation for each - // frame. - this.maskBytes = bufferAllocUnsafe(4); - this.frameHeader = bufferAllocUnsafe(10); - - // the BufferList will handle the data streaming in - this.bufferList = new BufferList(); - - // Prepare for receiving first frame - this.currentFrame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - this.fragmentationSize = 0; // data received so far... - this.frameQueue = []; - - // Various bits of connection state - this.connected = true; - this.state = STATE_OPEN; - this.waitingForCloseResponse = false; - // Received TCP FIN, socket's readable stream is finished. - this.receivedEnd = false; - - this.closeTimeout = this.config.closeTimeout; - this.assembleFragments = this.config.assembleFragments; - this.maxReceivedMessageSize = this.config.maxReceivedMessageSize; - - this.outputBufferFull = false; - this.inputPaused = false; - this.receivedDataHandler = this.processReceivedData.bind(this); - this._closeTimerHandler = this.handleCloseTimer.bind(this); - - // Disable nagle algorithm? - this.socket.setNoDelay(this.config.disableNagleAlgorithm); - - // Make sure there is no socket inactivity timeout - this.socket.setTimeout(0); - - if (this.config.keepalive && !this.config.useNativeKeepalive) { - if (typeof(this.config.keepaliveInterval) !== 'number') { - throw new Error('keepaliveInterval must be specified and numeric ' + - 'if keepalive is true.'); - } - this._keepaliveTimerHandler = this.handleKeepaliveTimer.bind(this); - this.setKeepaliveTimer(); - - if (this.config.dropConnectionOnKeepaliveTimeout) { - if (typeof(this.config.keepaliveGracePeriod) !== 'number') { - throw new Error('keepaliveGracePeriod must be specified and ' + - 'numeric if dropConnectionOnKeepaliveTimeout ' + - 'is true.'); - } - this._gracePeriodTimerHandler = this.handleGracePeriodTimer.bind(this); - } - } - else if (this.config.keepalive && this.config.useNativeKeepalive) { - if (!('setKeepAlive' in this.socket)) { - throw new Error('Unable to use native keepalive: unsupported by ' + - 'this version of Node.'); - } - this.socket.setKeepAlive(true, this.config.keepaliveInterval); - } - - // The HTTP Client seems to subscribe to socket error events - // and re-dispatch them in such a way that doesn't make sense - // for users of our client, so we want to make sure nobody - // else is listening for error events on the socket besides us. - this.socket.removeAllListeners('error'); -} - -WebSocketConnection.CLOSE_REASON_NORMAL = 1000; -WebSocketConnection.CLOSE_REASON_GOING_AWAY = 1001; -WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR = 1002; -WebSocketConnection.CLOSE_REASON_UNPROCESSABLE_INPUT = 1003; -WebSocketConnection.CLOSE_REASON_RESERVED = 1004; // Reserved value. Undefined meaning. -WebSocketConnection.CLOSE_REASON_NOT_PROVIDED = 1005; // Not to be used on the wire -WebSocketConnection.CLOSE_REASON_ABNORMAL = 1006; // Not to be used on the wire -WebSocketConnection.CLOSE_REASON_INVALID_DATA = 1007; -WebSocketConnection.CLOSE_REASON_POLICY_VIOLATION = 1008; -WebSocketConnection.CLOSE_REASON_MESSAGE_TOO_BIG = 1009; -WebSocketConnection.CLOSE_REASON_EXTENSION_REQUIRED = 1010; -WebSocketConnection.CLOSE_REASON_INTERNAL_SERVER_ERROR = 1011; -WebSocketConnection.CLOSE_REASON_TLS_HANDSHAKE_FAILED = 1015; // Not to be used on the wire - -WebSocketConnection.CLOSE_DESCRIPTIONS = { - 1000: 'Normal connection closure', - 1001: 'Remote peer is going away', - 1002: 'Protocol error', - 1003: 'Unprocessable input', - 1004: 'Reserved', - 1005: 'Reason not provided', - 1006: 'Abnormal closure, no further detail available', - 1007: 'Invalid data received', - 1008: 'Policy violation', - 1009: 'Message too big', - 1010: 'Extension requested by client is required', - 1011: 'Internal Server Error', - 1015: 'TLS Handshake Failed' -}; - -function validateCloseReason(code) { - if (code < 1000) { - // Status codes in the range 0-999 are not used - return false; - } - if (code >= 1000 && code <= 2999) { - // Codes from 1000 - 2999 are reserved for use by the protocol. Only - // a few codes are defined, all others are currently illegal. - return [1000, 1001, 1002, 1003, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015].indexOf(code) !== -1; - } - if (code >= 3000 && code <= 3999) { - // Reserved for use by libraries, frameworks, and applications. - // Should be registered with IANA. Interpretation of these codes is - // undefined by the WebSocket protocol. - return true; - } - if (code >= 4000 && code <= 4999) { - // Reserved for private use. Interpretation of these codes is - // undefined by the WebSocket protocol. - return true; - } - if (code >= 5000) { - return false; - } -} - -util.inherits(WebSocketConnection, EventEmitter); - -WebSocketConnection.prototype._addSocketEventListeners = function() { - this.socket.on('error', this.handleSocketError.bind(this)); - this.socket.on('end', this.handleSocketEnd.bind(this)); - this.socket.on('close', this.handleSocketClose.bind(this)); - this.socket.on('drain', this.handleSocketDrain.bind(this)); - this.socket.on('pause', this.handleSocketPause.bind(this)); - this.socket.on('resume', this.handleSocketResume.bind(this)); - this.socket.on('data', this.handleSocketData.bind(this)); -}; - -// set or reset the keepalive timer when data is received. -WebSocketConnection.prototype.setKeepaliveTimer = function() { - this._debug('setKeepaliveTimer'); - if (!this.config.keepalive || this.config.useNativeKeepalive) { return; } - this.clearKeepaliveTimer(); - this.clearGracePeriodTimer(); - this._keepaliveTimeoutID = setTimeout(this._keepaliveTimerHandler, this.config.keepaliveInterval); -}; - -WebSocketConnection.prototype.clearKeepaliveTimer = function() { - if (this._keepaliveTimeoutID) { - clearTimeout(this._keepaliveTimeoutID); - } -}; - -// No data has been received within config.keepaliveTimeout ms. -WebSocketConnection.prototype.handleKeepaliveTimer = function() { - this._debug('handleKeepaliveTimer'); - this._keepaliveTimeoutID = null; - this.ping(); - - // If we are configured to drop connections if the client doesn't respond - // then set the grace period timer. - if (this.config.dropConnectionOnKeepaliveTimeout) { - this.setGracePeriodTimer(); - } - else { - // Otherwise reset the keepalive timer to send the next ping. - this.setKeepaliveTimer(); - } -}; - -WebSocketConnection.prototype.setGracePeriodTimer = function() { - this._debug('setGracePeriodTimer'); - this.clearGracePeriodTimer(); - this._gracePeriodTimeoutID = setTimeout(this._gracePeriodTimerHandler, this.config.keepaliveGracePeriod); -}; - -WebSocketConnection.prototype.clearGracePeriodTimer = function() { - if (this._gracePeriodTimeoutID) { - clearTimeout(this._gracePeriodTimeoutID); - } -}; - -WebSocketConnection.prototype.handleGracePeriodTimer = function() { - this._debug('handleGracePeriodTimer'); - // If this is called, the client has not responded and is assumed dead. - this._gracePeriodTimeoutID = null; - this.drop(WebSocketConnection.CLOSE_REASON_ABNORMAL, 'Peer not responding.', true); -}; - -WebSocketConnection.prototype.handleSocketData = function(data) { - this._debug('handleSocketData'); - // Reset the keepalive timer when receiving data of any kind. - this.setKeepaliveTimer(); - - // Add received data to our bufferList, which efficiently holds received - // data chunks in a linked list of Buffer objects. - this.bufferList.write(data); - - this.processReceivedData(); -}; - -WebSocketConnection.prototype.processReceivedData = function() { - this._debug('processReceivedData'); - // If we're not connected, we should ignore any data remaining on the buffer. - if (!this.connected) { return; } - - // Receiving/parsing is expected to be halted when paused. - if (this.inputPaused) { return; } - - var frame = this.currentFrame; - - // WebSocketFrame.prototype.addData returns true if all data necessary to - // parse the frame was available. It returns false if we are waiting for - // more data to come in on the wire. - if (!frame.addData(this.bufferList)) { this._debug('-- insufficient data for frame'); return; } - - var self = this; - - // Handle possible parsing errors - if (frame.protocolError) { - // Something bad happened.. get rid of this client. - this._debug('-- protocol error'); - process.nextTick(function() { - self.drop(WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR, frame.dropReason); - }); - return; - } - else if (frame.frameTooLarge) { - this._debug('-- frame too large'); - process.nextTick(function() { - self.drop(WebSocketConnection.CLOSE_REASON_MESSAGE_TOO_BIG, frame.dropReason); - }); - return; - } - - // For now since we don't support extensions, all RSV bits are illegal - if (frame.rsv1 || frame.rsv2 || frame.rsv3) { - this._debug('-- illegal rsv flag'); - process.nextTick(function() { - self.drop(WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR, - 'Unsupported usage of rsv bits without negotiated extension.'); - }); - return; - } - - if (!this.assembleFragments) { - this._debug('-- emitting frame'); - process.nextTick(function() { self.emit('frame', frame); }); - } - - process.nextTick(function() { self.processFrame(frame); }); - - this.currentFrame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - - // If there's data remaining, schedule additional processing, but yield - // for now so that other connections have a chance to have their data - // processed. We use setImmediate here instead of process.nextTick to - // explicitly indicate that we wish for other I/O to be handled first. - if (this.bufferList.length > 0) { - setImmediateImpl(this.receivedDataHandler); - } -}; - -WebSocketConnection.prototype.handleSocketError = function(error) { - this._debug('handleSocketError: %j', error); - if (this.state === STATE_CLOSED) { - // See https://github.com/theturtle32/WebSocket-Node/issues/288 - this._debug(' --- Socket \'error\' after \'close\''); - return; - } - this.closeReasonCode = WebSocketConnection.CLOSE_REASON_ABNORMAL; - this.closeDescription = 'Socket Error: ' + error.syscall + ' ' + error.code; - this.connected = false; - this.state = STATE_CLOSED; - this.fragmentationSize = 0; - if (utils.eventEmitterListenerCount(this, 'error') > 0) { - this.emit('error', error); - } - this.socket.destroy(); - this._debug.printOutput(); -}; - -WebSocketConnection.prototype.handleSocketEnd = function() { - this._debug('handleSocketEnd: received socket end. state = %s', this.state); - this.receivedEnd = true; - if (this.state === STATE_CLOSED) { - // When using the TLS module, sometimes the socket will emit 'end' - // after it emits 'close'. I don't think that's correct behavior, - // but we should deal with it gracefully by ignoring it. - this._debug(' --- Socket \'end\' after \'close\''); - return; - } - if (this.state !== STATE_PEER_REQUESTED_CLOSE && - this.state !== STATE_ENDING) { - this._debug(' --- UNEXPECTED socket end.'); - this.socket.end(); - } -}; - -WebSocketConnection.prototype.handleSocketClose = function(hadError) { - this._debug('handleSocketClose: received socket close'); - this.socketHadError = hadError; - this.connected = false; - this.state = STATE_CLOSED; - // If closeReasonCode is still set to -1 at this point then we must - // not have received a close frame!! - if (this.closeReasonCode === -1) { - this.closeReasonCode = WebSocketConnection.CLOSE_REASON_ABNORMAL; - this.closeDescription = 'Connection dropped by remote peer.'; - } - this.clearCloseTimer(); - this.clearKeepaliveTimer(); - this.clearGracePeriodTimer(); - if (!this.closeEventEmitted) { - this.closeEventEmitted = true; - this._debug('-- Emitting WebSocketConnection close event'); - this.emit('close', this.closeReasonCode, this.closeDescription); - } -}; - -WebSocketConnection.prototype.handleSocketDrain = function() { - this._debug('handleSocketDrain: socket drain event'); - this.outputBufferFull = false; - this.emit('drain'); -}; - -WebSocketConnection.prototype.handleSocketPause = function() { - this._debug('handleSocketPause: socket pause event'); - this.inputPaused = true; - this.emit('pause'); -}; - -WebSocketConnection.prototype.handleSocketResume = function() { - this._debug('handleSocketResume: socket resume event'); - this.inputPaused = false; - this.emit('resume'); - this.processReceivedData(); -}; - -WebSocketConnection.prototype.pause = function() { - this._debug('pause: pause requested'); - this.socket.pause(); -}; - -WebSocketConnection.prototype.resume = function() { - this._debug('resume: resume requested'); - this.socket.resume(); -}; - -WebSocketConnection.prototype.close = function(reasonCode, description) { - if (this.connected) { - this._debug('close: Initating clean WebSocket close sequence.'); - if ('number' !== typeof reasonCode) { - reasonCode = WebSocketConnection.CLOSE_REASON_NORMAL; - } - if (!validateCloseReason(reasonCode)) { - throw new Error('Close code ' + reasonCode + ' is not valid.'); - } - if ('string' !== typeof description) { - description = WebSocketConnection.CLOSE_DESCRIPTIONS[reasonCode]; - } - this.closeReasonCode = reasonCode; - this.closeDescription = description; - this.setCloseTimer(); - this.sendCloseFrame(this.closeReasonCode, this.closeDescription); - this.state = STATE_ENDING; - this.connected = false; - } -}; - -WebSocketConnection.prototype.drop = function(reasonCode, description, skipCloseFrame) { - this._debug('drop'); - if (typeof(reasonCode) !== 'number') { - reasonCode = WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR; - } - - if (typeof(description) !== 'string') { - // If no description is provided, try to look one up based on the - // specified reasonCode. - description = WebSocketConnection.CLOSE_DESCRIPTIONS[reasonCode]; - } - - this._debug('Forcefully dropping connection. skipCloseFrame: %s, code: %d, description: %s', - skipCloseFrame, reasonCode, description - ); - - this.closeReasonCode = reasonCode; - this.closeDescription = description; - this.frameQueue = []; - this.fragmentationSize = 0; - if (!skipCloseFrame) { - this.sendCloseFrame(reasonCode, description); - } - this.connected = false; - this.state = STATE_CLOSED; - this.clearCloseTimer(); - this.clearKeepaliveTimer(); - this.clearGracePeriodTimer(); - - if (!this.closeEventEmitted) { - this.closeEventEmitted = true; - this._debug('Emitting WebSocketConnection close event'); - this.emit('close', this.closeReasonCode, this.closeDescription); - } - - this._debug('Drop: destroying socket'); - this.socket.destroy(); -}; - -WebSocketConnection.prototype.setCloseTimer = function() { - this._debug('setCloseTimer'); - this.clearCloseTimer(); - this._debug('Setting close timer'); - this.waitingForCloseResponse = true; - this.closeTimer = setTimeout(this._closeTimerHandler, this.closeTimeout); -}; - -WebSocketConnection.prototype.clearCloseTimer = function() { - this._debug('clearCloseTimer'); - if (this.closeTimer) { - this._debug('Clearing close timer'); - clearTimeout(this.closeTimer); - this.waitingForCloseResponse = false; - this.closeTimer = null; - } -}; - -WebSocketConnection.prototype.handleCloseTimer = function() { - this._debug('handleCloseTimer'); - this.closeTimer = null; - if (this.waitingForCloseResponse) { - this._debug('Close response not received from client. Forcing socket end.'); - this.waitingForCloseResponse = false; - this.state = STATE_CLOSED; - this.socket.end(); - } -}; - -WebSocketConnection.prototype.processFrame = function(frame) { - this._debug('processFrame'); - this._debug(' -- frame: %s', frame); - - // Any non-control opcode besides 0x00 (continuation) received in the - // middle of a fragmented message is illegal. - if (this.frameQueue.length !== 0 && (frame.opcode > 0x00 && frame.opcode < 0x08)) { - this.drop(WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR, - 'Illegal frame opcode 0x' + frame.opcode.toString(16) + ' ' + - 'received in middle of fragmented message.'); - return; - } - - switch(frame.opcode) { - case 0x02: // WebSocketFrame.BINARY_FRAME - this._debug('-- Binary Frame'); - if (this.assembleFragments) { - if (frame.fin) { - // Complete single-frame message received - this._debug('---- Emitting \'message\' event'); - this.emit('message', { - type: 'binary', - binaryData: frame.binaryPayload - }); - } - else { - // beginning of a fragmented message - this.frameQueue.push(frame); - this.fragmentationSize = frame.length; - } - } - break; - case 0x01: // WebSocketFrame.TEXT_FRAME - this._debug('-- Text Frame'); - if (this.assembleFragments) { - if (frame.fin) { - if (!isValidUTF8(frame.binaryPayload)) { - this.drop(WebSocketConnection.CLOSE_REASON_INVALID_DATA, - 'Invalid UTF-8 Data Received'); - return; - } - // Complete single-frame message received - this._debug('---- Emitting \'message\' event'); - this.emit('message', { - type: 'utf8', - utf8Data: frame.binaryPayload.toString('utf8') - }); - } - else { - // beginning of a fragmented message - this.frameQueue.push(frame); - this.fragmentationSize = frame.length; - } - } - break; - case 0x00: // WebSocketFrame.CONTINUATION - this._debug('-- Continuation Frame'); - if (this.assembleFragments) { - if (this.frameQueue.length === 0) { - this.drop(WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR, - 'Unexpected Continuation Frame'); - return; - } - - this.fragmentationSize += frame.length; - - if (this.fragmentationSize > this.maxReceivedMessageSize) { - this.drop(WebSocketConnection.CLOSE_REASON_MESSAGE_TOO_BIG, - 'Maximum message size exceeded.'); - return; - } - - this.frameQueue.push(frame); - - if (frame.fin) { - // end of fragmented message, so we process the whole - // message now. We also have to decode the utf-8 data - // for text frames after combining all the fragments. - var bytesCopied = 0; - var binaryPayload = bufferAllocUnsafe(this.fragmentationSize); - var opcode = this.frameQueue[0].opcode; - this.frameQueue.forEach(function (currentFrame) { - currentFrame.binaryPayload.copy(binaryPayload, bytesCopied); - bytesCopied += currentFrame.binaryPayload.length; - }); - this.frameQueue = []; - this.fragmentationSize = 0; - - switch (opcode) { - case 0x02: // WebSocketOpcode.BINARY_FRAME - this.emit('message', { - type: 'binary', - binaryData: binaryPayload - }); - break; - case 0x01: // WebSocketOpcode.TEXT_FRAME - if (!isValidUTF8(binaryPayload)) { - this.drop(WebSocketConnection.CLOSE_REASON_INVALID_DATA, - 'Invalid UTF-8 Data Received'); - return; - } - this.emit('message', { - type: 'utf8', - utf8Data: binaryPayload.toString('utf8') - }); - break; - default: - this.drop(WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR, - 'Unexpected first opcode in fragmentation sequence: 0x' + opcode.toString(16)); - return; - } - } - } - break; - case 0x09: // WebSocketFrame.PING - this._debug('-- Ping Frame'); - - if (this._pingListenerCount > 0) { - // logic to emit the ping frame: this is only done when a listener is known to exist - // Expose a function allowing the user to override the default ping() behavior - var cancelled = false; - var cancel = function() { - cancelled = true; - }; - this.emit('ping', cancel, frame.binaryPayload); - - // Only send a pong if the client did not indicate that he would like to cancel - if (!cancelled) { - this.pong(frame.binaryPayload); - } - } - else { - this.pong(frame.binaryPayload); - } - - break; - case 0x0A: // WebSocketFrame.PONG - this._debug('-- Pong Frame'); - this.emit('pong', frame.binaryPayload); - break; - case 0x08: // WebSocketFrame.CONNECTION_CLOSE - this._debug('-- Close Frame'); - if (this.waitingForCloseResponse) { - // Got response to our request to close the connection. - // Close is complete, so we just hang up. - this._debug('---- Got close response from peer. Completing closing handshake.'); - this.clearCloseTimer(); - this.waitingForCloseResponse = false; - this.state = STATE_CLOSED; - this.socket.end(); - return; - } - - this._debug('---- Closing handshake initiated by peer.'); - // Got request from other party to close connection. - // Send back acknowledgement and then hang up. - this.state = STATE_PEER_REQUESTED_CLOSE; - var respondCloseReasonCode; - - // Make sure the close reason provided is legal according to - // the protocol spec. Providing no close status is legal. - // WebSocketFrame sets closeStatus to -1 by default, so if it - // is still -1, then no status was provided. - if (frame.invalidCloseFrameLength) { - this.closeReasonCode = 1005; // 1005 = No reason provided. - respondCloseReasonCode = WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR; - } - else if (frame.closeStatus === -1 || validateCloseReason(frame.closeStatus)) { - this.closeReasonCode = frame.closeStatus; - respondCloseReasonCode = WebSocketConnection.CLOSE_REASON_NORMAL; - } - else { - this.closeReasonCode = frame.closeStatus; - respondCloseReasonCode = WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR; - } - - // If there is a textual description in the close frame, extract it. - if (frame.binaryPayload.length > 1) { - if (!isValidUTF8(frame.binaryPayload)) { - this.drop(WebSocketConnection.CLOSE_REASON_INVALID_DATA, - 'Invalid UTF-8 Data Received'); - return; - } - this.closeDescription = frame.binaryPayload.toString('utf8'); - } - else { - this.closeDescription = WebSocketConnection.CLOSE_DESCRIPTIONS[this.closeReasonCode]; - } - this._debug( - '------ Remote peer %s - code: %d - %s - close frame payload length: %d', - this.remoteAddress, this.closeReasonCode, - this.closeDescription, frame.length - ); - this._debug('------ responding to remote peer\'s close request.'); - this.sendCloseFrame(respondCloseReasonCode, null); - this.connected = false; - break; - default: - this._debug('-- Unrecognized Opcode %d', frame.opcode); - this.drop(WebSocketConnection.CLOSE_REASON_PROTOCOL_ERROR, - 'Unrecognized Opcode: 0x' + frame.opcode.toString(16)); - break; - } -}; - -WebSocketConnection.prototype.send = function(data, cb) { - this._debug('send'); - if (Buffer.isBuffer(data)) { - this.sendBytes(data, cb); - } - else if (typeof(data['toString']) === 'function') { - this.sendUTF(data, cb); - } - else { - throw new Error('Data provided must either be a Node Buffer or implement toString()'); - } -}; - -WebSocketConnection.prototype.sendUTF = function(data, cb) { - data = bufferFromString(data.toString(), 'utf8'); - this._debug('sendUTF: %d bytes', data.length); - var frame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - frame.opcode = 0x01; // WebSocketOpcode.TEXT_FRAME - frame.binaryPayload = data; - this.fragmentAndSend(frame, cb); -}; - -WebSocketConnection.prototype.sendBytes = function(data, cb) { - this._debug('sendBytes'); - if (!Buffer.isBuffer(data)) { - throw new Error('You must pass a Node Buffer object to WebSocketConnection.prototype.sendBytes()'); - } - var frame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - frame.opcode = 0x02; // WebSocketOpcode.BINARY_FRAME - frame.binaryPayload = data; - this.fragmentAndSend(frame, cb); -}; - -WebSocketConnection.prototype.ping = function(data) { - this._debug('ping'); - var frame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - frame.opcode = 0x09; // WebSocketOpcode.PING - frame.fin = true; - if (data) { - if (!Buffer.isBuffer(data)) { - data = bufferFromString(data.toString(), 'utf8'); - } - if (data.length > 125) { - this._debug('WebSocket: Data for ping is longer than 125 bytes. Truncating.'); - data = data.slice(0,124); - } - frame.binaryPayload = data; - } - this.sendFrame(frame); -}; - -// Pong frames have to echo back the contents of the data portion of the -// ping frame exactly, byte for byte. -WebSocketConnection.prototype.pong = function(binaryPayload) { - this._debug('pong'); - var frame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - frame.opcode = 0x0A; // WebSocketOpcode.PONG - if (Buffer.isBuffer(binaryPayload) && binaryPayload.length > 125) { - this._debug('WebSocket: Data for pong is longer than 125 bytes. Truncating.'); - binaryPayload = binaryPayload.slice(0,124); - } - frame.binaryPayload = binaryPayload; - frame.fin = true; - this.sendFrame(frame); -}; - -WebSocketConnection.prototype.fragmentAndSend = function(frame, cb) { - this._debug('fragmentAndSend'); - if (frame.opcode > 0x07) { - throw new Error('You cannot fragment control frames.'); - } - - var threshold = this.config.fragmentationThreshold; - var length = frame.binaryPayload.length; - - // Send immediately if fragmentation is disabled or the message is not - // larger than the fragmentation threshold. - if (!this.config.fragmentOutgoingMessages || (frame.binaryPayload && length <= threshold)) { - frame.fin = true; - this.sendFrame(frame, cb); - return; - } - - var numFragments = Math.ceil(length / threshold); - var sentFragments = 0; - var sentCallback = function fragmentSentCallback(err) { - if (err) { - if (typeof cb === 'function') { - // pass only the first error - cb(err); - cb = null; - } - return; - } - ++sentFragments; - if ((sentFragments === numFragments) && (typeof cb === 'function')) { - cb(); - } - }; - for (var i=1; i <= numFragments; i++) { - var currentFrame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - - // continuation opcode except for first frame. - currentFrame.opcode = (i === 1) ? frame.opcode : 0x00; - - // fin set on last frame only - currentFrame.fin = (i === numFragments); - - // length is likely to be shorter on the last fragment - var currentLength = (i === numFragments) ? length - (threshold * (i-1)) : threshold; - var sliceStart = threshold * (i-1); - - // Slice the right portion of the original payload - currentFrame.binaryPayload = frame.binaryPayload.slice(sliceStart, sliceStart + currentLength); - - this.sendFrame(currentFrame, sentCallback); - } -}; - -WebSocketConnection.prototype.sendCloseFrame = function(reasonCode, description, cb) { - if (typeof(reasonCode) !== 'number') { - reasonCode = WebSocketConnection.CLOSE_REASON_NORMAL; - } - - this._debug('sendCloseFrame state: %s, reasonCode: %d, description: %s', this.state, reasonCode, description); - - if (this.state !== STATE_OPEN && this.state !== STATE_PEER_REQUESTED_CLOSE) { return; } - - var frame = new WebSocketFrame(this.maskBytes, this.frameHeader, this.config); - frame.fin = true; - frame.opcode = 0x08; // WebSocketOpcode.CONNECTION_CLOSE - frame.closeStatus = reasonCode; - if (typeof(description) === 'string') { - frame.binaryPayload = bufferFromString(description, 'utf8'); - } - - this.sendFrame(frame, cb); - this.socket.end(); -}; - -WebSocketConnection.prototype.sendFrame = function(frame, cb) { - this._debug('sendFrame'); - frame.mask = this.maskOutgoingPackets; - var flushed = this.socket.write(frame.toBuffer(), cb); - this.outputBufferFull = !flushed; - return flushed; -}; - -module.exports = WebSocketConnection; - - - -function instrumentSocketForDebugging(connection, socket) { - /* jshint loopfunc: true */ - if (!connection._debug.enabled) { return; } - - var originalSocketEmit = socket.emit; - socket.emit = function(event) { - connection._debug('||| Socket Event \'%s\'', event); - originalSocketEmit.apply(this, arguments); - }; - - for (var key in socket) { - if ('function' !== typeof(socket[key])) { continue; } - if (['emit'].indexOf(key) !== -1) { continue; } - (function(key) { - var original = socket[key]; - if (key === 'on') { - socket[key] = function proxyMethod__EventEmitter__On() { - connection._debug('||| Socket method called: %s (%s)', key, arguments[0]); - return original.apply(this, arguments); - }; - return; - } - socket[key] = function proxyMethod() { - connection._debug('||| Socket method called: %s', key); - return original.apply(this, arguments); - }; - })(key); - } -} diff --git a/system/websocket_test/node_modules/websocket/lib/WebSocketFrame.js b/system/websocket_test/node_modules/websocket/lib/WebSocketFrame.js deleted file mode 100644 index 16d7500..0000000 --- a/system/websocket_test/node_modules/websocket/lib/WebSocketFrame.js +++ /dev/null @@ -1,280 +0,0 @@ -/************************************************************************ - * Copyright 2010-2015 Brian McKelvey. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var bufferUtil = require('bufferutil'); -var bufferAllocUnsafe = require('./utils').bufferAllocUnsafe; - -const DECODE_HEADER = 1; -const WAITING_FOR_16_BIT_LENGTH = 2; -const WAITING_FOR_64_BIT_LENGTH = 3; -const WAITING_FOR_MASK_KEY = 4; -const WAITING_FOR_PAYLOAD = 5; -const COMPLETE = 6; - -// WebSocketConnection will pass shared buffer objects for maskBytes and -// frameHeader into the constructor to avoid tons of small memory allocations -// for each frame we have to parse. This is only used for parsing frames -// we receive off the wire. -function WebSocketFrame(maskBytes, frameHeader, config) { - this.maskBytes = maskBytes; - this.frameHeader = frameHeader; - this.config = config; - this.maxReceivedFrameSize = config.maxReceivedFrameSize; - this.protocolError = false; - this.frameTooLarge = false; - this.invalidCloseFrameLength = false; - this.parseState = DECODE_HEADER; - this.closeStatus = -1; -} - -WebSocketFrame.prototype.addData = function(bufferList) { - if (this.parseState === DECODE_HEADER) { - if (bufferList.length >= 2) { - bufferList.joinInto(this.frameHeader, 0, 0, 2); - bufferList.advance(2); - var firstByte = this.frameHeader[0]; - var secondByte = this.frameHeader[1]; - - this.fin = Boolean(firstByte & 0x80); - this.rsv1 = Boolean(firstByte & 0x40); - this.rsv2 = Boolean(firstByte & 0x20); - this.rsv3 = Boolean(firstByte & 0x10); - this.mask = Boolean(secondByte & 0x80); - - this.opcode = firstByte & 0x0F; - this.length = secondByte & 0x7F; - - // Control frame sanity check - if (this.opcode >= 0x08) { - if (this.length > 125) { - this.protocolError = true; - this.dropReason = 'Illegal control frame longer than 125 bytes.'; - return true; - } - if (!this.fin) { - this.protocolError = true; - this.dropReason = 'Control frames must not be fragmented.'; - return true; - } - } - - if (this.length === 126) { - this.parseState = WAITING_FOR_16_BIT_LENGTH; - } - else if (this.length === 127) { - this.parseState = WAITING_FOR_64_BIT_LENGTH; - } - else { - this.parseState = WAITING_FOR_MASK_KEY; - } - } - } - if (this.parseState === WAITING_FOR_16_BIT_LENGTH) { - if (bufferList.length >= 2) { - bufferList.joinInto(this.frameHeader, 2, 0, 2); - bufferList.advance(2); - this.length = this.frameHeader.readUInt16BE(2); - this.parseState = WAITING_FOR_MASK_KEY; - } - } - else if (this.parseState === WAITING_FOR_64_BIT_LENGTH) { - if (bufferList.length >= 8) { - bufferList.joinInto(this.frameHeader, 2, 0, 8); - bufferList.advance(8); - var lengthPair = [ - this.frameHeader.readUInt32BE(2), - this.frameHeader.readUInt32BE(2+4) - ]; - - if (lengthPair[0] !== 0) { - this.protocolError = true; - this.dropReason = 'Unsupported 64-bit length frame received'; - return true; - } - this.length = lengthPair[1]; - this.parseState = WAITING_FOR_MASK_KEY; - } - } - - if (this.parseState === WAITING_FOR_MASK_KEY) { - if (this.mask) { - if (bufferList.length >= 4) { - bufferList.joinInto(this.maskBytes, 0, 0, 4); - bufferList.advance(4); - this.parseState = WAITING_FOR_PAYLOAD; - } - } - else { - this.parseState = WAITING_FOR_PAYLOAD; - } - } - - if (this.parseState === WAITING_FOR_PAYLOAD) { - if (this.length > this.maxReceivedFrameSize) { - this.frameTooLarge = true; - this.dropReason = 'Frame size of ' + this.length.toString(10) + - ' bytes exceeds maximum accepted frame size'; - return true; - } - - if (this.length === 0) { - this.binaryPayload = bufferAllocUnsafe(0); - this.parseState = COMPLETE; - return true; - } - if (bufferList.length >= this.length) { - this.binaryPayload = bufferList.take(this.length); - bufferList.advance(this.length); - if (this.mask) { - bufferUtil.unmask(this.binaryPayload, this.maskBytes); - // xor(this.binaryPayload, this.maskBytes, 0); - } - - if (this.opcode === 0x08) { // WebSocketOpcode.CONNECTION_CLOSE - if (this.length === 1) { - // Invalid length for a close frame. Must be zero or at least two. - this.binaryPayload = bufferAllocUnsafe(0); - this.invalidCloseFrameLength = true; - } - if (this.length >= 2) { - this.closeStatus = this.binaryPayload.readUInt16BE(0); - this.binaryPayload = this.binaryPayload.slice(2); - } - } - - this.parseState = COMPLETE; - return true; - } - } - return false; -}; - -WebSocketFrame.prototype.throwAwayPayload = function(bufferList) { - if (bufferList.length >= this.length) { - bufferList.advance(this.length); - this.parseState = COMPLETE; - return true; - } - return false; -}; - -WebSocketFrame.prototype.toBuffer = function(nullMask) { - var maskKey; - var headerLength = 2; - var data; - var outputPos; - var firstByte = 0x00; - var secondByte = 0x00; - - if (this.fin) { - firstByte |= 0x80; - } - if (this.rsv1) { - firstByte |= 0x40; - } - if (this.rsv2) { - firstByte |= 0x20; - } - if (this.rsv3) { - firstByte |= 0x10; - } - if (this.mask) { - secondByte |= 0x80; - } - - firstByte |= (this.opcode & 0x0F); - - // the close frame is a special case because the close reason is - // prepended to the payload data. - if (this.opcode === 0x08) { - this.length = 2; - if (this.binaryPayload) { - this.length += this.binaryPayload.length; - } - data = bufferAllocUnsafe(this.length); - data.writeUInt16BE(this.closeStatus, 0); - if (this.length > 2) { - this.binaryPayload.copy(data, 2); - } - } - else if (this.binaryPayload) { - data = this.binaryPayload; - this.length = data.length; - } - else { - this.length = 0; - } - - if (this.length <= 125) { - // encode the length directly into the two-byte frame header - secondByte |= (this.length & 0x7F); - } - else if (this.length > 125 && this.length <= 0xFFFF) { - // Use 16-bit length - secondByte |= 126; - headerLength += 2; - } - else if (this.length > 0xFFFF) { - // Use 64-bit length - secondByte |= 127; - headerLength += 8; - } - - var output = bufferAllocUnsafe(this.length + headerLength + (this.mask ? 4 : 0)); - - // write the frame header - output[0] = firstByte; - output[1] = secondByte; - - outputPos = 2; - - if (this.length > 125 && this.length <= 0xFFFF) { - // write 16-bit length - output.writeUInt16BE(this.length, outputPos); - outputPos += 2; - } - else if (this.length > 0xFFFF) { - // write 64-bit length - output.writeUInt32BE(0x00000000, outputPos); - output.writeUInt32BE(this.length, outputPos + 4); - outputPos += 8; - } - - if (this.mask) { - maskKey = nullMask ? 0 : ((Math.random() * 0xFFFFFFFF) >>> 0); - this.maskBytes.writeUInt32BE(maskKey, 0); - - // write the mask key - this.maskBytes.copy(output, outputPos); - outputPos += 4; - - if (data) { - bufferUtil.mask(data, this.maskBytes, output, outputPos, this.length); - } - } - else if (data) { - data.copy(output, outputPos); - } - - return output; -}; - -WebSocketFrame.prototype.toString = function() { - return 'Opcode: ' + this.opcode + ', fin: ' + this.fin + ', length: ' + this.length + ', hasPayload: ' + Boolean(this.binaryPayload) + ', masked: ' + this.mask; -}; - - -module.exports = WebSocketFrame; diff --git a/system/websocket_test/node_modules/websocket/lib/WebSocketRequest.js b/system/websocket_test/node_modules/websocket/lib/WebSocketRequest.js deleted file mode 100644 index de63cbd..0000000 --- a/system/websocket_test/node_modules/websocket/lib/WebSocketRequest.js +++ /dev/null @@ -1,532 +0,0 @@ -/************************************************************************ - * Copyright 2010-2015 Brian McKelvey. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var crypto = require('crypto'); -var util = require('util'); -var url = require('url'); -var EventEmitter = require('events').EventEmitter; -var WebSocketConnection = require('./WebSocketConnection'); - -var headerValueSplitRegExp = /,\s*/; -var headerParamSplitRegExp = /;\s*/; -var headerSanitizeRegExp = /[\r\n]/g; -var xForwardedForSeparatorRegExp = /,\s*/; -var separators = [ - '(', ')', '<', '>', '@', - ',', ';', ':', '\\', '\"', - '/', '[', ']', '?', '=', - '{', '}', ' ', String.fromCharCode(9) -]; -var controlChars = [String.fromCharCode(127) /* DEL */]; -for (var i=0; i < 31; i ++) { - /* US-ASCII Control Characters */ - controlChars.push(String.fromCharCode(i)); -} - -var cookieNameValidateRegEx = /([\x00-\x20\x22\x28\x29\x2c\x2f\x3a-\x3f\x40\x5b-\x5e\x7b\x7d\x7f])/; -var cookieValueValidateRegEx = /[^\x21\x23-\x2b\x2d-\x3a\x3c-\x5b\x5d-\x7e]/; -var cookieValueDQuoteValidateRegEx = /^"[^"]*"$/; -var controlCharsAndSemicolonRegEx = /[\x00-\x20\x3b]/g; - -var cookieSeparatorRegEx = /[;,] */; - -var httpStatusDescriptions = { - 100: 'Continue', - 101: 'Switching Protocols', - 200: 'OK', - 201: 'Created', - 203: 'Non-Authoritative Information', - 204: 'No Content', - 205: 'Reset Content', - 206: 'Partial Content', - 300: 'Multiple Choices', - 301: 'Moved Permanently', - 302: 'Found', - 303: 'See Other', - 304: 'Not Modified', - 305: 'Use Proxy', - 307: 'Temporary Redirect', - 400: 'Bad Request', - 401: 'Unauthorized', - 402: 'Payment Required', - 403: 'Forbidden', - 404: 'Not Found', - 406: 'Not Acceptable', - 407: 'Proxy Authorization Required', - 408: 'Request Timeout', - 409: 'Conflict', - 410: 'Gone', - 411: 'Length Required', - 412: 'Precondition Failed', - 413: 'Request Entity Too Long', - 414: 'Request-URI Too Long', - 415: 'Unsupported Media Type', - 416: 'Requested Range Not Satisfiable', - 417: 'Expectation Failed', - 426: 'Upgrade Required', - 500: 'Internal Server Error', - 501: 'Not Implemented', - 502: 'Bad Gateway', - 503: 'Service Unavailable', - 504: 'Gateway Timeout', - 505: 'HTTP Version Not Supported' -}; - -function WebSocketRequest(socket, httpRequest, serverConfig) { - // Superclass Constructor - EventEmitter.call(this); - - this.socket = socket; - this.httpRequest = httpRequest; - this.resource = httpRequest.url; - this.remoteAddress = socket.remoteAddress; - this.remoteAddresses = [this.remoteAddress]; - this.serverConfig = serverConfig; - - // Watch for the underlying TCP socket closing before we call accept - this._socketIsClosing = false; - this._socketCloseHandler = this._handleSocketCloseBeforeAccept.bind(this); - this.socket.on('end', this._socketCloseHandler); - this.socket.on('close', this._socketCloseHandler); - - this._resolved = false; -} - -util.inherits(WebSocketRequest, EventEmitter); - -WebSocketRequest.prototype.readHandshake = function() { - var self = this; - var request = this.httpRequest; - - // Decode URL - this.resourceURL = url.parse(this.resource, true); - - this.host = request.headers['host']; - if (!this.host) { - throw new Error('Client must provide a Host header.'); - } - - this.key = request.headers['sec-websocket-key']; - if (!this.key) { - throw new Error('Client must provide a value for Sec-WebSocket-Key.'); - } - - this.webSocketVersion = parseInt(request.headers['sec-websocket-version'], 10); - - if (!this.webSocketVersion || isNaN(this.webSocketVersion)) { - throw new Error('Client must provide a value for Sec-WebSocket-Version.'); - } - - switch (this.webSocketVersion) { - case 8: - case 13: - break; - default: - var e = new Error('Unsupported websocket client version: ' + this.webSocketVersion + - 'Only versions 8 and 13 are supported.'); - e.httpCode = 426; - e.headers = { - 'Sec-WebSocket-Version': '13' - }; - throw e; - } - - if (this.webSocketVersion === 13) { - this.origin = request.headers['origin']; - } - else if (this.webSocketVersion === 8) { - this.origin = request.headers['sec-websocket-origin']; - } - - // Protocol is optional. - var protocolString = request.headers['sec-websocket-protocol']; - this.protocolFullCaseMap = {}; - this.requestedProtocols = []; - if (protocolString) { - var requestedProtocolsFullCase = protocolString.split(headerValueSplitRegExp); - requestedProtocolsFullCase.forEach(function(protocol) { - var lcProtocol = protocol.toLocaleLowerCase(); - self.requestedProtocols.push(lcProtocol); - self.protocolFullCaseMap[lcProtocol] = protocol; - }); - } - - if (!this.serverConfig.ignoreXForwardedFor && - request.headers['x-forwarded-for']) { - var immediatePeerIP = this.remoteAddress; - this.remoteAddresses = request.headers['x-forwarded-for'] - .split(xForwardedForSeparatorRegExp); - this.remoteAddresses.push(immediatePeerIP); - this.remoteAddress = this.remoteAddresses[0]; - } - - // Extensions are optional. - if (this.serverConfig.parseExtensions) { - var extensionsString = request.headers['sec-websocket-extensions']; - this.requestedExtensions = this.parseExtensions(extensionsString); - } else { - this.requestedExtensions = []; - } - - // Cookies are optional - if (this.serverConfig.parseCookies) { - var cookieString = request.headers['cookie']; - this.cookies = this.parseCookies(cookieString); - } else { - this.cookies = []; - } -}; - -WebSocketRequest.prototype.parseExtensions = function(extensionsString) { - if (!extensionsString || extensionsString.length === 0) { - return []; - } - var extensions = extensionsString.toLocaleLowerCase().split(headerValueSplitRegExp); - extensions.forEach(function(extension, index, array) { - var params = extension.split(headerParamSplitRegExp); - var extensionName = params[0]; - var extensionParams = params.slice(1); - extensionParams.forEach(function(rawParam, index, array) { - var arr = rawParam.split('='); - var obj = { - name: arr[0], - value: arr[1] - }; - array.splice(index, 1, obj); - }); - var obj = { - name: extensionName, - params: extensionParams - }; - array.splice(index, 1, obj); - }); - return extensions; -}; - -// This function adapted from node-cookie -// https://github.com/shtylman/node-cookie -WebSocketRequest.prototype.parseCookies = function(str) { - // Sanity Check - if (!str || typeof(str) !== 'string') { - return []; - } - - var cookies = []; - var pairs = str.split(cookieSeparatorRegEx); - - pairs.forEach(function(pair) { - var eq_idx = pair.indexOf('='); - if (eq_idx === -1) { - cookies.push({ - name: pair, - value: null - }); - return; - } - - var key = pair.substr(0, eq_idx).trim(); - var val = pair.substr(++eq_idx, pair.length).trim(); - - // quoted values - if ('"' === val[0]) { - val = val.slice(1, -1); - } - - cookies.push({ - name: key, - value: decodeURIComponent(val) - }); - }); - - return cookies; -}; - -WebSocketRequest.prototype.accept = function(acceptedProtocol, allowedOrigin, cookies) { - this._verifyResolution(); - - // TODO: Handle extensions - - var protocolFullCase; - - if (acceptedProtocol) { - protocolFullCase = this.protocolFullCaseMap[acceptedProtocol.toLocaleLowerCase()]; - if (typeof(protocolFullCase) === 'undefined') { - protocolFullCase = acceptedProtocol; - } - } - else { - protocolFullCase = acceptedProtocol; - } - this.protocolFullCaseMap = null; - - // Create key validation hash - var sha1 = crypto.createHash('sha1'); - sha1.update(this.key + '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'); - var acceptKey = sha1.digest('base64'); - - var response = 'HTTP/1.1 101 Switching Protocols\r\n' + - 'Upgrade: websocket\r\n' + - 'Connection: Upgrade\r\n' + - 'Sec-WebSocket-Accept: ' + acceptKey + '\r\n'; - - if (protocolFullCase) { - // validate protocol - for (var i=0; i < protocolFullCase.length; i++) { - var charCode = protocolFullCase.charCodeAt(i); - var character = protocolFullCase.charAt(i); - if (charCode < 0x21 || charCode > 0x7E || separators.indexOf(character) !== -1) { - this.reject(500); - throw new Error('Illegal character "' + String.fromCharCode(character) + '" in subprotocol.'); - } - } - if (this.requestedProtocols.indexOf(acceptedProtocol) === -1) { - this.reject(500); - throw new Error('Specified protocol was not requested by the client.'); - } - - protocolFullCase = protocolFullCase.replace(headerSanitizeRegExp, ''); - response += 'Sec-WebSocket-Protocol: ' + protocolFullCase + '\r\n'; - } - this.requestedProtocols = null; - - if (allowedOrigin) { - allowedOrigin = allowedOrigin.replace(headerSanitizeRegExp, ''); - if (this.webSocketVersion === 13) { - response += 'Origin: ' + allowedOrigin + '\r\n'; - } - else if (this.webSocketVersion === 8) { - response += 'Sec-WebSocket-Origin: ' + allowedOrigin + '\r\n'; - } - } - - if (cookies) { - if (!Array.isArray(cookies)) { - this.reject(500); - throw new Error('Value supplied for "cookies" argument must be an array.'); - } - var seenCookies = {}; - cookies.forEach(function(cookie) { - if (!cookie.name || !cookie.value) { - this.reject(500); - throw new Error('Each cookie to set must at least provide a "name" and "value"'); - } - - // Make sure there are no \r\n sequences inserted - cookie.name = cookie.name.replace(controlCharsAndSemicolonRegEx, ''); - cookie.value = cookie.value.replace(controlCharsAndSemicolonRegEx, ''); - - if (seenCookies[cookie.name]) { - this.reject(500); - throw new Error('You may not specify the same cookie name twice.'); - } - seenCookies[cookie.name] = true; - - // token (RFC 2616, Section 2.2) - var invalidChar = cookie.name.match(cookieNameValidateRegEx); - if (invalidChar) { - this.reject(500); - throw new Error('Illegal character ' + invalidChar[0] + ' in cookie name'); - } - - // RFC 6265, Section 4.1.1 - // *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) | %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - if (cookie.value.match(cookieValueDQuoteValidateRegEx)) { - invalidChar = cookie.value.slice(1, -1).match(cookieValueValidateRegEx); - } else { - invalidChar = cookie.value.match(cookieValueValidateRegEx); - } - if (invalidChar) { - this.reject(500); - throw new Error('Illegal character ' + invalidChar[0] + ' in cookie value'); - } - - var cookieParts = [cookie.name + '=' + cookie.value]; - - // RFC 6265, Section 4.1.1 - // 'Path=' path-value | - if(cookie.path){ - invalidChar = cookie.path.match(controlCharsAndSemicolonRegEx); - if (invalidChar) { - this.reject(500); - throw new Error('Illegal character ' + invalidChar[0] + ' in cookie path'); - } - cookieParts.push('Path=' + cookie.path); - } - - // RFC 6265, Section 4.1.2.3 - // 'Domain=' subdomain - if (cookie.domain) { - if (typeof(cookie.domain) !== 'string') { - this.reject(500); - throw new Error('Domain must be specified and must be a string.'); - } - invalidChar = cookie.domain.match(controlCharsAndSemicolonRegEx); - if (invalidChar) { - this.reject(500); - throw new Error('Illegal character ' + invalidChar[0] + ' in cookie domain'); - } - cookieParts.push('Domain=' + cookie.domain.toLowerCase()); - } - - // RFC 6265, Section 4.1.1 - //'Expires=' sane-cookie-date | Force Date object requirement by using only epoch - if (cookie.expires) { - if (!(cookie.expires instanceof Date)){ - this.reject(500); - throw new Error('Value supplied for cookie "expires" must be a vaild date object'); - } - cookieParts.push('Expires=' + cookie.expires.toGMTString()); - } - - // RFC 6265, Section 4.1.1 - //'Max-Age=' non-zero-digit *DIGIT - if (cookie.maxage) { - var maxage = cookie.maxage; - if (typeof(maxage) === 'string') { - maxage = parseInt(maxage, 10); - } - if (isNaN(maxage) || maxage <= 0 ) { - this.reject(500); - throw new Error('Value supplied for cookie "maxage" must be a non-zero number'); - } - maxage = Math.round(maxage); - cookieParts.push('Max-Age=' + maxage.toString(10)); - } - - // RFC 6265, Section 4.1.1 - //'Secure;' - if (cookie.secure) { - if (typeof(cookie.secure) !== 'boolean') { - this.reject(500); - throw new Error('Value supplied for cookie "secure" must be of type boolean'); - } - cookieParts.push('Secure'); - } - - // RFC 6265, Section 4.1.1 - //'HttpOnly;' - if (cookie.httponly) { - if (typeof(cookie.httponly) !== 'boolean') { - this.reject(500); - throw new Error('Value supplied for cookie "httponly" must be of type boolean'); - } - cookieParts.push('HttpOnly'); - } - - response += ('Set-Cookie: ' + cookieParts.join(';') + '\r\n'); - }.bind(this)); - } - - // TODO: handle negotiated extensions - // if (negotiatedExtensions) { - // response += 'Sec-WebSocket-Extensions: ' + negotiatedExtensions.join(', ') + '\r\n'; - // } - - // Mark the request resolved now so that the user can't call accept or - // reject a second time. - this._resolved = true; - this.emit('requestResolved', this); - - response += '\r\n'; - - var connection = new WebSocketConnection(this.socket, [], acceptedProtocol, false, this.serverConfig); - connection.webSocketVersion = this.webSocketVersion; - connection.remoteAddress = this.remoteAddress; - connection.remoteAddresses = this.remoteAddresses; - - var self = this; - - if (this._socketIsClosing) { - // Handle case when the client hangs up before we get a chance to - // accept the connection and send our side of the opening handshake. - cleanupFailedConnection(connection); - } - else { - this.socket.write(response, 'ascii', function(error) { - if (error) { - cleanupFailedConnection(connection); - return; - } - - self._removeSocketCloseListeners(); - connection._addSocketEventListeners(); - }); - } - - this.emit('requestAccepted', connection); - return connection; -}; - -WebSocketRequest.prototype.reject = function(status, reason, extraHeaders) { - this._verifyResolution(); - - // Mark the request resolved now so that the user can't call accept or - // reject a second time. - this._resolved = true; - this.emit('requestResolved', this); - - if (typeof(status) !== 'number') { - status = 403; - } - var response = 'HTTP/1.1 ' + status + ' ' + httpStatusDescriptions[status] + '\r\n' + - 'Connection: close\r\n'; - if (reason) { - reason = reason.replace(headerSanitizeRegExp, ''); - response += 'X-WebSocket-Reject-Reason: ' + reason + '\r\n'; - } - - if (extraHeaders) { - for (var key in extraHeaders) { - var sanitizedValue = extraHeaders[key].toString().replace(headerSanitizeRegExp, ''); - var sanitizedKey = key.replace(headerSanitizeRegExp, ''); - response += (sanitizedKey + ': ' + sanitizedValue + '\r\n'); - } - } - - response += '\r\n'; - this.socket.end(response, 'ascii'); - - this.emit('requestRejected', this); -}; - -WebSocketRequest.prototype._handleSocketCloseBeforeAccept = function() { - this._socketIsClosing = true; - this._removeSocketCloseListeners(); -}; - -WebSocketRequest.prototype._removeSocketCloseListeners = function() { - this.socket.removeListener('end', this._socketCloseHandler); - this.socket.removeListener('close', this._socketCloseHandler); -}; - -WebSocketRequest.prototype._verifyResolution = function() { - if (this._resolved) { - throw new Error('WebSocketRequest may only be accepted or rejected one time.'); - } -}; - -function cleanupFailedConnection(connection) { - // Since we have to return a connection object even if the socket is - // already dead in order not to break the API, we schedule a 'close' - // event on the connection object to occur immediately. - process.nextTick(function() { - // WebSocketConnection.CLOSE_REASON_ABNORMAL = 1006 - // Third param: Skip sending the close frame to a dead socket - connection.drop(1006, 'TCP connection lost before handshake completed.', true); - }); -} - -module.exports = WebSocketRequest; diff --git a/system/websocket_test/node_modules/websocket/lib/WebSocketRouter.js b/system/websocket_test/node_modules/websocket/lib/WebSocketRouter.js deleted file mode 100644 index 35bced9..0000000 --- a/system/websocket_test/node_modules/websocket/lib/WebSocketRouter.js +++ /dev/null @@ -1,157 +0,0 @@ -/************************************************************************ - * Copyright 2010-2015 Brian McKelvey. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var extend = require('./utils').extend; -var util = require('util'); -var EventEmitter = require('events').EventEmitter; -var WebSocketRouterRequest = require('./WebSocketRouterRequest'); - -function WebSocketRouter(config) { - // Superclass Constructor - EventEmitter.call(this); - - this.config = { - // The WebSocketServer instance to attach to. - server: null - }; - if (config) { - extend(this.config, config); - } - this.handlers = []; - - this._requestHandler = this.handleRequest.bind(this); - if (this.config.server) { - this.attachServer(this.config.server); - } -} - -util.inherits(WebSocketRouter, EventEmitter); - -WebSocketRouter.prototype.attachServer = function(server) { - if (server) { - this.server = server; - this.server.on('request', this._requestHandler); - } - else { - throw new Error('You must specify a WebSocketServer instance to attach to.'); - } -}; - -WebSocketRouter.prototype.detachServer = function() { - if (this.server) { - this.server.removeListener('request', this._requestHandler); - this.server = null; - } - else { - throw new Error('Cannot detach from server: not attached.'); - } -}; - -WebSocketRouter.prototype.mount = function(path, protocol, callback) { - if (!path) { - throw new Error('You must specify a path for this handler.'); - } - if (!protocol) { - protocol = '____no_protocol____'; - } - if (!callback) { - throw new Error('You must specify a callback for this handler.'); - } - - path = this.pathToRegExp(path); - if (!(path instanceof RegExp)) { - throw new Error('Path must be specified as either a string or a RegExp.'); - } - var pathString = path.toString(); - - // normalize protocol to lower-case - protocol = protocol.toLocaleLowerCase(); - - if (this.findHandlerIndex(pathString, protocol) !== -1) { - throw new Error('You may only mount one handler per path/protocol combination.'); - } - - this.handlers.push({ - 'path': path, - 'pathString': pathString, - 'protocol': protocol, - 'callback': callback - }); -}; -WebSocketRouter.prototype.unmount = function(path, protocol) { - var index = this.findHandlerIndex(this.pathToRegExp(path).toString(), protocol); - if (index !== -1) { - this.handlers.splice(index, 1); - } - else { - throw new Error('Unable to find a route matching the specified path and protocol.'); - } -}; - -WebSocketRouter.prototype.findHandlerIndex = function(pathString, protocol) { - protocol = protocol.toLocaleLowerCase(); - for (var i=0, len=this.handlers.length; i < len; i++) { - var handler = this.handlers[i]; - if (handler.pathString === pathString && handler.protocol === protocol) { - return i; - } - } - return -1; -}; - -WebSocketRouter.prototype.pathToRegExp = function(path) { - if (typeof(path) === 'string') { - if (path === '*') { - path = /^.*$/; - } - else { - path = path.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); - path = new RegExp('^' + path + '$'); - } - } - return path; -}; - -WebSocketRouter.prototype.handleRequest = function(request) { - var requestedProtocols = request.requestedProtocols; - if (requestedProtocols.length === 0) { - requestedProtocols = ['____no_protocol____']; - } - - // Find a handler with the first requested protocol first - for (var i=0; i < requestedProtocols.length; i++) { - var requestedProtocol = requestedProtocols[i].toLocaleLowerCase(); - - // find the first handler that can process this request - for (var j=0, len=this.handlers.length; j < len; j++) { - var handler = this.handlers[j]; - if (handler.path.test(request.resourceURL.pathname)) { - if (requestedProtocol === handler.protocol || - handler.protocol === '*') - { - var routerRequest = new WebSocketRouterRequest(request, requestedProtocol); - handler.callback(routerRequest); - return; - } - } - } - } - - // If we get here we were unable to find a suitable handler. - request.reject(404, 'No handler is available for the given request.'); -}; - -module.exports = WebSocketRouter; diff --git a/system/websocket_test/node_modules/websocket/lib/WebSocketRouterRequest.js b/system/websocket_test/node_modules/websocket/lib/WebSocketRouterRequest.js deleted file mode 100644 index d3e3745..0000000 --- a/system/websocket_test/node_modules/websocket/lib/WebSocketRouterRequest.js +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************ - * Copyright 2010-2015 Brian McKelvey. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var util = require('util'); -var EventEmitter = require('events').EventEmitter; - -function WebSocketRouterRequest(webSocketRequest, resolvedProtocol) { - // Superclass Constructor - EventEmitter.call(this); - - this.webSocketRequest = webSocketRequest; - if (resolvedProtocol === '____no_protocol____') { - this.protocol = null; - } - else { - this.protocol = resolvedProtocol; - } - this.origin = webSocketRequest.origin; - this.resource = webSocketRequest.resource; - this.resourceURL = webSocketRequest.resourceURL; - this.httpRequest = webSocketRequest.httpRequest; - this.remoteAddress = webSocketRequest.remoteAddress; - this.webSocketVersion = webSocketRequest.webSocketVersion; - this.requestedExtensions = webSocketRequest.requestedExtensions; - this.cookies = webSocketRequest.cookies; -} - -util.inherits(WebSocketRouterRequest, EventEmitter); - -WebSocketRouterRequest.prototype.accept = function(origin, cookies) { - var connection = this.webSocketRequest.accept(this.protocol, origin, cookies); - this.emit('requestAccepted', connection); - return connection; -}; - -WebSocketRouterRequest.prototype.reject = function(status, reason, extraHeaders) { - this.webSocketRequest.reject(status, reason, extraHeaders); - this.emit('requestRejected', this); -}; - -module.exports = WebSocketRouterRequest; diff --git a/system/websocket_test/node_modules/websocket/lib/WebSocketServer.js b/system/websocket_test/node_modules/websocket/lib/WebSocketServer.js deleted file mode 100644 index 2b25d46..0000000 --- a/system/websocket_test/node_modules/websocket/lib/WebSocketServer.js +++ /dev/null @@ -1,256 +0,0 @@ -/************************************************************************ - * Copyright 2010-2015 Brian McKelvey. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***********************************************************************/ - -var extend = require('./utils').extend; -var utils = require('./utils'); -var util = require('util'); -var debug = require('debug')('websocket:server'); -var EventEmitter = require('events').EventEmitter; -var WebSocketRequest = require('./WebSocketRequest'); - -var WebSocketServer = function WebSocketServer(config) { - // Superclass Constructor - EventEmitter.call(this); - - this._handlers = { - upgrade: this.handleUpgrade.bind(this), - requestAccepted: this.handleRequestAccepted.bind(this), - requestResolved: this.handleRequestResolved.bind(this) - }; - this.connections = []; - this.pendingRequests = []; - if (config) { - this.mount(config); - } -}; - -util.inherits(WebSocketServer, EventEmitter); - -WebSocketServer.prototype.mount = function(config) { - this.config = { - // The http server instance to attach to. Required. - httpServer: null, - - // 64KiB max frame size. - maxReceivedFrameSize: 0x10000, - - // 1MiB max message size, only applicable if - // assembleFragments is true - maxReceivedMessageSize: 0x100000, - - // Outgoing messages larger than fragmentationThreshold will be - // split into multiple fragments. - fragmentOutgoingMessages: true, - - // Outgoing frames are fragmented if they exceed this threshold. - // Default is 16KiB - fragmentationThreshold: 0x4000, - - // If true, the server will automatically send a ping to all - // clients every 'keepaliveInterval' milliseconds. The timer is - // reset on any received data from the client. - keepalive: true, - - // The interval to send keepalive pings to connected clients if the - // connection is idle. Any received data will reset the counter. - keepaliveInterval: 20000, - - // If true, the server will consider any connection that has not - // received any data within the amount of time specified by - // 'keepaliveGracePeriod' after a keepalive ping has been sent to - // be dead, and will drop the connection. - // Ignored if keepalive is false. - dropConnectionOnKeepaliveTimeout: true, - - // The amount of time to wait after sending a keepalive ping before - // closing the connection if the connected peer does not respond. - // Ignored if keepalive is false. - keepaliveGracePeriod: 10000, - - // Whether to use native TCP keep-alive instead of WebSockets ping - // and pong packets. Native TCP keep-alive sends smaller packets - // on the wire and so uses bandwidth more efficiently. This may - // be more important when talking to mobile devices. - // If this value is set to true, then these values will be ignored: - // keepaliveGracePeriod - // dropConnectionOnKeepaliveTimeout - useNativeKeepalive: false, - - // If true, fragmented messages will be automatically assembled - // and the full message will be emitted via a 'message' event. - // If false, each frame will be emitted via a 'frame' event and - // the application will be responsible for aggregating multiple - // fragmented frames. Single-frame messages will emit a 'message' - // event in addition to the 'frame' event. - // Most users will want to leave this set to 'true' - assembleFragments: true, - - // If this is true, websocket connections will be accepted - // regardless of the path and protocol specified by the client. - // The protocol accepted will be the first that was requested - // by the client. Clients from any origin will be accepted. - // This should only be used in the simplest of cases. You should - // probably leave this set to 'false' and inspect the request - // object to make sure it's acceptable before accepting it. - autoAcceptConnections: false, - - // Whether or not the X-Forwarded-For header should be respected. - // It's important to set this to 'true' when accepting connections - // from untrusted clients, as a malicious client could spoof its - // IP address by simply setting this header. It's meant to be added - // by a trusted proxy or other intermediary within your own - // infrastructure. - // See: http://en.wikipedia.org/wiki/X-Forwarded-For - ignoreXForwardedFor: false, - - // If this is true, 'cookie' headers are parsed and exposed as WebSocketRequest.cookies - parseCookies: true, - - // If this is true, 'sec-websocket-extensions' headers are parsed and exposed as WebSocketRequest.requestedExtensions - parseExtensions: true, - - // The Nagle Algorithm makes more efficient use of network resources - // by introducing a small delay before sending small packets so that - // multiple messages can be batched together before going onto the - // wire. This however comes at the cost of latency, so the default - // is to disable it. If you don't need low latency and are streaming - // lots of small messages, you can change this to 'false' - disableNagleAlgorithm: true, - - // The number of milliseconds to wait after sending a close frame - // for an acknowledgement to come back before giving up and just - // closing the socket. - closeTimeout: 5000 - }; - extend(this.config, config); - - if (this.config.httpServer) { - if (!Array.isArray(this.config.httpServer)) { - this.config.httpServer = [this.config.httpServer]; - } - var upgradeHandler = this._handlers.upgrade; - this.config.httpServer.forEach(function(httpServer) { - httpServer.on('upgrade', upgradeHandler); - }); - } - else { - throw new Error('You must specify an httpServer on which to mount the WebSocket server.'); - } -}; - -WebSocketServer.prototype.unmount = function() { - var upgradeHandler = this._handlers.upgrade; - this.config.httpServer.forEach(function(httpServer) { - httpServer.removeListener('upgrade', upgradeHandler); - }); -}; - -WebSocketServer.prototype.closeAllConnections = function() { - this.connections.forEach(function(connection) { - connection.close(); - }); - this.pendingRequests.forEach(function(request) { - process.nextTick(function() { - request.reject(503); // HTTP 503 Service Unavailable - }); - }); -}; - -WebSocketServer.prototype.broadcast = function(data) { - if (Buffer.isBuffer(data)) { - this.broadcastBytes(data); - } - else if (typeof(data.toString) === 'function') { - this.broadcastUTF(data); - } -}; - -WebSocketServer.prototype.broadcastUTF = function(utfData) { - this.connections.forEach(function(connection) { - connection.sendUTF(utfData); - }); -}; - -WebSocketServer.prototype.broadcastBytes = function(binaryData) { - this.connections.forEach(function(connection) { - connection.sendBytes(binaryData); - }); -}; - -WebSocketServer.prototype.shutDown = function() { - this.unmount(); - this.closeAllConnections(); -}; - -WebSocketServer.prototype.handleUpgrade = function(request, socket) { - var self = this; - var wsRequest = new WebSocketRequest(socket, request, this.config); - try { - wsRequest.readHandshake(); - } - catch(e) { - wsRequest.reject( - e.httpCode ? e.httpCode : 400, - e.message, - e.headers - ); - debug('Invalid handshake: %s', e.message); - this.emit('upgradeError', e); - return; - } - - this.pendingRequests.push(wsRequest); - - wsRequest.once('requestAccepted', this._handlers.requestAccepted); - wsRequest.once('requestResolved', this._handlers.requestResolved); - socket.once('close', function () { - self._handlers.requestResolved(wsRequest); - }); - - if (!this.config.autoAcceptConnections && utils.eventEmitterListenerCount(this, 'request') > 0) { - this.emit('request', wsRequest); - } - else if (this.config.autoAcceptConnections) { - wsRequest.accept(wsRequest.requestedProtocols[0], wsRequest.origin); - } - else { - wsRequest.reject(404, 'No handler is configured to accept the connection.'); - } -}; - -WebSocketServer.prototype.handleRequestAccepted = function(connection) { - var self = this; - connection.once('close', function(closeReason, description) { - self.handleConnectionClose(connection, closeReason, description); - }); - this.connections.push(connection); - this.emit('connect', connection); -}; - -WebSocketServer.prototype.handleConnectionClose = function(connection, closeReason, description) { - var index = this.connections.indexOf(connection); - if (index !== -1) { - this.connections.splice(index, 1); - } - this.emit('close', connection, closeReason, description); -}; - -WebSocketServer.prototype.handleRequestResolved = function(request) { - var index = this.pendingRequests.indexOf(request); - if (index !== -1) { this.pendingRequests.splice(index, 1); } -}; - -module.exports = WebSocketServer; diff --git a/system/websocket_test/node_modules/websocket/lib/browser.js b/system/websocket_test/node_modules/websocket/lib/browser.js deleted file mode 100644 index c336fe8..0000000 --- a/system/websocket_test/node_modules/websocket/lib/browser.js +++ /dev/null @@ -1,54 +0,0 @@ -var _globalThis; -if (typeof globalThis === 'object') { - _globalThis = globalThis; -} else { - try { - _globalThis = require('es5-ext/global'); - } catch (error) { - } finally { - if (!_globalThis && typeof window !== 'undefined') { _globalThis = window; } - if (!_globalThis) { throw new Error('Could not determine global this'); } - } -} - -var NativeWebSocket = _globalThis.WebSocket || _globalThis.MozWebSocket; -var websocket_version = require('./version'); - - -/** - * Expose a W3C WebSocket class with just one or two arguments. - */ -function W3CWebSocket(uri, protocols) { - var native_instance; - - if (protocols) { - native_instance = new NativeWebSocket(uri, protocols); - } - else { - native_instance = new NativeWebSocket(uri); - } - - /** - * 'native_instance' is an instance of nativeWebSocket (the browser's WebSocket - * class). Since it is an Object it will be returned as it is when creating an - * instance of W3CWebSocket via 'new W3CWebSocket()'. - * - * ECMAScript 5: http://bclary.com/2004/11/07/#a-13.2.2 - */ - return native_instance; -} -if (NativeWebSocket) { - ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'].forEach(function(prop) { - Object.defineProperty(W3CWebSocket, prop, { - get: function() { return NativeWebSocket[prop]; } - }); - }); -} - -/** - * Module exports. - */ -module.exports = { - 'w3cwebsocket' : NativeWebSocket ? W3CWebSocket : null, - 'version' : websocket_version -}; diff --git a/system/websocket_test/node_modules/websocket/lib/utils.js b/system/websocket_test/node_modules/websocket/lib/utils.js deleted file mode 100644 index 02f1c39..0000000 --- a/system/websocket_test/node_modules/websocket/lib/utils.js +++ /dev/null @@ -1,66 +0,0 @@ -var noop = exports.noop = function(){}; - -exports.extend = function extend(dest, source) { - for (var prop in source) { - dest[prop] = source[prop]; - } -}; - -exports.eventEmitterListenerCount = - require('events').EventEmitter.listenerCount || - function(emitter, type) { return emitter.listeners(type).length; }; - -exports.bufferAllocUnsafe = Buffer.allocUnsafe ? - Buffer.allocUnsafe : - function oldBufferAllocUnsafe(size) { return new Buffer(size); }; - -exports.bufferFromString = Buffer.from ? - Buffer.from : - function oldBufferFromString(string, encoding) { - return new Buffer(string, encoding); - }; - -exports.BufferingLogger = function createBufferingLogger(identifier, uniqueID) { - var logFunction = require('debug')(identifier); - if (logFunction.enabled) { - var logger = new BufferingLogger(identifier, uniqueID, logFunction); - var debug = logger.log.bind(logger); - debug.printOutput = logger.printOutput.bind(logger); - debug.enabled = logFunction.enabled; - return debug; - } - logFunction.printOutput = noop; - return logFunction; -}; - -function BufferingLogger(identifier, uniqueID, logFunction) { - this.logFunction = logFunction; - this.identifier = identifier; - this.uniqueID = uniqueID; - this.buffer = []; -} - -BufferingLogger.prototype.log = function() { - this.buffer.push([ new Date(), Array.prototype.slice.call(arguments) ]); - return this; -}; - -BufferingLogger.prototype.clear = function() { - this.buffer = []; - return this; -}; - -BufferingLogger.prototype.printOutput = function(logFunction) { - if (!logFunction) { logFunction = this.logFunction; } - var uniqueID = this.uniqueID; - this.buffer.forEach(function(entry) { - var date = entry[0].toLocaleString(); - var args = entry[1].slice(); - var formatString = args[0]; - if (formatString !== (void 0) && formatString !== null) { - formatString = '%s - %s - ' + formatString.toString(); - args.splice(0, 1, formatString, date, uniqueID); - logFunction.apply(global, args); - } - }); -}; diff --git a/system/websocket_test/node_modules/websocket/lib/version.js b/system/websocket_test/node_modules/websocket/lib/version.js deleted file mode 100644 index 81f6e78..0000000 --- a/system/websocket_test/node_modules/websocket/lib/version.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../package.json').version; diff --git a/system/websocket_test/node_modules/websocket/lib/websocket.js b/system/websocket_test/node_modules/websocket/lib/websocket.js deleted file mode 100644 index 6242d56..0000000 --- a/system/websocket_test/node_modules/websocket/lib/websocket.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - 'server' : require('./WebSocketServer'), - 'client' : require('./WebSocketClient'), - 'router' : require('./WebSocketRouter'), - 'frame' : require('./WebSocketFrame'), - 'request' : require('./WebSocketRequest'), - 'connection' : require('./WebSocketConnection'), - 'w3cwebsocket' : require('./W3CWebSocket'), - 'deprecation' : require('./Deprecation'), - 'version' : require('./version') -}; diff --git a/system/websocket_test/node_modules/websocket/package.json b/system/websocket_test/node_modules/websocket/package.json deleted file mode 100644 index 6c2d7ae..0000000 --- a/system/websocket_test/node_modules/websocket/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "websocket", - "description": "Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.", - "keywords": [ - "websocket", - "websockets", - "socket", - "networking", - "comet", - "push", - "RFC-6455", - "realtime", - "server", - "client" - ], - "author": "Brian McKelvey (https://github.com/theturtle32)", - "contributors": [ - "Iñaki Baz Castillo (http://dev.sipdoc.net)" - ], - "version": "1.0.34", - "repository": { - "type": "git", - "url": "https://github.com/theturtle32/WebSocket-Node.git" - }, - "homepage": "https://github.com/theturtle32/WebSocket-Node", - "engines": { - "node": ">=4.0.0" - }, - "dependencies": { - "bufferutil": "^4.0.1", - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "typedarray-to-buffer": "^3.1.5", - "utf-8-validate": "^5.0.2", - "yaeti": "^0.0.6" - }, - "devDependencies": { - "buffer-equal": "^1.0.0", - "gulp": "^4.0.2", - "gulp-jshint": "^2.0.4", - "jshint-stylish": "^2.2.1", - "jshint": "^2.0.0", - "tape": "^4.9.1" - }, - "config": { - "verbose": false - }, - "scripts": { - "test": "tape test/unit/*.js", - "gulp": "gulp" - }, - "main": "index", - "directories": { - "lib": "./lib" - }, - "browser": "lib/browser.js", - "license": "Apache-2.0" -} diff --git a/system/websocket_test/node_modules/websocket/vendor/FastBufferList.js b/system/websocket_test/node_modules/websocket/vendor/FastBufferList.js deleted file mode 100644 index c2d965e..0000000 --- a/system/websocket_test/node_modules/websocket/vendor/FastBufferList.js +++ /dev/null @@ -1,191 +0,0 @@ -// This file was copied from https://github.com/substack/node-bufferlist -// and modified to be able to copy bytes from the bufferlist directly into -// a pre-existing fixed-size buffer without an additional memory allocation. - -// bufferlist.js -// Treat a linked list of buffers as a single variable-size buffer. -var Buffer = require('buffer').Buffer; -var EventEmitter = require('events').EventEmitter; -var bufferAllocUnsafe = require('../lib/utils').bufferAllocUnsafe; - -module.exports = BufferList; -module.exports.BufferList = BufferList; // backwards compatibility - -function BufferList(opts) { - if (!(this instanceof BufferList)) return new BufferList(opts); - EventEmitter.call(this); - var self = this; - - if (typeof(opts) == 'undefined') opts = {}; - - // default encoding to use for take(). Leaving as 'undefined' - // makes take() return a Buffer instead. - self.encoding = opts.encoding; - - var head = { next : null, buffer : null }; - var last = { next : null, buffer : null }; - - // length can get negative when advanced past the end - // and this is the desired behavior - var length = 0; - self.__defineGetter__('length', function () { - return length; - }); - - // keep an offset of the head to decide when to head = head.next - var offset = 0; - - // Write to the bufferlist. Emits 'write'. Always returns true. - self.write = function (buf) { - if (!head.buffer) { - head.buffer = buf; - last = head; - } - else { - last.next = { next : null, buffer : buf }; - last = last.next; - } - length += buf.length; - self.emit('write', buf); - return true; - }; - - self.end = function (buf) { - if (Buffer.isBuffer(buf)) self.write(buf); - }; - - // Push buffers to the end of the linked list. (deprecated) - // Return this (self). - self.push = function () { - var args = [].concat.apply([], arguments); - args.forEach(self.write); - return self; - }; - - // For each buffer, perform some action. - // If fn's result is a true value, cut out early. - // Returns this (self). - self.forEach = function (fn) { - if (!head.buffer) return bufferAllocUnsafe(0); - - if (head.buffer.length - offset <= 0) return self; - var firstBuf = head.buffer.slice(offset); - - var b = { buffer : firstBuf, next : head.next }; - - while (b && b.buffer) { - var r = fn(b.buffer); - if (r) break; - b = b.next; - } - - return self; - }; - - // Create a single Buffer out of all the chunks or some subset specified by - // start and one-past the end (like slice) in bytes. - self.join = function (start, end) { - if (!head.buffer) return bufferAllocUnsafe(0); - if (start == undefined) start = 0; - if (end == undefined) end = self.length; - - var big = bufferAllocUnsafe(end - start); - var ix = 0; - self.forEach(function (buffer) { - if (start < (ix + buffer.length) && ix < end) { - // at least partially contained in the range - buffer.copy( - big, - Math.max(0, ix - start), - Math.max(0, start - ix), - Math.min(buffer.length, end - ix) - ); - } - ix += buffer.length; - if (ix > end) return true; // stop processing past end - }); - - return big; - }; - - self.joinInto = function (targetBuffer, targetStart, sourceStart, sourceEnd) { - if (!head.buffer) return new bufferAllocUnsafe(0); - if (sourceStart == undefined) sourceStart = 0; - if (sourceEnd == undefined) sourceEnd = self.length; - - var big = targetBuffer; - if (big.length - targetStart < sourceEnd - sourceStart) { - throw new Error("Insufficient space available in target Buffer."); - } - var ix = 0; - self.forEach(function (buffer) { - if (sourceStart < (ix + buffer.length) && ix < sourceEnd) { - // at least partially contained in the range - buffer.copy( - big, - Math.max(targetStart, targetStart + ix - sourceStart), - Math.max(0, sourceStart - ix), - Math.min(buffer.length, sourceEnd - ix) - ); - } - ix += buffer.length; - if (ix > sourceEnd) return true; // stop processing past end - }); - - return big; - }; - - // Advance the buffer stream by n bytes. - // If n the aggregate advance offset passes the end of the buffer list, - // operations such as .take() will return empty strings until enough data is - // pushed. - // Returns this (self). - self.advance = function (n) { - offset += n; - length -= n; - while (head.buffer && offset >= head.buffer.length) { - offset -= head.buffer.length; - head = head.next - ? head.next - : { buffer : null, next : null } - ; - } - if (head.buffer === null) last = { next : null, buffer : null }; - self.emit('advance', n); - return self; - }; - - // Take n bytes from the start of the buffers. - // Returns a string. - // If there are less than n bytes in all the buffers or n is undefined, - // returns the entire concatenated buffer string. - self.take = function (n, encoding) { - if (n == undefined) n = self.length; - else if (typeof n !== 'number') { - encoding = n; - n = self.length; - } - var b = head; - if (!encoding) encoding = self.encoding; - if (encoding) { - var acc = ''; - self.forEach(function (buffer) { - if (n <= 0) return true; - acc += buffer.toString( - encoding, 0, Math.min(n,buffer.length) - ); - n -= buffer.length; - }); - return acc; - } else { - // If no 'encoding' is specified, then return a Buffer. - return self.join(0, n); - } - }; - - // The entire concatenated buffer as a string. - self.toString = function () { - return self.take('binary'); - }; -} -require('util').inherits(BufferList, EventEmitter); diff --git a/system/websocket_test/node_modules/yaeti/.jscsrc b/system/websocket_test/node_modules/yaeti/.jscsrc deleted file mode 100644 index a37d119..0000000 --- a/system/websocket_test/node_modules/yaeti/.jscsrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "preset": "crockford", - "validateIndentation": "\t", - "disallowKeywords": ["with"], - "disallowDanglingUnderscores": null -} diff --git a/system/websocket_test/node_modules/yaeti/.jshintrc b/system/websocket_test/node_modules/yaeti/.jshintrc deleted file mode 100644 index 1cca0fa..0000000 --- a/system/websocket_test/node_modules/yaeti/.jshintrc +++ /dev/null @@ -1,27 +0,0 @@ -{ - "bitwise": false, - "curly": true, - "eqeqeq": true, - "forin": true, - "freeze": true, - "latedef": "function", - "noarg": true, - "nonbsp": true, - "nonew": true, - "plusplus": false, - "undef": true, - "unused": true, - "strict": false, - "maxparams": 6, - "maxdepth": 4, - "maxstatements": false, - "maxlen": 200, - "browser": true, - "browserify": true, - "devel": true, - "jquery": false, - "mocha": true, - "node": false, - "shelljs": false, - "worker": false -} diff --git a/system/websocket_test/node_modules/yaeti/.npmignore b/system/websocket_test/node_modules/yaeti/.npmignore deleted file mode 100644 index 2ccbe46..0000000 --- a/system/websocket_test/node_modules/yaeti/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules/ diff --git a/system/websocket_test/node_modules/yaeti/LICENSE b/system/websocket_test/node_modules/yaeti/LICENSE deleted file mode 100644 index a64a412..0000000 --- a/system/websocket_test/node_modules/yaeti/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Iñaki Baz Castillo, - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/system/websocket_test/node_modules/yaeti/README.md b/system/websocket_test/node_modules/yaeti/README.md deleted file mode 100644 index db253a4..0000000 --- a/system/websocket_test/node_modules/yaeti/README.md +++ /dev/null @@ -1,98 +0,0 @@ -# yaeti - -Yet Another [EventTarget](https://developer.mozilla.org/es/docs/Web/API/EventTarget) Implementation. - -The library exposes both the [EventTarget](https://developer.mozilla.org/es/docs/Web/API/EventTarget) interface and the [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event) interface. - - -## Installation - -```bash -$ npm install yaeti --save -``` - - -## Usage - -```javascript -var yaeti = require('yaeti'); - - -// Custom class we want to make an EventTarget. -function Foo() { - // Make Foo an EventTarget. - yaeti.EventTarget.call(this); -} - -// Create an instance. -var foo = new Foo(); - -function listener1() { - console.log('listener1'); -} - -function listener2() { - console.log('listener2'); -} - -foo.addEventListener('bar', listener1); -foo.addEventListener('bar', listener2); -foo.removeEventListener('bar', listener1); - -var event = new yaeti.Event('bar'); - -foo.dispatchEvent(event); - - -// Output: -// => "listener2" -``` - - - -## API - - -#### `yaeti.EventTarget` interface - -Implementation of the [EventTarget](https://developer.mozilla.org/es/docs/Web/API/EventTarget) interface. - -* Make a custom class inherit from `EventTarget`: -```javascript -function Foo() { - yaeti.EventTarget.call(this); -} -``` - -* Make an existing object an `EventTarget`: -```javascript -yaeti.EventTarget.call(obj); -``` - -The interface implements the `addEventListener`, `removeEventListener` and `dispatchEvent` methods as defined by the W3C. - - -##### `listeners` read-only property - -Returns an object whose keys are configured event types (String) and whose values are an array of listeners (functions) for those event types. - - -#### `yaeti.Event` interface - -Implementation of the [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event) interface. - -*NOTE:* Just useful in Node (the browser already exposes the native `Event` interface). - -```javascript -var event = new yaeti.Event('bar'); -``` - - -## Author - -[Iñaki Baz Castillo](https://github.com/ibc) - - -## License - -[MIT](./LICENSE) diff --git a/system/websocket_test/node_modules/yaeti/gulpfile.js b/system/websocket_test/node_modules/yaeti/gulpfile.js deleted file mode 100644 index 294cd9c..0000000 --- a/system/websocket_test/node_modules/yaeti/gulpfile.js +++ /dev/null @@ -1,23 +0,0 @@ -var - /** - * Dependencies. - */ - gulp = require('gulp'), - jscs = require('gulp-jscs'), - jshint = require('gulp-jshint'), - stylish = require('gulp-jscs-stylish'); - - -gulp.task('lint', function () { - var src = ['gulpfile.js', 'index.js', 'lib/**/*.js']; - - return gulp.src(src) - .pipe(jshint('.jshintrc')) // Enforce good practics. - .pipe(jscs('.jscsrc')) // Enforce style guide. - .pipe(stylish.combineWithHintResults()) - .pipe(jshint.reporter('jshint-stylish', {verbose: true})) - .pipe(jshint.reporter('fail')); -}); - - -gulp.task('default', gulp.task('lint')); diff --git a/system/websocket_test/node_modules/yaeti/index.js b/system/websocket_test/node_modules/yaeti/index.js deleted file mode 100644 index b1e6db4..0000000 --- a/system/websocket_test/node_modules/yaeti/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - EventTarget : require('./lib/EventTarget'), - Event : require('./lib/Event') -}; diff --git a/system/websocket_test/node_modules/yaeti/lib/Event.browser.js b/system/websocket_test/node_modules/yaeti/lib/Event.browser.js deleted file mode 100644 index 0cd5ea6..0000000 --- a/system/websocket_test/node_modules/yaeti/lib/Event.browser.js +++ /dev/null @@ -1,5 +0,0 @@ -/** - * In browsers export the native Event interface. - */ - -module.exports = global.Event; diff --git a/system/websocket_test/node_modules/yaeti/lib/Event.js b/system/websocket_test/node_modules/yaeti/lib/Event.js deleted file mode 100644 index cd245a2..0000000 --- a/system/websocket_test/node_modules/yaeti/lib/Event.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Expose the Event class. - */ -module.exports = _Event; - - -function _Event(type) { - this.type = type; - this.isTrusted = false; - - // Set a flag indicating this is not a DOM Event object - this._yaeti = true; -} diff --git a/system/websocket_test/node_modules/yaeti/lib/EventTarget.js b/system/websocket_test/node_modules/yaeti/lib/EventTarget.js deleted file mode 100644 index 403c75b..0000000 --- a/system/websocket_test/node_modules/yaeti/lib/EventTarget.js +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Expose the _EventTarget class. - */ -module.exports = _EventTarget; - -function _EventTarget() { - // Do nothing if called for a native EventTarget object.. - if (typeof this.addEventListener === 'function') { - return; - } - - this._listeners = {}; - - this.addEventListener = _addEventListener; - this.removeEventListener = _removeEventListener; - this.dispatchEvent = _dispatchEvent; -} - -Object.defineProperties(_EventTarget.prototype, { - listeners: { - get: function () { - return this._listeners; - } - } -}); - -function _addEventListener(type, newListener) { - var - listenersType, - i, listener; - - if (!type || !newListener) { - return; - } - - listenersType = this._listeners[type]; - if (listenersType === undefined) { - this._listeners[type] = listenersType = []; - } - - for (i = 0; !!(listener = listenersType[i]); i++) { - if (listener === newListener) { - return; - } - } - - listenersType.push(newListener); -} - -function _removeEventListener(type, oldListener) { - var - listenersType, - i, listener; - - if (!type || !oldListener) { - return; - } - - listenersType = this._listeners[type]; - if (listenersType === undefined) { - return; - } - - for (i = 0; !!(listener = listenersType[i]); i++) { - if (listener === oldListener) { - listenersType.splice(i, 1); - break; - } - } - - if (listenersType.length === 0) { - delete this._listeners[type]; - } -} - -function _dispatchEvent(event) { - var - type, - listenersType, - dummyListener, - stopImmediatePropagation = false, - i, listener; - - if (!event || typeof event.type !== 'string') { - throw new Error('`event` must have a valid `type` property'); - } - - // Do some stuff to emulate DOM Event behavior (just if this is not a - // DOM Event object) - if (event._yaeti) { - event.target = this; - event.cancelable = true; - } - - // Attempt to override the stopImmediatePropagation() method - try { - event.stopImmediatePropagation = function () { - stopImmediatePropagation = true; - }; - } catch (error) {} - - type = event.type; - listenersType = (this._listeners[type] || []); - - dummyListener = this['on' + type]; - if (typeof dummyListener === 'function') { - dummyListener.call(this, event); - } - - for (i = 0; !!(listener = listenersType[i]); i++) { - if (stopImmediatePropagation) { - break; - } - - listener.call(this, event); - } - - return !event.defaultPrevented; -} diff --git a/system/websocket_test/node_modules/yaeti/package.json b/system/websocket_test/node_modules/yaeti/package.json deleted file mode 100644 index d8b505c..0000000 --- a/system/websocket_test/node_modules/yaeti/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "yaeti", - "version": "0.0.6", - "description": "Yet Another EventTarget Implementation", - "author": "Iñaki Baz Castillo ", - "license": "MIT", - "main": "index.js", - "browser": { - "./lib/Event.js": "./lib/Event.browser.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/ibc/yaeti.git" - }, - "devDependencies": { - "gulp": "git+https://github.com/gulpjs/gulp.git#4.0", - "gulp-jscs": "^1.6.0", - "gulp-jscs-stylish": "^1.1.0", - "gulp-jshint": "^1.11.2", - "jshint-stylish": "~1.0.2" - }, - "engines": { - "node": ">=0.10.32" - } -} diff --git a/system/websocket_test/package-lock.json b/system/websocket_test/package-lock.json deleted file mode 100644 index da96df3..0000000 --- a/system/websocket_test/package-lock.json +++ /dev/null @@ -1,334 +0,0 @@ -{ - "name": "websocket_test", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "websocket_test", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "websocket": "^1.0.34" - } - }, - "node_modules/bufferutil": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", - "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", - "hasInstallScript": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, - "node_modules/d": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", - "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", - "dependencies": { - "es5-ext": "^0.10.64", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/es5-ext": { - "version": "0.10.64", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", - "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", - "hasInstallScript": true, - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "esniff": "^2.0.1", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/es6-symbol": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", - "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", - "dependencies": { - "d": "^1.0.2", - "ext": "^1.7.0" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/esniff": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", - "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.62", - "event-emitter": "^0.3.5", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "dependencies": { - "type": "^2.7.2" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - }, - "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" - }, - "node_modules/node-gyp-build": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", - "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", - "hasInstallScript": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, - "node_modules/websocket": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", - "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", - "dependencies": { - "bufferutil": "^4.0.1", - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "typedarray-to-buffer": "^3.1.5", - "utf-8-validate": "^5.0.2", - "yaeti": "^0.0.6" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", - "engines": { - "node": ">=0.10.32" - } - } - }, - "dependencies": { - "bufferutil": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", - "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", - "requires": { - "node-gyp-build": "^4.3.0" - } - }, - "d": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", - "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", - "requires": { - "es5-ext": "^0.10.64", - "type": "^2.7.2" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "es5-ext": { - "version": "0.10.64", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", - "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", - "requires": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "esniff": "^2.0.1", - "next-tick": "^1.1.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-symbol": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", - "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", - "requires": { - "d": "^1.0.2", - "ext": "^1.7.0" - } - }, - "esniff": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", - "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", - "requires": { - "d": "^1.0.1", - "es5-ext": "^0.10.62", - "event-emitter": "^0.3.5", - "type": "^2.7.2" - } - }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "requires": { - "type": "^2.7.2" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" - }, - "node-gyp-build": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", - "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==" - }, - "type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" - }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", - "requires": { - "node-gyp-build": "^4.3.0" - } - }, - "websocket": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", - "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", - "requires": { - "bufferutil": "^4.0.1", - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "typedarray-to-buffer": "^3.1.5", - "utf-8-validate": "^5.0.2", - "yaeti": "^0.0.6" - } - }, - "yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==" - } - } -} diff --git a/system/websocket_test/package.json b/system/websocket_test/package.json deleted file mode 100644 index f10dadf..0000000 --- a/system/websocket_test/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "websocket_test", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "websocket": "^1.0.34" - } -}