
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
config-kit
Advanced tools
A universal, layered configuration system.
.json
, .js
, and .xml
data storesnpm install config-kit --save
import Config from 'config-kit';
const config = await new Config().init();
await config.set('foo.bar', true);
console.log(config.get('foo')); // { "bar": true }
await config.load('/path/to/myconfig.json');
await config.set('foo.baz', 'pow');
await config.save();
v2 introduces major breaking API changes. This package was refactored to be a ES module.
This means .js
config and schema files also need to be ES modules. Since you can't
synchronously import ES modules, there was no choice but to make nearly every API async.
When creating a new Config
instance, simply prepend with await
and call init()
with the
constructor options:
const cfg = new Config({ /* opts */ });
const cfg = await new Config().init({ /* opts */ });
The following functions are now async: load()
, pop()
, push()
, save()
, set()
, shift()
,
unshift()
.
cfg.load({ file: '/path/to/file' });
cfg.set('foo', 'bar');
cfg.push('baz', 'wiz');
cfg.save();
await cfg.load({ file: '/path/to/file' });
await cfg.set('foo', 'bar');
await cfg.push('baz', 'wiz');
await cfg.save();
This project is open source under the Apache Public License v2 and is developed by
Axway, Inc and the community. Please read the LICENSE
file included
in this distribution for more information.
FAQs
A universal, layered configuration system
The npm package config-kit receives a total of 1,349 weekly downloads. As such, config-kit popularity was classified as popular.
We found that config-kit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.