Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit aac4dec

Browse files
committed
Expose Buffer from ipfs.types
1 parent efcb392 commit aac4dec

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
"async": "^2.1.4",
8787
"bl": "^1.2.0",
8888
"boom": "^4.2.0",
89+
"buffer": "^5.0.2",
8990
"debug": "^2.6.0",
9091
"fs-pull-blob-store": "^0.3.0",
9192
"glob": "^7.1.1",

src/core/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const files = require('./components/files')
2525
const bitswap = require('./components/bitswap')
2626
const pubsub = require('./components/pubsub')
2727

28+
const Buffer = require('buffer/').Buffer
29+
2830
exports = module.exports = IPFS
2931

3032
function IPFS (repoInstance) {
@@ -70,4 +72,9 @@ function IPFS (repoInstance) {
7072
this.bitswap = bitswap(this)
7173
this.ping = ping(this)
7274
this.pubsub = pubsub(this)
75+
76+
// Exposed data types
77+
this.types = {
78+
Buffer: Buffer
79+
}
7380
}

0 commit comments

Comments
 (0)