Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
mini-config
Advanced tools
Minimal configuration provider with guard for undefined values, and resetting them.
Minimal wrapper around a Map
that tries to protect you from referencing undefined variables, or from redefining keys at runtime.
Rationale is that sometimes, you just want something very straightforward to setup config variables and pass them around, without the overhead of a large scale module, although sometimes that's needed. A warning if some broken code is overwriting config, or if you are mistyping / referencing a non-existent key is also handy.
$ npm install --save mini-config
// project-config.js or whatever
const makeConfig = require('mini-config');
const config = makeConfig(); // module exports a single function, that returns a new guarded cache per invocation
config.set('foo','bar');
config.set('baz', false);
try {
config.set('foo','bla'); // throws, as this key has already been set
config.get('bla'); // also throws as this key does not exist.
} catch(e) {
console.log(e);
}
export default config;
The backing cache is an ES6 Map
, so be sure to polyfill if using in older environments.
FAQs
Minimal configuration provider with guard for undefined values, and resetting them.
We found that mini-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
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.