How to use the datastore-core.NamespaceDatastore function in datastore-core

To help you get started, we’ve selected a few datastore-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github peer-base / peer-base / src / collaboration / store.js View on Github external
return new Promise((resolve, reject) => {
    const ds = ipfs._repo.datastore
    if (!ds) {
      return ipfs.once('start', () => {
        datastore(ipfs, collaboration).then(resolve).catch(reject)
      })
    }
    // resolve(ds)
    resolve(new NamespaceStore(ds, new Key(`peer-base-collab-${collaboration.fqn()}`)))
  })
}