Uname:Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64

Base Dir : /var/www/html

User : gavin


403WebShell
403Webshell
Server IP : 68.183.124.220  /  Your IP : 216.73.217.137
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : gavin ( 1000)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/gavin/workspace/happymandarin/node_modules/rcfinder/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gavin/workspace/happymandarin/node_modules/rcfinder/README.md
# rcfinder

[![Travis CI](https://travis-ci.org/spalger/rcfinder.svg)](https://travis-ci.org/spalger/rcfinder)

**This module provides the file lookup logic for the generally more useful [rcloader](https://www.npmjs.org/package/rcloader) package**.

Find a config file (like .jshintrc) by walking up from a specific directory.

Custom logic can be implemented for loading your config files, and calls to
the file system are cached so that you can find files relative to every file
in a project without making a ton of unnecessary calls.

## install
```js
npm install rcfinder
```

## Use
Create an instance of the RcFinder class, passing it the name of your config file and an object specifying other options.

```js
var RcFinder = require('rcfinder');
var rcFinder = new RcFinder('.jshintrc', {});
```

Then you can use the finder to look up the proper config file for a directory.
```js
// get the closet .jshintc file for this file
var config = rcFinder.find(__dirname);
```

If you want to use async file system calls, just specify a callback to find.
```js
rcFinder.find(__dirname, function (err, config) {

});
```

## Config
When creating an instance of the RcFinder class, you can specify options to dictate how the class behaves.
### config.loader
A 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.

The default loader is:
```js
function loader(path) {
  return JSON.parse(fs.readFileSync(path));
}
```

To 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'`.

NOTE:  You must call `.find()` with a callback if your loader is async.

Youez - 2016 - github.com/yon3zu
LinuXploit