New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

config-utilities

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

config-utilities

Configuration file utilities

  • 0.0.3
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Configuration utilities

Collection of utilities for configuration management.

Functions

resolvePaths(paths, [opts])

Resolve paths in a configuration object. The path configuration object is expected to be configured as follows:

paths = {
    myFolder1: '.',
    myFolder2: '/home',
    specialFile: '$myFolder2/special.txt'
}

The output of resolvePaths() for this input would be:

resolvePaths(paths) = {
    myFolder1: '/my/current/working/directory/full/path',
    myFolder2: '/home',
    specialFile: '/home/special.txt'
}

The following rules apply:

  • Dollar substitution only applies to the first entry of the path
  • Behaviour for path names containing forward slashes is undefined
  • Regardless of the operating system, input paths must be all forward-slash-separated
Options
  • baseDir: Base folder path for relative entries resolution (defaults to current directory)
  • iterationLimit: Iteration limit to avoid circular dependencies (defaults to 1000; only needed for huge configuration objects)

License

This package and all of its contents are published under the MIT license. See the enclosed LICENSE file.

Keywords

FAQs

Package last updated on 28 Nov 2018

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