Echo JS 0.11.0

<~>

alonronin 15 days ago. link 1 point
I think we should use Async Iterators for this nowdays:

const getHash = async path => {
  const hash = crypto.createHash('sha256');
  const rs = fs.createReadStream(path);

  for await (const chunk of rs) {
    hash.update(chunk);
  }

  return hash.digest('hex');
}