This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
refactor: export types and utilities statically #951
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allows users to access these additional types and utilities without having to create an instance of the client first.
resolves #902
refs ipfs/js-ipfs#1908
BREAKING CHANGE:
ipfs.util.isIPFS
has moved to a static export and should be accessed viaconst { isIPFS } = require('ipfs-http-client')
.The modules available under
ipfs.types.*
have also become static exports.ipfs.util.crypto
has been removed as it is not a dependency ofipfs-http-client
so reduces the bundle size. If you need to use libp2p crypto primitives then please see the js-libp2p-crypto project for info on how to use it in your project.Finally
ipfs.util.getEndpointConfig
is now a direct instance method,ipfs.getEndpointConfig