Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Awesome API Documentation #23

Merged
merged 3 commits into from
Dec 14, 2016
Merged

Awesome API Documentation #23

merged 3 commits into from
Dec 14, 2016

Conversation

dignifiedquire
Copy link
Member

@dignifiedquire dignifiedquire commented Dec 7, 2016

@dignifiedquire dignifiedquire added the status/in-progress In progress label Dec 7, 2016
@dignifiedquire dignifiedquire changed the title [WIP] Awesome API Documentation Awesome API Documentation Dec 12, 2016
@victorb
Copy link
Member

victorb commented Dec 12, 2016

Variable-names that are just one character is not very descriptive and should be improved.

* Decode a hash from the given multihash.
*
* @param {Buffer} buf
* @returns {Object} result
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably use the simple syntax as described in multiformats/js-multiaddr#31 (comment)

* @param {string|number} code
* @param {number} [length]
* @returns {Buffer}
*/
exports.encode = function encode (digest, code, length) {
if (!digest || !code) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess you can't use code 0 here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants