Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

KhafraDev
Copy link
Member

No description provided.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Clever trick!

@KhafraDev KhafraDev merged commit 0016bdd into nodejs:main Jul 7, 2025
29 checks passed
@KhafraDev KhafraDev deleted the ping-util branch July 7, 2025 20:35
* @param {WebSocket} ws
* @param {Buffer|undefined} buffer
*/
static ping (ws, buffer) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation and type definitions suggest that undefined is accepted, but the actual implementation doesn't allow it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears Buffer.isBuffer(buffer) doesn't strictly adhere to the documentation, as it filters out anything that isn't a Buffer.

@github-actions github-actions bot mentioned this pull request Jul 18, 2025
@JoshMock JoshMock mentioned this pull request Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants