Update README.md

This commit is contained in:
ZyLacx 2021-12-27 17:15:48 +01:00
parent 2fd16eaac4
commit bfe68af4e1

13
node_modules/ws/README.md generated vendored
View file

@ -1,9 +1,8 @@
# ws: a Node.js WebSocket library # ws: a Node.js WebSocket library
[![Version npm](https://img.shields.io/npm/v/ws.svg?logo=npm)](https://www.npmjs.com/package/ws) [![Version npm](https://img.shields.io/npm/v/ws.svg?logo=npm)](https://www.npmjs.com/package/ws)
[![Build](https://img.shields.io/travis/websockets/ws/master.svg?logo=travis)](https://travis-ci.com/websockets/ws) [![CI](https://img.shields.io/github/workflow/status/websockets/ws/CI/master?label=CI&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster)
[![Windows x86 Build](https://img.shields.io/appveyor/ci/lpinca/ws/master.svg?logo=appveyor)](https://ci.appveyor.com/project/lpinca/ws) [![Coverage Status](https://img.shields.io/coveralls/websockets/ws/master.svg?logo=coveralls)](https://coveralls.io/github/websockets/ws)
[![Coverage Status](https://img.shields.io/coveralls/websockets/ws/master.svg)](https://coveralls.io/github/websockets/ws)
ws is a simple to use, blazing fast, and thoroughly tested WebSocket client and ws is a simple to use, blazing fast, and thoroughly tested WebSocket client and
server implementation. server implementation.
@ -23,7 +22,7 @@ can use one of the many wrappers available on npm, like
- [Protocol support](#protocol-support) - [Protocol support](#protocol-support)
- [Installing](#installing) - [Installing](#installing)
- [Opt-in for performance and spec compliance](#opt-in-for-performance-and-spec-compliance) - [Opt-in for performance](#opt-in-for-performance)
- [API docs](#api-docs) - [API docs](#api-docs)
- [WebSocket compression](#websocket-compression) - [WebSocket compression](#websocket-compression)
- [Usage examples](#usage-examples) - [Usage examples](#usage-examples)
@ -56,7 +55,7 @@ can use one of the many wrappers available on npm, like
npm install ws npm install ws
``` ```
### Opt-in for performance and spec compliance ### Opt-in for performance
There are 2 optional modules that can be installed along side with the ws There are 2 optional modules that can be installed along side with the ws
module. These modules are binary addons which improve certain operations. module. These modules are binary addons which improve certain operations.
@ -67,7 +66,7 @@ necessarily need to have a C++ compiler installed on your machine.
operations such as masking and unmasking the data payload of the WebSocket operations such as masking and unmasking the data payload of the WebSocket
frames. frames.
- `npm install --save-optional utf-8-validate`: Allows to efficiently check if a - `npm install --save-optional utf-8-validate`: Allows to efficiently check if a
message contains valid UTF-8 as required by the spec. message contains valid UTF-8.
## API docs ## API docs
@ -395,7 +394,7 @@ the `X-Forwarded-For` header.
```js ```js
wss.on('connection', function connection(ws, req) { wss.on('connection', function connection(ws, req) {
const ip = req.headers['x-forwarded-for'].split(/\s*,\s*/)[0]; const ip = req.headers['x-forwarded-for'].split(',')[0].trim();
}); });
``` ```