new Presets()
- Description:
Class that handles all presets
A preset is an object that defines a predefined set of configurable settings. A preset object consists of 3 parts:
- name - the name of the preset, which is just the object index in the list
- description - a description of the preset
- config - the set of configurable settings
The configurable settings are described in the documentation.
- Source:
Methods
__getPaddingCharacterConfig(config) → {object}
- Description:
Get the padding character configuration
- Source:
Parameters:
Name | Type | Description |
---|---|---|
config |
object | the config to fix |
Returns:
- the object with the normalized properties
- Type
- object
__getSeparatorConfig(config) → {object}
- Description:
Get the separator configuration
- Source:
Parameters:
Name | Type | Description |
---|---|---|
config |
object | the config to fix |
Returns:
- the object with the normalized properties
- Type
- object
config() → {object}
- Description:
Get the config part of the current preset
- Source:
Returns:
- the preset
- Type
- object
description() → {string}
- Description:
Get the description of the preset
- Source:
Returns:
- the description of the preset
- Type
- string
getCurrent() → {object}
- Description:
Get the current preset
- Source:
Returns:
- the preset
- Type
- object
getPresets() → {Array}
- Description:
Get the list of available presets
- Source:
Returns:
keys of presets
- Type
- Array
name() → {string}
- Description:
Get the name of the preset, e.g. DEFAULT
- Source:
Returns:
- the name of the preset
- Type
- string
(static) getDefault() → {object}
- Description:
Get the default preset
- Source:
Returns:
- the preset
- Type
- object