ipfs-inactive / js-ipfs-unixfs-importer

[ARCHIVED] JavaScript implementation of the UnixFs importer used by IPFS
MIT License
5 stars 4 forks source link

feat: allow overriding of internal functions #48

Closed achingbrain closed 4 years ago

achingbrain commented 4 years ago

The interesting bits of this module are the various ways of building DAGs for files and folders (flat, sharded, etc).

Sometimes we want to utilise bits of this logic to build DAGs without having to reimplement big chunks of this module.

This PR allows the user to pass in functions to replace key parts of this import pipeline.

Enables:

achingbrain commented 4 years ago

@mikeal I think this should allow you to accomplish #45 and #46 - see the tests here largely 'inspired' by the tests added to those PRs.

It does it in a way that lets me do ipfs/js-ipfs-mfs#73 using the same mechanism.

mikeal commented 4 years ago

I pulled down the branch and wrote what I need against it and can say for certain that it works and does what I need. +1

achingbrain commented 4 years ago

Released as v0.44.0