Nominally Patriotic Meathead
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

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.

install

npm i sf-preferences

Downloadsweekly downloads

190

version

1.0.5

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability