Fix docstrings

This commit is contained in:
Kagami Hiiragi 2015-01-07 05:24:30 +03:00
parent 85798fa619
commit 8c2f180037

View File

@ -345,10 +345,10 @@ exports.net_addr = {
/** /**
* Decode `net_addr`. * Decode `net_addr`.
* @param {Buffer} buf - A buffer that contains encoded `net_addr` * @param {Buffer} buf - A buffer that contains encoded `net_addr`
* @param {?Object} opts - Decode options; use `short` option to * @param {?{short: boolean}} opts - Decode options
* decode `net_addr` used in version message
* @return {Object} Decoded `net_addr` structure. * @return {Object} Decoded `net_addr` structure.
*/ */
// TODO(Kagami): Document options and structure.
decode: function(buf, opts) { decode: function(buf, opts) {
var short = !!(opts || {}).short; var short = !!(opts || {}).short;
var res = {}; var res = {};
@ -379,6 +379,7 @@ exports.net_addr = {
* `net_addr` used in version message * `net_addr` used in version message
* @return {Buffer} Encoded `net_addr`. * @return {Buffer} Encoded `net_addr`.
*/ */
// TODO(Kagami): Document options.
encode: function(opts) { encode: function(opts) {
// Be aware of `Buffer.slice` quirk in browserify: // Be aware of `Buffer.slice` quirk in browserify:
// <http://git.io/lNZF1A> (does not modify parent buffer's memory in // <http://git.io/lNZF1A> (does not modify parent buffer's memory in
@ -465,6 +466,7 @@ var bitfield = function(size) {
* @namespace * @namespace
* @static * @static
*/ */
// TODO(Kagami): Document methods.
var serviceFeatures = exports.serviceFeatures = objectAssign(bitfield(64), { var serviceFeatures = exports.serviceFeatures = objectAssign(bitfield(64), {
/** This is a normal network node. */ /** This is a normal network node. */
NODE_NETWORK: 0, NODE_NETWORK: 0,
@ -476,6 +478,7 @@ var serviceFeatures = exports.serviceFeatures = objectAssign(bitfield(64), {
* @see {@link https://bitmessage.org/wiki/Protocol_specification#Pubkey_bitfield_features} * @see {@link https://bitmessage.org/wiki/Protocol_specification#Pubkey_bitfield_features}
* @namespace * @namespace
*/ */
// TODO(Kagami): Document methods.
exports.pubkeyFeatures = objectAssign(bitfield(32), { exports.pubkeyFeatures = objectAssign(bitfield(32), {
/** /**
* Receiving node expects that the RIPE hash encoded in their address * Receiving node expects that the RIPE hash encoded in their address