node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »

sf-preferences

sf-preferences

Easily manage SimpliField preferences.

NPM version Build status Dependency Status devDependency Status Coverage Status Code Climate

API

sf-preferences
## 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 ## query(name, fallbackValue, ...preferences) ⇒ String | Boolean | Number 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

## get(preferences, name) ⇒ String | Boolean | Number 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.

## set(preferences, name, value) ⇒ Array 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.