@rafapaezbas/simple-config

2.2.0 • Public • Published

Simple-config

A super simple opinionated persistent configuration mechanism.

const configFolder = path.join(os.homedir(), '.example')

const defaultConfig = {
 foo: 'bar',
}
const { getConfig, setConfig } = require('simple-config')(configFolder, defaultConfig)
await setConfig('hello', 'world') # persist config in configFolder

console.log(await getConfig('hello')) # world
console.log(await getConfig('foo')) # bar

Readme

Keywords

none

Package Sidebar

Install

npm i @rafapaezbas/simple-config

Weekly Downloads

1

Version

2.2.0

License

ISC

Unpacked Size

1.64 kB

Total Files

3

Last publish

Collaborators

  • rafapaezbas