New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

webpack.config.js

2

lib/tail.js

@@ -90,3 +90,3 @@ // Generated by CoffeeScript 1.10.0

stats = fs.statSync(this.filename);
this.pos = pos ? pos : stats.size;
this.pos = pos != null ? pos : stats.size;
if (fs.watch) {

@@ -93,0 +93,0 @@ return this.watcher = fs.watch(this.filename, this.fsWatchOptions, (function(_this) {

{
"author": "Luca Grulla",
"author":{"name": "Luca Grulla",
"url" : "http://www.lucagrulla.com"},
"contributors": [

@@ -8,3 +9,3 @@ "Luca Grulla",

"description": "tail a file in node",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "http://www.lucagrulla.com/node-tail",

@@ -11,0 +12,0 @@ "repository": {

#tail
[![NPM](https://nodei.co/npm/tail.png)](https://nodei.co/npm/tail/)
[![NPM](https://nodei.co/npm/tail.png?downloads=true&downloadRank=true)](https://nodei.co/npm/tail.png?downloads=true&downloadRank=true)

@@ -25,23 +25,18 @@ To install:

````
The only mandatory parameter is the path to the file to tail. You can pass optional parameters passed via a hash:
Tail constructor accepts optional parameters passed via a hash:
```javascript
var fileToTail = "/path/to/fileToTail.txt";
new Tail(fileToTail)
```
or
var options= {lineSeparator= /[\r]{0,1}\n/, fromBeginning = false, watchOptions = {}, follow = true} //default, equivalent to not passing the hash
```javascript
var options= {lineSeparator= /[\r]{0,1}\n/, fromBeginning = false, watchOptions = {}, follow = true} //default value, equivalent to not passing
new Tail(fileToTail, options)
```
//lineSeparator default is now a regex that handle linux/mac (9+)/windows
//fromBeginning to control if start tailing
var lineSeparator= /[\r]{0,1}\n/; // default is now a regex that handle linux/mac (9+)/windows
var fromBeginning = false;
var watchOptions = {}; // as per node fs.watch documentations
* `fileToTail` is the name (inclusive of the path) of the file to tail
* `options` is a hash. The following keys are accepted:
* `lineSeparator`: the line separator token (default /[\r]{0,1}\n/ to handle linux/mac (9+)/windows)
* `lineSeparator`: the line separator token (default `/[\r]{0,1}\n/` to handle linux/mac (9+)/windows)
* `watchOptions`: the full set of options that can be passed to `fs.watch` as per node documentation (default: {})

@@ -48,0 +43,0 @@ * `fromBeginning`: forces the tail of the file from the very beginning of it instead of from the first new line that will be appended (default: `false`)

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