1.3.0 • Published 5 years ago

hjson-config v1.3.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

hjson-config

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

Uses promises. Persists comments

npm.io npm.io

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 => {
    
})
1.3.0

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago