1.0.1 • Published 5 years ago

@lovely.sh/config-manager v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Introduction

An easy to use package for manage json settings file

Installation

  1. Install config-manager
yarn add "@lovely.sh/config-manager"
  1. 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
}
1.0.1

5 years ago

1.0.0

5 years ago