Fix formatting issue with examples

This commit is contained in:
Braydon Fuller 2014-12-18 11:41:09 -05:00
parent 815499f020
commit 91309b151e
3 changed files with 6 additions and 0 deletions

View File

@ -16,12 +16,14 @@ var MAX_RECEIVE_BUFFER = 10000000;
* with it using the standar messages of the bitcoin p2p protocol. * with it using the standar messages of the bitcoin p2p protocol.
* *
* @example * @example
* ```javascript
* *
* var peer = new Peer('127.0.0.1').setProxy('127.0.0.1', 9050); * var peer = new Peer('127.0.0.1').setProxy('127.0.0.1', 9050);
* peer.on('tx', function(tx) { * peer.on('tx', function(tx) {
* console.log('New transaction: ', tx.id); * console.log('New transaction: ', tx.id);
* }); * });
* peer.connect(); * peer.connect();
* ```
* *
* @param {String} host - IP address of the remote host * @param {String} host - IP address of the remote host
* @param {Number} [port] - Port number of the remote host * @param {Number} [port] - Port number of the remote host

View File

@ -18,12 +18,14 @@ function now() {
* ongoing peer connections. Peer events are relayed to the pool. * ongoing peer connections. Peer events are relayed to the pool.
* *
* @example * @example
* ```javascript
* *
* var pool = new Pool(Networks.livenet); * var pool = new Pool(Networks.livenet);
* pool.on('peerinv', function(peer, message) { * pool.on('peerinv', function(peer, message) {
* // do something with the inventory announcement * // do something with the inventory announcement
* }); * });
* pool.connect(); * pool.connect();
* ```
* *
* @param {Network|String} network - The network to connect * @param {Network|String} network - The network to connect
* @returns {Pool} * @returns {Pool}

View File

@ -8,11 +8,13 @@ var https = require('https');
* server and enables simple and batch RPC calls. * server and enables simple and batch RPC calls.
* *
* @example * @example
* ```javascript
* *
* var client = new RPC('user', 'pass'); * var client = new RPC('user', 'pass');
* client.getInfo(function(err, info) { * client.getInfo(function(err, info) {
* // do something with the info * // do something with the info
* }); * });
* ```
* *
* @param {String} user - username used to connect bitcoind * @param {String} user - username used to connect bitcoind
* @param {String} password - password used to connect bitcoind * @param {String} password - password used to connect bitcoind