You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -166,7 +148,7 @@ This now has created the following structure, either on disk or as an in memory
166
148
167
149
### Setup
168
150
169
-
#### `new Repo(path[, options])`
151
+
#### `createRepo(path[, options])`
170
152
171
153
Creates an IPFS Repo.
172
154
@@ -184,7 +166,7 @@ Arguments:
184
166
*`datastore` (defaults to [`datastore-level`](https://github.com/ipfs/js-datastore-level#readme)). Defines the back-end type used as the key-value store used for gets and puts of values at `repo.datastore`.
185
167
186
168
```js
187
-
constrepo=newRepo('path/to/repo')
169
+
constrepo=createRepo('path/to/repo')
188
170
```
189
171
190
172
#### `Promise repo.init()`
@@ -367,8 +349,8 @@ Returned promise resolves to an `Object` with the following keys:
367
349
IPFS Repo comes with two built in locks: memory and fs. These can be imported via the following:
368
350
369
351
```js
370
-
constfsLockfrom 'ipfs-repo/src/lock')// Default in Node.js
371
-
constmemoryLockfrom 'ipfs-repo/src/lock-memory')// Default in browser
352
+
import { FSLock } from'ipfs-repo/locks/fs'// Default in Node.js
353
+
import { MemoryLock } from'ipfs-repo/locks/memory'// Default in browser
372
354
```
373
355
374
356
You can also provide your own custom Lock. It must be an object with the following interface:
0 commit comments