Socket
Socket
Sign inDemoInstall

confdir

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    confdir

manage module specific configuration files in their own directory


Version published
Weekly downloads
185
decreased by-1.6%
Maintainers
1
Install size
5.01 kB
Created
Weekly downloads
 

Readme

Source

confdir

handle module specific configurations in their own directory

Installation

npm install confdir or npm install -g confdir

Usage

For example anywhere in a Git repository you could get a reference to the .git directory:

var confdir = require('confdir');

confdir(__dirname, 'git', function (err, dir) {
  if (err)
    console.log(err);
  else
    console.log("The Git files are in " + dir);
});

This would print an absolute reference to the .git directory.


confdir is only one method:

confdir(dir, name, callback)

where

  • dir is a reference to a directory, that will be walked up,
  • name is the name of the configuration directory (without the dot) and
  • callback is a callback function that takes two arguments (err, dir).

Bugs and Issues

If you encounter any bugs or issues, feel free to open an issue at github.

License

This package is licensed under the MIT license.

FAQs

Last updated on 23 Dec 2011

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc