corestore 6.0.1-alpha.6 → 6.0.1-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -143,8 +143,8 @@ module.exports = class Corestore extends EventEmitter {
143
143
  return core
144
144
  }
145
145
 
146
- replicate (opts = {}) {
147
- const stream = isStream(opts) ? opts : (opts.stream || Hypercore.createProtocolStream(opts))
146
+ replicate (isInitiator, opts) {
147
+ const stream = Hypercore.createProtocolStream(isInitiator, opts)
148
148
  for (const core of this.cores.values()) {
149
149
  core.replicate(stream)
150
150
  }
@@ -226,8 +226,4 @@ function generateNamespace (first, second) {
226
226
  return out
227
227
  }
228
228
 
229
- function isStream (s) {
230
- return typeof s === 'object' && s && typeof s.pipe === 'function'
231
- }
232
-
233
229
  function noop () {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "corestore",
3
- "version": "6.0.1-alpha.6",
3
+ "version": "6.0.1-alpha.7",
4
4
  "description": "A Hypercore factory that simplifies managing collections of cores.",
5
5
  "main": "index.js",
6
6
  "scripts": {