Skip to content

Commit

Permalink
[doc] Fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Dec 20, 2023
1 parent d37756a commit 3e230c1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ npm install ws

### Opt-in for performance

`bufferutil` is an optional module that can be installed alongside the `ws`
[bufferutil][] is an optional module that can be installed alongside the ws
module:

```
Expand All @@ -69,24 +69,24 @@ 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
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:
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` to not use `utf-8-validate`, use the
To force ws to not use utf-8-validate, use the
[`WS_NO_UTF_8_VALIDATE`](./doc/ws.md#ws_no_utf_8_validate) environment variable.

## API docs
Expand Down Expand Up @@ -533,6 +533,7 @@ We're using the GitHub [releases][changelog] for changelog entries.
[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
Expand All @@ -543,4 +544,5 @@ We're using the GitHub [releases][changelog] for changelog entries.
[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

0 comments on commit 3e230c1

Please sign in to comment.