ipfs-unixfs-exporter
Advanced tools
Comparing version
@@ -0,1 +1,11 @@ | ||
<a name="0.35.1"></a> | ||
## [0.35.1](https://github.com/ipfs/js-ipfs-unixfs-exporter/compare/v0.35.0...v0.35.1) (2018-11-29) | ||
### Performance Improvements | ||
* do not descend into subtrees ([cca3531](https://github.com/ipfs/js-ipfs-unixfs-exporter/commit/cca3531)) | ||
<a name="0.35.0"></a> | ||
@@ -2,0 +12,0 @@ # [0.35.0](https://github.com/ipfs/js-ipfs-unixfs-exporter/compare/v0.34.0...v0.35.0) (2018-11-23) |
{ | ||
"name": "ipfs-unixfs-exporter", | ||
"version": "0.35.0", | ||
"version": "0.35.1", | ||
"description": "JavaScript implementation of the UnixFs exporter used by IPFS", | ||
@@ -5,0 +5,0 @@ "leadMaintainer": "Alex Potsides <alex.potsides@protocol.ai>", |
@@ -21,5 +21,11 @@ 'use strict' | ||
// we are at the max depth so no need to descend into children | ||
if (options.maxDepth && options.maxDepth <= depth) { | ||
return pull.values([dir]) | ||
} | ||
const streams = [ | ||
pull( | ||
pull.values(node.links), | ||
pull.filter((item) => accepts === undefined || item.name === accepts), | ||
pull.map((link) => ({ | ||
@@ -35,3 +41,2 @@ depth: depth + 1, | ||
})), | ||
pull.filter((item) => accepts === undefined || item.linkName === accepts), | ||
resolve | ||
@@ -38,0 +43,0 @@ ) |
@@ -22,2 +22,7 @@ 'use strict' | ||
// we are at the max depth so no need to descend into children | ||
if (options.maxDepth && options.maxDepth <= depth) { | ||
return pull.values([dir]) | ||
} | ||
const streams = [ | ||
@@ -35,2 +40,3 @@ pull( | ||
} | ||
if (accept) { | ||
@@ -54,2 +60,3 @@ return { | ||
// place dir before if not specifying subtree | ||
if (!pathRest.length || options.fullPath) { | ||
@@ -56,0 +63,0 @@ streams.unshift(pull.values([dir])) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9958
0.18%0
-100%970913
-4.29%18
-10%