{
  "name": "findit",
  "version": "1.2.0",
  "description": "walk a directory tree recursively with events",
  "main": "index.js",
  "devDependencies": {
    "tap": "~0.4.4",
    "mkdirp": "~0.3.5"
  },
  "scripts": {
    "test": "tap test/*.js"
  },
  "repository": {
    "type": "git",
    "url": "http://github.com/substack/node-findit.git"
  },
  "keywords": [
    "find",
    "walk",
    "directory",
    "recursive",
    "tree",
    "traversal"
  ],
  "author": {
    "name": "James Halliday",
    "email": "mail@substack.net",
    "url": "http://substack.net"
  },
  "license": "MIT",
  "readme": "# findit\n\nRecursively walk directory trees. Think `/usr/bin/find`.\n\n[![build status](https://secure.travis-ci.org/substack/node-findit.png)](http://travis-ci.org/substack/node-findit)\n\n# example\n\n``` js\nvar finder = require('findit')(process.argv[2] || '.');\nvar path = require('path');\n\nfinder.on('directory', function (dir, stat, stop) {\n    var base = path.basename(dir);\n    if (base === '.git' || base === 'node_modules') stop()\n    else console.log(dir + '/')\n});\n\nfinder.on('file', function (file, stat) {\n    console.log(file);\n});\n\nfinder.on('link', function (link, stat) {\n    console.log(link);\n});\n```\n\n# methods\n\n``` js\nvar find = require('findit')\n```\n\n## var finder = find(basedir, opts)\n\nReturn an event emitter `finder` that performs a recursive walk starting at\n`basedir`.\n\nIf you set `opts.followSymlinks`, symlinks will be followed. Otherwise, a\n`'link'` event will fire but symlinked directories will not be walked.\n\nIf `basedir` is actually a non-directory regular file, findit emits a single\n\"file\" event for it then emits \"end\".\n\nYou can optionally specify a custom\n[fs](http://nodejs.org/docs/latest/api/fs.html)\nimplementation with `opts.fs`. `opts.fs` should implement:\n\n* `opts.fs.readdir(dir, cb)`\n* `opts.fs.lstat(dir, cb)`\n* `opts.fs.readlink(dir, cb)` - optional if your stat objects from\n`opts.fs.lstat` never return true for `stat.isSymbolicLink()`\n\n## finder.stop()\n\nStop the traversal. A `\"stop\"` event will fire and then no more events will\nfire.\n\n# events\n\n## finder.on('path', function (file, stat) {})\n\nFor each file, directory, and symlink `file`, this event fires.\n\n## finder.on('file', function (file, stat) {})\n\nFor each file, this event fires.\n\n## finder.on('directory', function (dir, stat, stop) {})\n\nFor each directory, this event fires with the path `dir`.\n\nYour callback may call `stop()` on the first tick to tell findit to stop walking\nthe current directory.\n\n## finder.on('link', function (file, stat) {})\n\nFor each symlink, this event fires.\n\n## finder.on('readlink', function (src, dst) {})\n\nEvery time a symlink is read when `opts.followSymlinks` is on, this event fires.\n\n## finder.on('end', function () {})\n\nWhen the recursive walk is complete unless `finder.stop()` was called, this\nevent fires.\n\n## finder.on('stop', function () {})\n\nWhen `finder.stop()` is called, this event fires.\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install findit\n```\n\n# license\n\nMIT\n",
  "readmeFilename": "readme.markdown",
  "bugs": {
    "url": "https://github.com/substack/node-findit/issues"
  },
  "homepage": "https://github.com/substack/node-findit",
  "_id": "findit@1.2.0",
  "_from": "findit@~1.2.0"
}
