
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
user-config
Advanced tools
Easy user application configuration management for node and web applications
Easy user application configuration management
When requiring the library, user-config returns a function which is used to instantiate a config object that allows getting and setting of config values:
const createConfig = require("user-config");
const config = createConfig("my-app");
// items in config are stored in objects and must be serialisable
config.set("some.config.item", 123);
Configuration changes should be saved after being changed:
const config = require("user-config")("my-app");
config.set("port", 443);
config.save();
Values can easily be retrieved from the store, including entire objects:
const config = require("user-config")("my-app");
console.log(`Application running on interface ${config.get("listen.ip")}`);
Outdated configurations can be updated using a templating system. By passing a template to the creation of the config store, old configurations can be merged with the template to ensure the presence of keys and structures:
const createConfig = require("user-config");
const TEMPLATE = {
ip: "0.0.0.0",
encryption: {
mode: "aes-gcm"
}
}
const config = createConfig("my-app", TEMPLATE);
config.get("encryption.mode"); // "aes-gcm"
When being used in the context of a browser, user-config knows to use localStorage instead of the filesystem. Storage switching is transparent.
FAQs
Easy user application configuration management for node and web applications
We found that user-config 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.