Closed ichan-mb closed 5 years ago
Very userful module! Please let me suggest you to add also append and remove for the various methods. In my opinion that would make the module even more effective.
Taking your example:
userSettings.putArray('preferences', ['Technology', 'Cars', 'Foods']);
add 'Music':
userSettings.appendArray('preferences', ['Music']);
result:
preferences = ['Technology', 'Cars', 'Foods', 'Music'];
Same with .removeArray
.
This should be done also for .putString
(.appendString, .removeString) and .putObject
(.appendObject, .removeObject)
Very userful module! Please let me suggest you to add also append and remove for the various methods [...]
Patches welcome!
@kusma Sorry, but I'm not good enough nor in Javascript, nor in Uno or C to allow me to edit a single byte of code of Fuse libs! If I could do it I would be happy to help Fuse development.
@kusma Sorry, but I'm not good enough nor in Javascript, nor in Uno or C to allow me to edit a single byte of code of Fuse libs! If I could do it I would be happy to help Fuse development.
People tend to under-estimate themselves. Give it a try, maybe you'll figure it out? If not, ask for some help figuring it out! People tend to prioritize scratching their own itches over others...
FuseJS/UserSettings
module provides key-value pairs mechanism to store and retrieve primitive data types (string, number, boolean) as well as an array and a JSON object.You can use this module to store information such as configuration data, application states, etc.
This PR contains: