# rocket-turtle-tail

> Tail a file within node!

Latest version **0.1.0** (published 2017-03-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install rocket-turtle-tail
pnpm add rocket-turtle-tail
yarn add rocket-turtle-tail
bun add rocket-turtle-tail
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2017-03-28 |
| First published | 2017-02-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.9 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Graham Kennery |
| Maintainers | grahamkennery |

## Links

- npm: https://www.npmjs.com/package/rocket-turtle-tail
- Repository: https://github.com/grahamkennery/rocket-turtle-tail
- Homepage: https://github.com/grahamkennery/rocket-turtle-tail#readme
- Issues: https://github.com/grahamkennery/rocket-turtle-tail/issues
- npm.io page: https://npm.io/package/rocket-turtle-tail

## Recent versions

- 0.1.0 (latest) — 2017-03-28
- 0.0.2 — 2017-02-07
- 0.0.1 — 2017-02-07

## README

# rocket-turtle-tail

[![Build Status](https://travis-ci.org/grahamkennery/rocket-turtle-tail.svg?branch=master)](https://travis-ci.org/grahamkennery/rocket-turtle-tail) [![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?style=plastic)](https://github.com/Flet/semistandard) [![Greenkeeper badge](https://badges.greenkeeper.io/grahamkennery/rocket-turtle-tail.svg)](https://greenkeeper.io/)

Ever wanted to tail a file in node? Me too! Wow! Fun!

## Installation
```
yarn add rocket-turtle-tail
```

or

```
npm install --save rocket-turtle-tail
```

## Usage
```javascript
const RocketTurtleTail = require('rocket-turtle-tail');
const tail = new RocketTurtleTail('path-to-file-you-want-to-watch');

tail.on('line', (line) => {
  console.log('OH LOOK, A LINE!', line);
});

tail.on('error', (err) => {
  console.log('Boooooo an error:', err);
});

tail.start();
```


## Other things
The constructor takes an optional second parameter of options as follows (defaults are shown):

``` javascript
new RocketTurtleTail('path-to-file', {
  useWatchFile: false, // Use fs.watchFile instead of fs.watch
  interval: 5000, // Specifies the interval for useWatchFile
  fromBeginning: false // Read the file from the beginning
});
```

---

This project was inspired by [node-tail](https://github.com/lucagrulla/node-tail). I made this repo for my own use since it couldn't do something and I don't like coffeescript enough to fix it ;)

---
_Source: https://npm.io/package/rocket-turtle-tail · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
