async-tail
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

async-tail

Build Status License Docs

NPM

A zero-dependency file-tailer that exposes an async interface and handles unlink() and rename() events

Install

$ npm install async-tail

Usage

const FileTailer = require("async-tail").default;

const main = async () => {
    const tailer = new FileTailer("/tmp/foo");
    setTimeout(() => tailer.stop(), 10000); // stop tailing after 10 seconds
    for await (const line of tailer.watch()) {
        console.log("received", line);
    }
}

Readme

Keywords

Package Sidebar

Install

npm i async-tail

Weekly Downloads

0

Version

1.0.1

License

Apache-2.0

Unpacked Size

257 kB

Total Files

11

Last publish

Collaborators

  • jamiees2