{"_id":"rcfinder","_rev":"196919","name":"rcfinder","description":"Find a config file (like .jshintrc) by walking up from a specific directory.","dist-tags":{"latest":"0.1.9"},"maintainers":[{"name":"spalger","email":"email@spalger.com"}],"time":{"modified":"2021-06-03T12:29:52.000Z","created":"2014-02-17T18:33:31.098Z","0.1.9":"2016-05-09T19:54:55.267Z","0.1.8":"2014-07-07T23:08:49.603Z","0.1.7":"2014-05-06T01:18:09.199Z","0.1.6":"2014-03-31T17:20:24.431Z","0.1.5":"2014-03-31T17:04:03.626Z","0.1.4":"2014-02-18T14:16:46.159Z","0.1.3":"2014-02-17T21:23:56.746Z","0.1.2":"2014-02-17T20:35:32.674Z","0.1.1":"2014-02-17T18:34:52.021Z","0.1.0":"2014-02-17T18:33:31.098Z"},"users":{"itonyyo":true},"author":{"name":"Spencer Alger"},"repository":{"type":"git","url":"git://github.com/spenceralger/rcfinder.git"},"versions":{"0.1.9":{"name":"rcfinder","version":"0.1.9","description":"Find a config file (like .jshintrc) by walking up from a specific directory.","main":"index.js","scripts":{"test":"mocha test/*.js"},"keywords":["find","rcfile","rc","search","defaults","config"],"author":{"name":"Spencer Alger"},"license":"MIT","devDependencies":{"mocha":"^2.4.0","expect.js":"~0.2.0"},"directories":{"test":"test"},"dependencies":{"lodash.clonedeep":"^4.3.2"},"repository":{"type":"git","url":"git://github.com/spenceralger/rcfinder.git"},"bugs":{"url":"https://github.com/spenceralger/rcfinder/issues"},"homepage":"https://github.com/spenceralger/rcfinder","engines":{"node":">=0.10"},"gitHead":"a5c3d5825ea5e23eadd3a657936023529a01579d","_id":"rcfinder@0.1.9","_shasum":"f3e80f387ddf9ae80ae30a4100329642eae81115","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"spalger","email":"email@spalger.com"},"dist":{"shasum":"f3e80f387ddf9ae80ae30a4100329642eae81115","size":3939,"noattachment":false,"key":"/rcfinder/-/rcfinder-0.1.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcfinder/download/rcfinder-0.1.9.tgz"},"maintainers":[{"name":"spalger","email":"email@spalger.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/rcfinder-0.1.9.tgz_1462823694853_0.652188234264031"},"publish_time":1462823695267,"_cnpm_publish_time":1462823695267,"_hasShrinkwrap":false},"0.1.8":{"name":"rcfinder","version":"0.1.8","description":"Find a config file (like .jshintrc) by walking up from a specific directory.","main":"index.js","scripts":{"test":"mocha test/*.js"},"keywords":["find","rcfile","rc","search","defaults","config"],"author":{"name":"Spencer Alger"},"license":"MIT","devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"directories":{"test":"test"},"dependencies":{"lodash":"~2.4.1"},"repository":{"type":"git","url":"git://github.com/spenceralger/rcfinder.git"},"bugs":{"url":"https://github.com/spenceralger/rcfinder/issues"},"homepage":"https://github.com/spenceralger/rcfinder","_id":"rcfinder@0.1.8","_shasum":"5fa24066830cf6a665f9e3820cb3c67f0af4058e","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"spenceralger","email":"spencer@spenceralger.com"},"maintainers":[{"name":"spalger","email":"email@spalger.com"}],"dist":{"shasum":"5fa24066830cf6a665f9e3820cb3c67f0af4058e","size":3940,"noattachment":false,"key":"/rcfinder/-/rcfinder-0.1.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcfinder/download/rcfinder-0.1.8.tgz"},"publish_time":1404774529603,"_cnpm_publish_time":1404774529603,"_hasShrinkwrap":false},"0.1.7":{"name":"rcfinder","version":"0.1.7","description":"Find a config file (like .jshintrc) by walking up from a specific directory.","main":"index.js","scripts":{"test":"mocha test/*.js"},"keywords":["find","rcfile","rc","search","defaults","config"],"author":{"name":"Spencer Alger"},"license":"MIT","devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"directories":{"test":"test"},"dependencies":{"lodash":"~2.4.1"},"repository":{"type":"git","url":"git://github.com/spenceralger/rcfinder.git"},"bugs":{"url":"https://github.com/spenceralger/rcfinder/issues"},"homepage":"https://github.com/spenceralger/rcfinder","_id":"rcfinder@0.1.7","_shasum":"cda40edf40b1bf1c613e6a53464d2fc17925138c","_from":".","_npmVersion":"1.4.7","_npmUser":{"name":"spenceralger","email":"spencer@spenceralger.com"},"maintainers":[{"name":"spalger","email":"email@spalger.com"}],"dist":{"shasum":"cda40edf40b1bf1c613e6a53464d2fc17925138c","size":3656,"noattachment":false,"key":"/rcfinder/-/rcfinder-0.1.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcfinder/download/rcfinder-0.1.7.tgz"},"publish_time":1399339089199,"_cnpm_publish_time":1399339089199,"_hasShrinkwrap":false},"0.1.6":{"name":"rcfinder","version":"0.1.6","description":"Find a config file (like .jshintrc) by walking up from a specific directory.","main":"index.js","scripts":{"test":"mocha test/*.js"},"keywords":["find","rcfile","rc","search","defaults","config"],"author":{"name":"Spencer Alger"},"license":"MIT","devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"directories":{"test":"test"},"dependencies":{"lodash.clonedeep":"~2.4.1"},"repository":{"type":"git","url":"git://github.com/spenceralger/rcfinder.git"},"bugs":{"url":"https://github.com/spenceralger/rcfinder/issues"},"homepage":"https://github.com/spenceralger/rcfinder","_id":"rcfinder@0.1.6","dist":{"shasum":"08591731cb39763c02d8e725192470f378fbd8ea","size":3652,"noattachment":false,"key":"/rcfinder/-/rcfinder-0.1.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcfinder/download/rcfinder-0.1.6.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"spenceralger","email":"spencer@spenceralger.com"},"maintainers":[{"name":"spalger","email":"email@spalger.com"}],"publish_time":1396286424431,"_hasShrinkwrap":false,"_cnpm_publish_time":1396286424431},"0.1.5":{"name":"rcfinder","version":"0.1.5","description":"Find a config file (like .jshintrc) by walking up from a specific directory.","main":"index.js","scripts":{"test":"mocha test/*.js"},"keywords":["find","rcfile","rc","search","defaults","config"],"author":{"name":"Spencer Alger"},"license":"MIT","devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"directories":{"test":"test"},"dependencies":{"lodash.clonedeep":"~2.4.1"},"repository":{"type":"git","url":"git://github.com/spenceralger/rcfinder.git"},"bugs":{"url":"https://github.com/spenceralger/rcfinder/issues"},"homepage":"https://github.com/spenceralger/rcfinder","_id":"rcfinder@0.1.5","dist":{"shasum":"ffb468b2129cd1de34f6010d37336de340e5fc77","size":3636,"noattachment":false,"key":"/rcfinder/-/rcfinder-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcfinder/download/rcfinder-0.1.5.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"spenceralger","email":"spencer@spenceralger.com"},"maintainers":[{"name":"spalger","email":"email@spalger.com"}],"publish_time":1396285443626,"_hasShrinkwrap":false,"_cnpm_publish_time":1396285443626},"0.1.4":{"name":"rcfinder","version":"0.1.4","description":"Find a config file (like .jshintrc) by walking up from a specific directory.","main":"index.js","scripts":{"test":"mocha"},"keywords":["find","rcfile","rc","search","defaults","config"],"author":{"name":"Spencer Alger"},"license":"MIT","devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"directories":{"test":"test"},"dependencies":{"lodash.clonedeep":"~2.4.1"},"repository":{"type":"git","url":"git://github.com/spenceralger/rcfinder.git"},"bugs":{"url":"https://github.com/spenceralger/rcfinder/issues"},"homepage":"https://github.com/spenceralger/rcfinder","_id":"rcfinder@0.1.4","dist":{"shasum":"fb1555cde28da93680af89ec855826094c8af84e","size":3251,"noattachment":false,"key":"/rcfinder/-/rcfinder-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcfinder/download/rcfinder-0.1.4.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"spenceralger","email":"spencer@spenceralger.com"},"maintainers":[{"name":"spalger","email":"email@spalger.com"}],"publish_time":1392733006159,"_hasShrinkwrap":false,"_cnpm_publish_time":1392733006159},"0.1.3":{"name":"rcfinder","version":"0.1.3","description":"Find a config file (like .jshintrc) by walking up from a specific directory.","main":"index.js","scripts":{"test":"mocha"},"keywords":["find","rcfile","rc","search","defaults","config"],"author":{"name":"Spencer Alger"},"license":"MIT","devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"directories":{"test":"test"},"dependencies":{},"repository":{"type":"git","url":"git://github.com/spenceralger/rcfinder.git"},"bugs":{"url":"https://github.com/spenceralger/rcfinder/issues"},"homepage":"https://github.com/spenceralger/rcfinder","_id":"rcfinder@0.1.3","dist":{"shasum":"f2402e074cedf3e7aba7a32a14fb0511c2e56dfb","size":3114,"noattachment":false,"key":"/rcfinder/-/rcfinder-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcfinder/download/rcfinder-0.1.3.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"spenceralger","email":"spencer@spenceralger.com"},"maintainers":[{"name":"spalger","email":"email@spalger.com"}],"publish_time":1392672236746,"_hasShrinkwrap":false,"_cnpm_publish_time":1392672236746},"0.1.2":{"name":"rcfinder","version":"0.1.2","description":"Find a config file (like .jshintrc) by walking up from a specific directory.","main":"index.js","scripts":{"test":"mocha"},"keywords":["find","rcfile","rc","search","defaults","config"],"author":{"name":"Spencer Alger"},"license":"MIT","devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"directories":{"test":"test"},"dependencies":{},"repository":{"type":"git","url":"git://github.com/spenceralger/rcfinder.git"},"bugs":{"url":"https://github.com/spenceralger/rcfinder/issues"},"homepage":"https://github.com/spenceralger/rcfinder","_id":"rcfinder@0.1.2","dist":{"shasum":"9b9457e3d8ded0413d14e40f0859774386888edb","size":2610,"noattachment":false,"key":"/rcfinder/-/rcfinder-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcfinder/download/rcfinder-0.1.2.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"spenceralger","email":"spencer@spenceralger.com"},"maintainers":[{"name":"spalger","email":"email@spalger.com"}],"publish_time":1392669332674,"_hasShrinkwrap":false,"_cnpm_publish_time":1392669332674},"0.1.1":{"name":"rcfinder","version":"0.1.1","description":"Find a config file (like .jshintrc) by walking up from a specific directory.","main":"index.js","scripts":{"test":"mocha"},"keywords":["find","rcfile","rc","search","defaults","config"],"author":{"name":"Spencer Alger"},"license":"MIT","devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"directories":{"test":"test"},"dependencies":{},"repository":{"type":"git","url":"git://github.com/spenceralger/rcfinder.git"},"bugs":{"url":"https://github.com/spenceralger/rcfinder/issues"},"homepage":"https://github.com/spenceralger/rcfinder","_id":"rcfinder@0.1.1","dist":{"shasum":"3a71a612887983b803ba2bc0c5a915c9496ffc82","size":2351,"noattachment":false,"key":"/rcfinder/-/rcfinder-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcfinder/download/rcfinder-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"spenceralger","email":"spencer@spenceralger.com"},"maintainers":[{"name":"spalger","email":"email@spalger.com"}],"publish_time":1392662092021,"_hasShrinkwrap":false,"_cnpm_publish_time":1392662092021},"0.1.0":{"name":"rcfinder","version":"0.1.0","description":"Find a config file (like .jshintrc) by walking up from a specific directory.","main":"index.js","scripts":{"test":"mocha"},"keywords":["find","rcfile","rc","search","defaults","config"],"author":{"name":"Spencer Alger"},"license":"MIT","devDependencies":{"mocha":"~1.17.1","expect.js":"~0.2.0"},"directories":{"test":"test"},"dependencies":{"expect.js":"~0.2.0"},"repository":{"type":"git","url":"git://github.com/spenceralger/rcfinder.git"},"bugs":{"url":"https://github.com/spenceralger/rcfinder/issues"},"homepage":"https://github.com/spenceralger/rcfinder","_id":"rcfinder@0.1.0","dist":{"shasum":"432c03d9e53d981fd307ab61f2c5d192c2499724","size":2360,"noattachment":false,"key":"/rcfinder/-/rcfinder-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcfinder/download/rcfinder-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"spenceralger","email":"spencer@spenceralger.com"},"maintainers":[{"name":"spalger","email":"email@spalger.com"}],"publish_time":1392662011098,"_hasShrinkwrap":false,"_cnpm_publish_time":1392662011098}},"readme":"# rcfinder\n\n[![Travis CI](https://travis-ci.org/spalger/rcfinder.svg)](https://travis-ci.org/spalger/rcfinder)\n\n**This module provides the file lookup logic for the generally more useful [rcloader](https://www.npmjs.org/package/rcloader) package**.\n\nFind a config file (like .jshintrc) by walking up from a specific directory.\n\nCustom logic can be implemented for loading your config files, and calls to\nthe file system are cached so that you can find files relative to every file\nin a project without making a ton of unnecessary calls.\n\n## install\n```js\nnpm install rcfinder\n```\n\n## Use\nCreate an instance of the RcFinder class, passing it the name of your config file and an object specifying other options.\n\n```js\nvar RcFinder = require('rcfinder');\nvar rcFinder = new RcFinder('.jshintrc', {});\n```\n\nThen you can use the finder to look up the proper config file for a directory.\n```js\n// get the closet .jshintc file for this file\nvar config = rcFinder.find(__dirname);\n```\n\nIf you want to use async file system calls, just specify a callback to find.\n```js\nrcFinder.find(__dirname, function (err, config) {\n\n});\n```\n\n## Config\nWhen creating an instance of the RcFinder class, you can specify options to dictate how the class behaves.\n### config.loader\nA function to call that will load a given path. Once the path for a config file is determined, this will be called with that path as it's only argument and it should return a proper value.\n\nThe default loader is:\n```js\nfunction loader(path) {\n  return JSON.parse(fs.readFileSync(path));\n}\n```\n\nTo make your loader async, simply ask for second argument which will be set to a node-style callback. You can also ask for a simple async JSON loader by setting `loader:` equal to `'async'`.\n\nNOTE:  You must call `.find()` with a callback if your loader is async.\n","_attachments":{},"homepage":"https://github.com/spenceralger/rcfinder","bugs":{"url":"https://github.com/spenceralger/rcfinder/issues"},"license":"MIT"}