sf-preferences

1.0.5 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i sf-preferences

Weekly Downloads

84

Version

1.0.5

License

MIT

Unpacked Size

130 kB

Total Files

11

Last publish

Collaborators

  • arnaudspanneut
  • gplancke
  • nfroidure
  • sebastienelet
  • xavhan