Fix docstrings

This commit is contained in:
Kagami Hiiragi 2015-01-07 05:24:30 +03:00
parent 85798fa619
commit 8c2f180037
1 changed files with 5 additions and 2 deletions

View File

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