<commit_before># DHT API

* [dht.findPeer](#dhtfindpeer)
* [dht.findProvs](#dhtfindprovs)
* [dht.get](#dhtget)
* [dht.provide](#dhtprovide)
* [dht.put](#dhtput)
* [dht.query](#dhtquery)

#### `dht.findpeer`

> Retrieve the Peer Info of a reachable node in the network.

##### Go **WIP**

##### JavaScript - `ipfs.dht.findPeer(peerId, [callback])`

Where `peerId` is a IPFS/libp2p Id from [PeerId](https://github.com/libp2p/js-peer-id) type.

`callback` must follow `function (err, peerInfo) {}` signature, where `err` is an error if the operation was not successful. `peerInfo` is an object of type `PeerInfo`.

If no `callback` is passed, a promise is returned.<commit_msg>fix: another typo<commit_after># DHT API

* [dht.findPeer](#dhtfindpeer)
* [dht.findProvs](#dhtfindprovs)
* [dht.get](#dhtget)
* [dht.provide](#dhtprovide)
* [dht.put](#dhtput)
* [dht.query](#dhtquery)

#### `dht.findPeer`

> Retrieve the Peer Info of a reachable node in the network.

##### Go **WIP**

##### JavaScript - `ipfs.dht.findPeer(peerId, [callback])`

Where `peerId` is a IPFS/libp2p Id from [PeerId](https://github.com/libp2p/js-peer-id) type.

`callback` must follow `function (err, peerInfo) {}` signature, where `err` is an error if the operation was not successful. `peerInfo` is an object of type `PeerInfo`.

If no `callback` is passed, a promise is returned.
{'fraction_non_alphanumeric': 0.17381656804733728, 'fraction_numerical': 0.0029585798816568047, 'mean_word_length': 5.013333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3158763', 'n_tokens_mistral': 526, 'n_tokens_neox': 503, 'n_words': 139}