Presets

lib/Presets~ Presets

Presets

Constructor

new Presets(preset)

Description:
  • Constructor: set either the default preset or a preset that is passed in.

    If the preset parameter matches one of the predefined sets, use that, otherwise assume it's a custom configuration.

Source:
Parameters:
Name Type Description
preset any

either string with name of predefined set or object with configuration parameters

Methods

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