holepunchto / hyperdrive

Hyperdrive is a secure, real time distributed file system
Apache License 2.0
1.86k stars 135 forks source link

pass in key, but archive.key is null until ready #149

Closed okdistribute closed 1 year ago

okdistribute commented 7 years ago

If I pass in the key, I would expect hyperdrive to have the key as an object, even if its not ready.

current behavior:

var archive = hyperdrive('./dir', 'mykey')
console.log(archive.key) // null

archive.on('ready', function () {
  console.log(archive.key) // key is printed
})