sf-preferences
Easily manage SimpliField preferences.
API
Functions
- query(name, fallbackValue, ...preferences) ⇒
String
|Boolean
|Number
Query several preferences sets for a given name
- get(preferences, name) ⇒
String
|Boolean
|Number
Get the value for a preference name in the given preferences set
- set(preferences, name, value) ⇒
Array
Set the preference name to the given value in the given preferences set
sf-preferences
String
| Boolean
| Number
query(name, fallbackValue, ...preferences) ⇒ Query several preferences sets for a given name
Kind: global function
Returns: String
| Boolean
| Number
- The resolved value
Param | Type | Description |
---|---|---|
name | String |
The preference name to query for. |
fallbackValue | String | Boolean | Number |
The default value to fallback to. |
...preferences | Array |
The preferences set in wich to look for |
String
| Boolean
| Number
get(preferences, name) ⇒ Get the value for a preference name in the given preferences set
Kind: global function
Returns: String
| Boolean
| Number
- The value to set to.
Param | Type | Description |
---|---|---|
preferences | Array |
The preferences set to search in |
name | String |
The preference name. |
Array
set(preferences, name, value) ⇒ Set the preference name to the given value in the given preferences set
Kind: global function
Returns: Array
- The modified preferences set
Param | Type | Description |
---|---|---|
preferences | Array |
The preferences set to modify |
name | String |
The preference name to set. |
value | String | Boolean | Number |
The value to set to. |