steveukx / properties

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

How I can save new property value after set it? #29

Closed kanelv closed 4 years ago

kanelv commented 4 years ago
  1. When reading a .ini file, I have tried to set new value for exist property
  2. After that I have tried to save props but It seems can't save new value? How can I deal with it?

This is my code:

const PropertiesReader = require('properties-reader'); const filePath = './docs/XBStation.ini'; const props = PropertiesReader(filePath); props.set('General.Username', 'Nothing on You'); props.save('./docs/_XBStation.ini', (err, data) => { console.log(data); });

kanelv commented 4 years ago

I have dealt with it