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

fileconfig

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fileconfig

json and yml file configurations

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by566.67%
Maintainers
1
Weekly downloads
 
Created
Source

Quality Gate Status

fileconfig (v-4.0.0)

Library for configuration file loading

install it

npm install fileconfig -g

use it

assuming you have a configuration folder as follow:

+ /path/to/config/folder
    + share
        default.yml -> symlink to dev/alpha.yml
        + qa
        + dev
            alpha.yml

with this content

  • share/dev/alpha.yml
name: "alpha dev share"
port: 9090
dir: ${env.ALPHA_SHARE}

then you can fetch data as follow:

var FileConfig = require("fileconfig");
var config = new FileConfig("/path/to/config/folder");

var defaultServer = config.share.default;
console.log(defaultServer.name); // out : alpha dev share
console.log(defaultServer.port); // out : 9090

dev

npm run test:watch          # run tests and watch for changes
npm run lint                # generate lint report

licence

Apache-2.0

Keywords

FAQs

Package last updated on 07 Dec 2019

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