Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Latest commit

 

History

History
24 lines (17 loc) · 768 Bytes

readme.md

File metadata and controls

24 lines (17 loc) · 768 Bytes

deprecated

More info on active projects and modules at dat-ecosystem.org


datcat

module to simplify streaming a remote hypercore feed in memory so you can cat the results. works with 'raw' hypercores or hyperdrives. autodetects hyperdrive/dat encoding and decodes metadata for you automatically.

usage

var stream = require('datcat')(datLink)
stream
  .on('data', function (d) {
    console.log(d)
  })
  .on('end', function () {
    stream.close()
  })

note you must call .close() manually to unref and allow your process to exit (if you need that)