Socket
Book a DemoInstallSign in
Socket

@hoangcung1804npm/fuga-ipsa-sed

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hoangcung1804npm/fuga-ipsa-sed

A super simple & flexible & intuitive config module, support `yaml` & `toml`.

1.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

@hoangcung1804npm/fuga-ipsa-sed

A super simple & flexible & intuitive config module, support yaml & toml.

Install

$ npm i @hoangcung1804npm/fuga-ipsa-sed --save

Usage

const config = require('@hoangcung1804npm/fuga-ipsa-sed')(__dirname);

or:

const config = require('@hoangcung1804npm/fuga-ipsa-sed')({
  filename: 'test',
  config_basedir: __dirname,
  config_dir: 'config'
});

Options

  • filename: config file name, default: default, support: ['.js', '.json', '.node', '.yaml', '.yml', '.toml'].
  • config_basedir: directory for begining bubbling find config directory.
  • config_dir: config directory name, default: config.
  • config: default config object that overwrite config file.

Priority

environment option > custom option > default option

For example:

$ NODE_ENV=production NODE_CONFIG='{"port":3000}' node app.js

loading order:

NODE_CONFIG='{"port":3000}' > opt.config > production config file > default config file

Environment Variables

  • NODE_ENV -> filename
  • CONFIG_BASEDIR || NODE_CONFIG_BASEDIR -> config_dirname
  • CONFIG_DIR || NODE_CONFIG_DIR -> config_dir
  • CONFIG || NODE_CONFIG -> config

Test

$ npm test

License

MIT

Keywords

Int32Array

FAQs

Package last updated on 29 Apr 2024

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.