Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
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.
The npm package mini-config receives a total of 0 weekly downloads. As such, mini-config popularity was classified as not popular.
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.