Closed Andreas-Schoenefeldt closed 4 years ago
I would love to have this feature as I'm reading and hopefully writing Java property files, thanks.
I would love to have this feature too, that's exactly what I need
@steveukx, any chance this can be merged? If yes I'm happy to resolve the conflicts :)
Apologies for not having followed this thread. Since this PR was opened, the library was updated to allow for using a custom property appender (for use when calling properties.set(...)
.
I've made a similar change now (available on npm as version 2.1.1) that allows providing writer properties. To achieve this you can now call:
const propertiesReader = require('properties-reader');
const props = propertiesReader(filePath, 'utf-8', { writer: { saveSections: false } });
Hi @steveukx, thx a lot for this super usefull library!
In my project I need property files without the section feature, so I would be greatfull, if you could review and maybe merge this PR.
In a nutshell it makes it possible to initalize the reader now like this, in order to prevent sections on writing:
Please let me know, if you're not happy with the way I introduced options - I thought it the least disturbing for projects already depending on the current code.
Best wishes! Andreas