|
Download wp-calypso/desktop/app/lib/settings/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 992 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/desktop/app/lib/settings/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/desktop/app/lib/settings/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/desktop/app/lib/settings/README.md
992 Bytes
Settings
Provides user configurable settings which are saved to app.getPath( 'userData' ) (as defined by Electron).
Functions
isDebug() - return whether debug mode is enabled
Defaults to config debug.enabled_by_default
getSetting( setting ) - get a setting value, using default settings if not defined
getSettingGroup( existing, group, values ) - extend the existing values with values from the named settings group
Where:
existing- default values to usegroup- a settings group namevalues- optional array of values to override
saveSetting( group, groupData ) - save groupData to the group named group
Where:
group- a group namegroupData- a JS object or value to save under the group. Overwrites any existing values
Example
settings.getSettingGroup( config.window, 'window', [ 'x', 'y', 'width', 'height' ] )
This uses the default window settings and overrides the X, Y, with, and height values from the configured settings.