-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
src/util.js
Outdated
* @param {CidCallback} callback - Callback that handles the return value | ||
* @returns {void} | ||
*/ | ||
const cid = (dagNode, callback) => { | ||
const cid = (dagNode, options, callback) => { | ||
if (options instanceof Function) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Searching through the existing IPFS/IPLD code base it seems that the preferred way for checking if something is a function is: if (typeof options !== 'function') {
. My guess is that it is related to code minifiers. Please change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you merge, please do a "squash merge" and use the commit message of the first commit. That gives a clean Git history.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you merge, please do a "squash merge" and use the commit message of the first commit. That gives a clean Git history.
See ipld/interface-ipld-format#40