This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 300
RFC: expose types and utils in static context #902
Labels
Comments
lidel
changed the title
Expose types and utils in static context
RFC: expose types and utils in static context
Dec 4, 2018
I am already +1 for this (ipfs/js-ipfs#1297 (comment)) |
alanshaw
pushed a commit
that referenced
this issue
Mar 5, 2019
Allows users to access these additional types and utilities without having to create an instance of the c lient first. BREAKING CHANGE: `ipfs.util.isIPFS` has moved to a static export and should be accessed via `const { 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 of `ipfs-http-client` so reduces the bundle size. If you need to use libp2p crypto primitives then please see the [js-libp2p-crypto](https://github.com/libp2p/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` resolves #902 License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
ghost
assigned alanshaw
Mar 5, 2019
alanshaw
pushed a commit
that referenced
this issue
Mar 6, 2019
Allows users to access these additional types and utilities without having to create an instance of the c lient first. BREAKING CHANGE: `ipfs.util.isIPFS` has moved to a static export and should be accessed via `const { 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 of `ipfs-http-client` so reduces the bundle size. If you need to use libp2p crypto primitives then please see the [js-libp2p-crypto](https://github.com/libp2p/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` resolves #902 License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
alanshaw
pushed a commit
that referenced
this issue
Mar 6, 2019
Allows users to access these additional types and utilities without having to create an instance of the client first. resolves #902 BREAKING CHANGE: `ipfs.util.isIPFS` has moved to a static export and should be accessed via `const { 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 of `ipfs-http-client` so reduces the bundle size. If you need to use libp2p crypto primitives then please see the [js-libp2p-crypto](https://github.com/libp2p/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` License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
ghost
removed
the
in progress
label
Mar 6, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I remember having similar thoughts at least once (had to make fake instance just to access utils).
Perhaps we could at least support it in the static context by exposing data types and util functions on
IPFS
(the static constructor) as well.Thoughts?
The text was updated successfully, but these errors were encountered: