TemplateOpts

templeo/options~ TemplateOpts

Template compilation options. See module:templeo/options.Options for a full listing of options.

Constructor

new TemplateOpts(optsopt)

Template compilation options

Source:
See:
Parameters:
Name Type Attributes Description
opts module:templeo/options.Options <optional>

The template compilation options

Members

(static) defaultOptions

Source:
See:

Methods

(protected, static) defaultOptionMerge(options, to)

Merges option objects into another object

Source:
Parameters:
Name Type Description
options Object

The option object to merge options from

to Object

The object where that will be merged into

build(opts, optd, to, validsopt) → {Object}

Builds the Options by iterating over the dflt (default options) object properties and either adding them to the to object when the opts object does not contain the property value (or it's invalid for that option) or adds the value from opts when the property is present and contains a valid value for the option being iterated. The final to object/properties will be frozen using Object.freeze and Object.defineProperty.

Source:
See:
Parameters:
Name Type Attributes Description
opts module:templeo/options.Options

The template compilation options

optd Object

An object that generatd from TemplateOpts.defaultOptionMerge that contains the default options

Name Type Attributes Description
defaults Object

The object that contains option properties with default property values as the default values

valids Object <optional>

An object that contains option names as properties. Each property value should contain an Array of primitive values that represent valid values for a given option.

to Object

The object where the options will be set- typically a TemplateOpts instance

valids Object <optional>

An object that contains option names as properties. Each property should contain an Array of primitive values that represent valid values for a given option.

Returns:
Type:
Object

The to object


1.0.0 (2019-12-16)

Full Changelog