{"_id":"findit2","_rev":"3212968","name":"findit2","description":"walk a directory tree recursively with events","dist-tags":{"latest":"2.2.3"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"time":{"modified":"2024-02-28T06:15:51.000Z","created":"2013-07-22T08:51:42.547Z","2.2.3":"2014-10-18T19:58:49.776Z","2.2.2":"2014-10-12T20:29:16.957Z","2.2.1":"2014-10-10T22:17:27.268Z","2.2.0":"2014-10-10T21:52:42.562Z","2.1.0":"2014-10-10T20:37:28.931Z","1.1.1":"2014-02-26T09:04:13.165Z","0.2.0":"2013-07-22T08:51:42.547Z"},"users":{},"author":{"name":"Andrew Kelley","email":"superjoe30@gmail.com"},"repository":{"type":"git","url":"http://github.com/andrewrk/node-findit.git"},"versions":{"2.2.3":{"name":"findit2","version":"2.2.3","description":"walk a directory tree recursively with events","main":"index.js","devDependencies":{"tap":"~0.4.13","mkdirp":"~0.5.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"http://github.com/andrewrk/node-findit.git"},"keywords":["find","walk","directory","recursive","tree","traversal"],"author":{"name":"Andrew Kelley","email":"superjoe30@gmail.com"},"engines":{"node":">=0.8.22"},"license":"MIT","bugs":{"url":"https://github.com/andrewrk/node-findit/issues"},"_id":"findit2@2.2.3","dist":{"shasum":"58a466697df8a6205cdfdbf395536b8bd777a5f6","size":5159,"noattachment":false,"key":"/findit2/-/findit2-2.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/findit2/download/findit2-2.2.3.tgz"},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"publish_time":1413662329776,"_hasShrinkwrap":false,"_cnpm_publish_time":1413662329776,"_cnpmcore_publish_time":"2021-12-15T11:13:50.637Z"},"2.2.2":{"name":"findit2","version":"2.2.2","description":"walk a directory tree recursively with events","main":"index.js","devDependencies":{"tap":"~0.4.13","mkdirp":"~0.5.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"http://github.com/andrewrk/node-findit.git"},"keywords":["find","walk","directory","recursive","tree","traversal"],"author":{"name":"Andrew Kelley","email":"superjoe30@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/andrewrk/node-findit/issues"},"_id":"findit2@2.2.2","dist":{"shasum":"24db4ab6fb18fc9638b67110e1bdc87962874bbe","size":5120,"noattachment":false,"key":"/findit2/-/findit2-2.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/findit2/download/findit2-2.2.2.tgz"},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"publish_time":1413145756957,"_hasShrinkwrap":false,"_cnpm_publish_time":1413145756957,"_cnpmcore_publish_time":"2021-12-15T11:13:50.884Z"},"2.2.1":{"name":"findit2","version":"2.2.1","description":"walk a directory tree recursively with events","main":"index.js","devDependencies":{"tap":"~0.4.13","mkdirp":"~0.5.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"http://github.com/andrewrk/node-findit.git"},"keywords":["find","walk","directory","recursive","tree","traversal"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","bugs":{"url":"https://github.com/andrewrk/node-findit/issues"},"_id":"findit2@2.2.1","dist":{"shasum":"3cb503ae22481ee13754910b64b02bb229cb16ff","size":4787,"noattachment":false,"key":"/findit2/-/findit2-2.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/findit2/download/findit2-2.2.1.tgz"},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"publish_time":1412979447268,"_hasShrinkwrap":false,"_cnpm_publish_time":1412979447268,"_cnpmcore_publish_time":"2021-12-15T11:13:51.118Z"},"2.2.0":{"name":"findit2","version":"2.2.0","description":"walk a directory tree recursively with events","main":"index.js","devDependencies":{"tap":"~0.4.13","mkdirp":"~0.5.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"http://github.com/andrewrk/node-findit.git"},"keywords":["find","walk","directory","recursive","tree","traversal"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","bugs":{"url":"https://github.com/andrewrk/node-findit/issues"},"_id":"findit2@2.2.0","dist":{"shasum":"3726f8f0d696219a8b093c53b6344727bc4fdafa","size":4756,"noattachment":false,"key":"/findit2/-/findit2-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/findit2/download/findit2-2.2.0.tgz"},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"publish_time":1412977962562,"_hasShrinkwrap":false,"_cnpm_publish_time":1412977962562,"_cnpmcore_publish_time":"2021-12-15T11:13:51.354Z"},"2.1.0":{"name":"findit2","version":"2.1.0","description":"walk a directory tree recursively with events","main":"index.js","devDependencies":{"tap":"~0.4.13","mkdirp":"~0.5.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"http://github.com/andrewrk/node-findit.git"},"keywords":["find","walk","directory","recursive","tree","traversal"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","bugs":{"url":"https://github.com/andrewrk/node-findit/issues"},"_id":"findit2@2.1.0","dist":{"shasum":"161835eb7cd1f03452d694b6b8fa294a7ef5f493","size":4628,"noattachment":false,"key":"/findit2/-/findit2-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/findit2/download/findit2-2.1.0.tgz"},"_from":".","_npmVersion":"1.3.10","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"publish_time":1412973448931,"_hasShrinkwrap":false,"_cnpm_publish_time":1412973448931,"_cnpmcore_publish_time":"2021-12-15T11:13:51.567Z"},"1.1.1":{"name":"findit2","version":"1.1.1","description":"walk a directory tree recursively with events","main":"index.js","devDependencies":{"tap":"~0.4.4"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"http://github.com/andrewrk/node-findit.git"},"keywords":["find","walk","directory","recursive","tree","traversal"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT","bugs":{"url":"https://github.com/andrewrk/node-findit/issues"},"homepage":"https://github.com/andrewrk/node-findit","_id":"findit2@1.1.1","dist":{"shasum":"9bdd37fe5a841fe660b298a587702fc2e7e50bc0","size":4621,"noattachment":false,"key":"/findit2/-/findit2-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/findit2/download/findit2-1.1.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"publish_time":1393405453165,"_hasShrinkwrap":false,"_cnpm_publish_time":1393405453165,"_cnpmcore_publish_time":"2021-12-15T11:13:51.774Z"},"0.2.0":{"name":"findit2","version":"0.2.0","description":"Walk a directory tree.","main":"./index.js","dependencies":{"seq":">=0.1.7"},"devDependencies":{"hashish":">=0.0.2 <0.1","expresso":"0.9.x"},"scripts":{"test":"expresso"},"repository":{"type":"git","url":"http://github.com/superjoe30/node-findit.git"},"keywords":["find","walk","directory","recursive","tree"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"license":"MIT/X11","readmeFilename":"README.markdown","bugs":{"url":"https://github.com/superjoe30/node-findit/issues"},"_id":"findit2@0.2.0","dist":{"shasum":"87ed6c0df72ce921f97721cc3f6b8052d79a514a","size":4537,"noattachment":false,"key":"/findit2/-/findit2-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/findit2/download/findit2-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"publish_time":1374483102547,"_hasShrinkwrap":false,"_cnpm_publish_time":1374483102547,"_cnpmcore_publish_time":"2021-12-15T11:13:51.988Z"}},"readme":"# findit\n\nRecursively walk directory trees. Think `/usr/bin/find`.\n\n[![build status](https://secure.travis-ci.org/andrewrk/node-findit.png)](http://travis-ci.org/andrewrk/node-findit)\n\n## Why the fork?\n\nThere is a [pull request](https://github.com/substack/node-findit/pull/34) to\nmerge this project back into findit.\n\nThe pull request fixes every open issue in findit, and it completely rewrites\nthe code from the ground up.\n\nIt also adds an additional feature regarding symlinks.\n\nI would love for substack to merge the pull request, but realistically it might\nnot happen, and this code is objectively cleaner, more robust, and fixes\nseveral critical issues.\n\nI recommend depending on this module rather than the original findit. If the\npull request is merged, however, I will add a deprecation notice to this module\nand happily hand the maintainer hat back to substack.\n\n# example\n\n``` js\nvar finder = require('findit2')(process.argv[2] || '.');\nvar path = require('path');\n\nfinder.on('directory', function (dir, stat, stop, linkPath) {\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, linkPath) {\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 findit = require('findit2')\n```\n\n## var finder = findit(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, linkPath) {})\n\nFor each file, directory, and symlink `file`, this event fires.\n\nIf `followSymlinks` is `true`, then `linkPath` will be defined when `file`\nwas found via a symlink. In this situation, `linkPath` is the path including\nthe symlink; `file` is the resolved actual location on disk.\n\n## finder.on('file', function (file, stat, linkPath) {})\n\nFor each file, this event fires.\n\n## finder.on('directory', function (dir, stat, stop, linkPath) {})\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## finder.on('error', function (err) {})\n\nWhenever there is an error, this event fires. You can choose to ignore errors or\nstop the traversal using `finder.stop()`.\n\nYou can always get the source of the error by checking `err.path`.\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install findit2\n```\n","_attachments":{},"bugs":{"url":"https://github.com/andrewrk/node-findit/issues"},"license":"MIT"}