-
Notifications
You must be signed in to change notification settings - Fork 300
chore: converts remaining files api to async iterators #1124
Conversation
2c784f1
to
7e9a0ee
Compare
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.
Left some tidbits.
const promisify = require('promisify-es6') | ||
const configure = require('../lib/configure') | ||
const tarStreamToObjects = require('../utils/tar-stream-to-objects') | ||
const IsIpfs = require('is-ipfs') |
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.
const IsIpfs = require('is-ipfs') | |
const isIpfs = require('is-ipfs') |
Reserve Capital for Constructors
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.
Maybe it's my Java showing but this looks natural to me 🤣
Isn't this the sort of thing we have a linter for?
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.
wanna add that rule?
|
||
try { | ||
path = cleanCID(path) | ||
} catch (err) { | ||
if (!v.ipfsPath(path)) { | ||
return callback(err) | ||
if (!IsIpfs.ipfsPath(path)) { |
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.
if (!IsIpfs.ipfsPath(path)) { | |
if (!isIpfs.ipfsPath(path)) { |
@@ -1,64 +1,72 @@ | |||
'use strict' | |||
|
|||
const promisify = require('promisify-es6') | |||
const IsIpfs = require('is-ipfs') |
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.
const IsIpfs = require('is-ipfs') | |
const isIpfs = require('is-ipfs') |
} catch (err) { | ||
if (!IsIpfs.ipfsPath(args)) { | ||
return callback(err) | ||
if (!IsIpfs.ipfsPath(path)) { |
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.
if (!IsIpfs.ipfsPath(path)) { | |
if (!isIpfs.ipfsPath(path)) { |
const cleanCID = require('../utils/clean-cid') | ||
const IsIpfs = require('is-ipfs') |
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.
const IsIpfs = require('is-ipfs') | |
const isIpfs = require('is-ipfs') |
I'm going to merge this to unblock ipfs/js-ipfs#2517 - have opened ipfs/aegir#449 to discuss the capitalisation thing further. The lines of code in question were pre-existing in the codebase, so let's not widen the scope of this PR. Happy to open another for general improvements if we decide it's a good idea. |
No description provided.