Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FuseJS/UserSettings #1310

Merged
merged 8 commits into from
Sep 25, 2019
Merged

FuseJS/UserSettings #1310

merged 8 commits into from
Sep 25, 2019

Conversation

ichan-mb
Copy link
Member

@ichan-mb ichan-mb commented Sep 20, 2019

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:

  • Changelog
  • Documentation
  • Tests

@ichan-mb ichan-mb mentioned this pull request Sep 20, 2019
3 tasks
Source/Fuse.Storage/UserSettingsImpl.uno Outdated Show resolved Hide resolved
Copy link
Contributor

@kusma kusma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is starting to look very good 👍

Source/Fuse.Storage/UserSettingsModule.uno Outdated Show resolved Hide resolved
Source/Fuse.Storage/Json.uno Outdated Show resolved Hide resolved
Copy link
Contributor

@kusma kusma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@kusma kusma merged commit 89236f5 into fuse-open:master Sep 25, 2019
@Nicero
Copy link

Nicero commented Jan 3, 2020

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
Copy link
Contributor

kusma commented Jan 3, 2020

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

Patches welcome!

@Nicero
Copy link

Nicero commented Jan 3, 2020

@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
Copy link
Contributor

kusma commented Jan 3, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants