steveukx / properties

Properties reader for Node.js
MIT License
77 stars 33 forks source link

Can't disable creation of sections #45

Closed matheusctro closed 3 years ago

matheusctro commented 3 years ago

The initialization with the parameter 'saveSections: false' is not working. I have to enter property-writer.js and set manually to false.

akhilmanikandan commented 3 years ago

The issue can be fixed by adding the encoding as second parameter

const props = propertiesReader(filePath, 'utf-8', { writer: { saveSections: false } });

keyuls commented 3 years ago

@akhilmanikandan thanks for this tip. It worked.