fuse-open / fuselibs

Fuselibs is the Uno-libraries that provide the UI framework used in Fuse apps
https://npmjs.com/package/@fuse-open/fuselibs
MIT License
176 stars 72 forks source link

FuseJS/UserSettings #1310

Closed ichan-mb closed 5 years ago

ichan-mb commented 5 years ago

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:

Nicero commented 4 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)

kusma commented 4 years ago

Very userful module! Please let me suggest you to add also append and remove for the various methods [...]

Patches welcome!

Nicero commented 4 years ago

@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 commented 4 years ago

@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...