@lovely.sh/config-manager
v1.0.1
Published
An easy to use package for manage json settings file
Downloads
2
Readme
Introduction
An easy to use package for manage json settings file
Installation
- Install config-manager
yarn add "@lovely.sh/config-manager"
- Use config-manager in your application
const cfg = require('@lovely.sh/config-manager');
Demo
See demo folder
Functions
Create and load config file:
const settings = cfg.createAndLoad(configPath);
Create config file:
cfg.create(filePath));
Load config file:
const settings = cfg.load(configPath);
Write in config file:
cfg.save(configPath, settings);
Check if config file exist:
if (cfg.exist(configPath)) {
// code
}