Socket
Socket
Sign inDemoInstall

configuredjs

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    configuredjs

Nodejs config manager


Version published
Weekly downloads
2
decreased by-71.43%
Maintainers
1
Install size
4.26 kB
Created
Weekly downloads
 

Readme

Source

Configuredjs

Package for managing config for your applications.

It has Typescript typings included. Config type returned from default function will be the same as type of defaultConfig.

Usage

import configured from "configuredjs";
//or
const configured = require("configuredjs");

const config = configured({
    path: "config.json", writeMissing: true, defaultConfig: {
        port:8080,
        rateLimits:{
            window:15 * 60,
            limit:30
        },
    }
})

console.log(config.port); //8080 or whatever was overwritten by local config.json file 

If writeMissing is enabled all missing props will be written to the config file. writeMissing parameter is optional

Your application can than use config.port etc.

FAQs

Last updated on 25 Aug 2022

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