Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tail

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tail

tail a file in node

  • 0.3.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
179K
decreased by-15.1%
Maintainers
1
Weekly downloads
 
Created
Source

#tail

To install:

npm install tail

#Use:

Tail = require('tail').Tail;

tail = new Tail("fileToTail");

tail.on("line", function(data) {
  console.log(data);
});

Tail accepts the line separator as second parameter. If nothing is passed it is defaulted to new line '\n'.


var lineSeparator= "-";

new Tail("fileToTail",lineSeparator)

Tail emits two type of events:

  • line
function(data){}
  • error
function(exception){}

If you simply want to stop the tail:

tail.unwatch()

And to start watching again:

tail.watch()

#Want to fork ?

Tail is written in CoffeeScript.

The Cakefile generates the javascript that is then published to npm.

#License MIT. Please see License file for more details.

FAQs

Package last updated on 21 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc