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

@cnwangjie/conf

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

@cnwangjie/conf

Lightweight Node.js configuration with enough feature.

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

config.js

Build Status Coverage Status

Lightweight Node.js configuration with enough feature.

Installation

yarn add @cnwangjie/conf

Usage

const conf = require('@cnwangjie/conf')

// load config file in bootstrap
conf().load('config.json')
// you can use absolute path or path relative with current path

// besides, you can load any type file of JS, YAML, TOML, ENV and you just need
// install corresponding module

// then you can get the config in every file by require config.js
conf('server.port')
conf().get('server.port')
conf.server.port
// you can use any type of style above

// even you can set separator you like by following way
conf().separator = ':'
conf('server:port')

You need to install corresponding module if you want to use other suffix config file.

suffixmodule
.ymljs-yaml
.yamljs-yaml
.envdotenv
.tomltoml

Keywords

FAQs

Package last updated on 09 Jul 2021

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