-
Notifications
You must be signed in to change notification settings - Fork 299
files.get #271
Conversation
|
||
module.exports = (send) => { | ||
return function get (path, archive, compress, compressionLevel, cb) { | ||
if (archive === true && typeof compress === '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.
Maybe use a switch statement instead?
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.
Or since archive
, compress
, compressionLevel
are all optional, why not pass them on the opts
object?
I think that you can just return the argCommand
and it will take care of that :)
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.
Agreed, please make archive
, compress
and compressionLevel
into an options object.
awesome @nginnever, great start! :D Also, you should include tests for 'get directories' |
.on('data', (data) => { | ||
buf += data | ||
}) | ||
.on('end', () => { |
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.
Let's use bl
for these tests
@nginnever what is the status of this PR? |
@diasdavid still needs a lot of work. Now that the add and cat command are starting to be finalized in all of the modules this can be restarted. Still needs unixfs-engine compression, js-ipfs update, and interface-core spec. There are some tests began here that could start to be moved to interface-core tests. |
The compression doesn't happen at the unixs-engine level right? It is just at the wire level that everything gets tar'ed |
Hey @nginnever! I gave this the last little bit of spit 'n shine it needed: #296 If that looks good, I think we can safely close this PR. |
Followed in #296 |
@xicombd
I added the compression args to what you had worked on earlier. Not sure if this is the most elegant way to handle these things so let me know what you think! :D