nathanbuchar / electron-settings

📝 A simple persistent user settings framework for Electron.
https://electron-settings.js.org
MIT License
814 stars 60 forks source link

defaultValue missing in breaking changes list #137

Open julianhille opened 3 years ago

julianhille commented 3 years ago

There was once a defaultValue when using get this has been removed and is not added at the breaking changes list.

Mjinx commented 3 years ago

I second that, after a bit of a head scratch realized there's no reference to defaultValue in source code even though the lodash.get does support default values. :(

Style87 commented 3 years ago

I actually just came here to request this feature. I've written a lot of settings.hasSync(key) ? settings.getSync(key) : defaultValue; and it would be great to change that out with settings.getSync(key, defaultValue);