Skip to content

Commit fd32504

Browse files
committed
add static helper for making core cores
1 parent bd366d9 commit fd32504

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ class Hypercore extends EventEmitter {
141141
return stream.noiseStream.userData
142142
}
143143

144+
static createCore (storage, opts) {
145+
return new Core(Hypercore.defaultStorage(storage), opts)
146+
}
147+
144148
static createProtocolStream (isInitiator, opts = {}) {
145149
let outerStream = Protomux.isProtomux(isInitiator)
146150
? isInitiator.stream

0 commit comments

Comments
 (0)