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

Commit

Permalink
Expose Buffer from ipfs.types
Browse files Browse the repository at this point in the history
  • Loading branch information
haadcode committed Jan 23, 2017
1 parent efcb392 commit aac4dec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"async": "^2.1.4",
"bl": "^1.2.0",
"boom": "^4.2.0",
"buffer": "^5.0.2",
"debug": "^2.6.0",
"fs-pull-blob-store": "^0.3.0",
"glob": "^7.1.1",
Expand Down
7 changes: 7 additions & 0 deletions src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const files = require('./components/files')
const bitswap = require('./components/bitswap')
const pubsub = require('./components/pubsub')

const Buffer = require('buffer/').Buffer

exports = module.exports = IPFS

function IPFS (repoInstance) {
Expand Down Expand Up @@ -70,4 +72,9 @@ function IPFS (repoInstance) {
this.bitswap = bitswap(this)
this.ping = ping(this)
this.pubsub = pubsub(this)

// Exposed data types
this.types = {
Buffer: Buffer
}
}

0 comments on commit aac4dec

Please sign in to comment.