Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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()}`)))
})
}