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

config-simple

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

config-simple

An easy configuration module

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Config Simple

An easy configuration module for Node.

Installation

npm install --save simple-config

Usage

JavaScript
var Config = require('config-simple');
var config = new Config('config'); // the directory of your configuration

var someValue = config.data().value;
TypeScript
import Config from 'config-simple';

interface ConfigData {
    value: string;
}

let config: Config<ConfigData> = new Config<ConfigData>('config'); // the directory of your configuration

let someValue: string = config.data().value;

File Extensions

Additionally, you can pass one of the following extensions to the Config constructor to use a different type of file:

  • json (default)
  • js
  • yaml/yml
  • json5

File Order

First a file called default.json (or your other extension) will be used.

After that, we'll look for for the process.env.NODE_ENV.json file and override the defaults using it.

Contributing

This project is licensed under MIT, and we're openly accepting contributions. However, PRs to master will only be accepted in TypeScript. If you don't understand TypeScript but still have a great idea, please create an Issue.

FAQs

Package last updated on 06 Dec 2015

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