Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

feat: add util.cid options #18

Merged
merged 3 commits into from
Jun 25, 2018
Merged

feat: add util.cid options #18

merged 3 commits into from
Jun 25, 2018

Conversation

richardschneider
Copy link
Contributor

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) {
Copy link
Member

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.

@coveralls
Copy link

coveralls commented Jun 24, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 081daf5 on cid-options into 6e28d3e on master.

Copy link
Member

@vmx vmx left a 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.

Copy link
Member

@vmx vmx left a 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.

@richardschneider richardschneider merged commit eab262f into master Jun 25, 2018
@richardschneider richardschneider removed the status/in-progress In progress label Jun 25, 2018
@richardschneider richardschneider deleted the cid-options branch June 25, 2018 07:45
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.

3 participants