
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
divideconfig
Advanced tools
npm install divideconfig --save
DivideConfig is smart loader for your application configuration. DivideConfig is load by mode configuration. Mode is to separate for distribution that are development, stage, production. See below configuration architecture.
config/
config.json
development.config.json
stage.config.json
production.config.json
|
+- database/
|
+- development.database.config.json
+- stage.database.config.json
+- production.database.config.json
+- oAuth2/
|
+- development.oauth2.config.json
+- stage.oauth2.config.json
+- production.oauth2.config.json
{
"mode": "development",
"default: "development"
}
{
"database": {
... your configuration
},
"oAuth2": {
... your configuration
}
}
DivideConfig is loading all configuration file in config directory, that is starts with mode prefix and xxxx.config.json file. If you set development mode, load all files that is start with "development". For example, "development.database.config.json" and "development.oauth2.config.json".
All loading task is to execute synchronous. So you try to load configuration before your application execute.
See configuration example,
var path = require('path');
var loader = require('../lib/Loader');
var configuration = loader.loading(path.join(__dirname, '../config/production_default_development'), 'config.json');
console.log(configuration);
See example in config directory and test/loader.js. I create example configuration and test case.
FAQs
Smart configuration loader by distribution configuration
The npm package divideconfig receives a total of 2 weekly downloads. As such, divideconfig popularity was classified as not popular.
We found that divideconfig demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.