clear() js
clear User Setting values
FuseJS/UserSettings
module provides key-value pairs mechanism to store and retrieve primitive data types (string, number, boolean) as well as an array and json object.
You can use this module to store information such as configuration data, application states etc.
UserSettings
module is implemented atop NSUserDefaults on iOS and Shared Preferences on Android
<JavaScript>
var userSettings = require("FuseJS/UserSettings")
userSettings.putString('email', 'john.appleseed@example.com');
userSettings.putString('password', 's3c1ReT');
userSettings.putString('api_token', '73awnljqurelcvxiy832a');
userSettings.putBoolean('logged', true);
userSettings.putNumber('state_num', 2);
userSettings.putArray('preferences', ['Technology', 'Cars', 'Foods']);
userSettings.putObject('profile', {
'first_name': 'John',
'last_name': 'Appleseed',
'gender': 'male',
'address': '5 avenue'
'age': 25,
'married': false
});
var email = userSettings.getString('email');
var password = userSettings.getString('password');
var api_token = userSettings.getString('api_token');
var logged = userSettings.getBoolean('logged');
var state_num = userSettings.getNumber('state_num');
var preferences = userSettings.getArray('preferences');
var profile = userSettings.getObject('profile');
</JavaScript>
clear User Setting values
Retrieve a Boolean value from the UserSetting.
Retrieve a Number value from the UserSetting.
Retrieve a Json Object value from the UserSetting.
Retrieve a String value from the UserSetting.
Set a Boolean value in the UserSetting.
Set a Number value in the UserSetting.
Set a JSON value in the UserSetting.
Set a String value in the UserSetting.
remove value based on key.
Returns the file source that will be watched by the Context for changes in Fuse preview. Override in subclasses and return correct file source to support live updates in Fuse preview.