This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Description
Expected behavior
When I use the web3.js documentation for version 1.2.5.
If I try this example for isListening, I expect it to tell me to call web3.eth.net.isListening().then(console.log); instead of web3.eth.isListening().then(console.log); (i.e. .net is missing).
Also, I expect this example for getPeerCount() to tell me to call web3.eth.net.getPeerCount().then(console.log); instead of web3.eth.getPeerCount().then(console.log); (i.e. also missing .net)
Actual behavior
The above examples are missing .net in the call, so when a user copies the example they get an error like TypeError: web3.eth.isListening is not a function, since it should be web3.eth.net isListening instead
Steps to reproduce the behavior
View the docs at https://web3js.readthedocs.io/en/v1.2.5/web3-net.html, and try and implement an example.
Logs
Versions
Web3.js 1.2.5
Node 12.7.0
macOS