{
  "author": {
    "name": "Luca Grulla"
  },
  "contributors": [
    {
      "name": "Luca Grulla"
    },
    {
      "name": "Tom Hall"
    },
    {
      "name": "Andy Kent"
    }
  ],
  "name": "tail",
  "description": "tail a file in node",
  "version": "0.4.0",
  "repository": {
    "type": "git",
    "url": "git://github.com/lucagrulla/node-tail.git"
  },
  "main": "tail",
  "engines": {
    "node": ">= 0.4.0"
  },
  "dependencies": {},
  "devDependencies": {
    "coffee-script": "1.7.1"
  },
  "readme": "#tail\n\nTo install:\n\n```bash\nnpm install tail\n```\n\n#Use:\n```javascript\nTail = require('tail').Tail;\n\ntail = new Tail(\"fileToTail\");\n\ntail.on(\"line\", function(data) {\n  console.log(data);\n});\n\ntail.on(\"error\", function(error) {\n  console.log('ERROR: ', error);\n});\n````\n\nTail constructor accepts few parameters:\n\n```javascript\n\nvar fileToTail = \"/path/to/fileToTail.txt\";\nvar lineSeparator= \"\\n\";\nvar fromBeginning = false;\nvar watchOptions = {}; \\\\ as per node fs.watch documentations\n\nnew Tail(fileToTail, lineSeparator, watchOptions,fromBeginning)\n```\n\n* `fileToTail` is the name (inclusive of the path) of the file to tail\n* `lineSeparator` is the line separator token (default \"\\n\")\n* `watchOptions` is the full set of options that can be passed to `fs.watch` as per node documentation (default: {})\n* `fromBeginning` force the tail of the file from the very beginning of it instead of from the first new line that will be appended(default: \"\\n\")\n\nThe only mandatory one is the first, i.e. the the file you want to tail.\n\nTail emits two type of events:\n\n* line\n```\nfunction(data){}\n```\n* error\n```\nfunction(exception){}\n```\n\nIf you simply want to stop the tail:\n\n```javascript\ntail.unwatch()\n```\n\nAnd to start watching again:\n```javascript\ntail.watch()\n```\n\n#Want to fork ?\n\nTail is written in [CoffeeScript](http://jashkenas.github.com/coffee-script/).\n\nThe Cakefile generates the javascript that is then published to npm.\n\n#License\nMIT. Please see License file for more details.\n",
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/lucagrulla/node-tail/issues"
  },
  "_id": "tail@0.4.0",
  "_from": "tail@*"
}
