From 8c2f1800374926554db3ff36799940de671a940d Mon Sep 17 00:00:00 2001 From: Kagami Hiiragi Date: Wed, 7 Jan 2015 05:24:30 +0300 Subject: [PATCH] Fix docstrings --- lib/structs.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/structs.js b/lib/structs.js index 0eda1fb..966aee9 100644 --- a/lib/structs.js +++ b/lib/structs.js @@ -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: // (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