Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

find-config

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-config

Find the first config file matching a given name in the current directory or the nearest ancestor directory.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
179K
increased by8.75%
Maintainers
1
Weekly downloads
 
Created

What is find-config?

The find-config npm package is a utility for locating configuration files in a project. It searches for configuration files by traversing up the directory tree from a given starting point, making it easier to manage and locate configuration files in complex project structures.

What are find-config's main functionalities?

Find a specific configuration file

This feature allows you to find a specific configuration file (e.g., 'config.json') by searching up the directory tree from the current working directory.

const findConfig = require('find-config');
const configPath = findConfig('config.json');
console.log(configPath);

Find a configuration file from a specific directory

This feature allows you to specify a starting directory for the search, rather than using the current working directory.

const findConfig = require('find-config');
const configPath = findConfig('config.json', { cwd: '/path/to/start' });
console.log(configPath);

Find the first configuration file from a list of possible names

This feature allows you to search for the first configuration file that matches any name in a list of possible names.

const findConfig = require('find-config');
const configPath = findConfig(['config.json', 'config.yaml', 'config.js']);
console.log(configPath);

Other packages similar to find-config

Keywords

FAQs

Package last updated on 15 Feb 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc