GitXplorerGitXplorer
M

hjson-config

public
1 stars
0 forks
1 issues

Commits

List of commits on branch master.
Unverified
6f2d5e3fb4908ebfa966e47026688f63b7694f88

1.3.0

MMartinMuzatko committed 5 years ago
Unverified
e80dc8c921b0f76b20009ecd325e31727932d860

merge also supports plain objects now

MMartinMuzatko committed 5 years ago
Unverified
bc2842c2368e00cea029faed6bda4a3c155bba7b

1.2.2

MMartinMuzatko committed 6 years ago
Unverified
2683adb762e5915d6c351bb3ebb4b12ee921641d

1.2.1

MMartinMuzatko committed 6 years ago
Unverified
3ea02103eff9ab840dce573d0f436c13d787ee23

default settings for get function

KKlausTaeger committed 6 years ago
Unverified
38afdd40710068519fee80dda884aba3966f6c6b

retries not a number -> infinite retries

KKlausTaeger committed 6 years ago

README

The README file for this repository.

hjson-config

A file read/write/watch/setProperty wrapper around hjson.

Uses promises. Persists comments

Install

npm install hjson-config

Usage

constructor

const Config = require('hjson-config')

const serverConfig = new Config('./serverconfig.hjson')

get

let servers = await serverConfig.get()

set

servers.ip = '192.168.0.1'
await serverConfig.set(servers)

setProperty

await serverConfig.setProperty('.ip', '192.168.0.1)

watch

serverConfig.watch(newConfig => {
    
})