lwitzani / homebridgeStatusWidget

MIT License
371 stars 143 forks source link

"Pretty-printing" Stored configuration into JSON (overwritePersistedConfig = true) #34

Closed DannyBoyKN closed 3 years ago

DannyBoyKN commented 3 years ago

Could it be possible to add a 3rd argument to JSON.stringify and pretty-print the configuration, for better readability and editing ? Eg.:

...
function persistObject(fm, object, path) {
    let raw = JSON.stringify(object, null, 2);
    fm.writeString(path, raw);
}
...

Refer to official doc

lwitzani commented 3 years ago

I Can look into it

lwitzani commented 3 years ago

i added it :)

DannyBoyKN commented 3 years ago

Top :ok_hand: