Skip to content

Interface: TemplatingOptions ​

The options of templating.

Properties ​

ignoreMissing? ​

optional ignoreMissing?: boolean

Whether a placeholder without value is left as is in the output ({name}), instead of throwing a MissingValueError.

Default ​

ts
false

transform? ​

optional transform?: (__namedParameters) => any

Transform each value before it is inserted: given the value found (undefined when missing) and the placeholder's key, it returns the value to insert. Returning undefined makes the placeholder missing.

Parameters ​

__namedParameters ​
key ​

string

value ​

any

Returns ​

any

Default ​

ts
the value unchanged

Released under the MIT License.