Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.