Home Reference Source Test Repository

Function

Static Public Summary
public

arrayContainsItem(array: object, value: object, options: object): string

Does an array contain a value?

public

capSplitAndJoin(joiner: string, options: object): string

Split a string by capital letters and then re-join by another.

public

compareValues(lvalue: object, operator: object, rvalue: object, options: object): string

Compare two values with a predicate to determine some equivelence relation.

public

generateTask(taskOptions: *): *

Generate a new instance of the task with the specified options.

public

Convert a block to lowercase

public

Drop-case the first letter of a string

public

propertyValueExtract(context: object, name: string, propName: string, options: object): string

Extract the name of a property with a handlebars-unfriendly name, such as hyphenated names.

public

Convert a block to uppercase

public

Capitalize the first letter of a string

public

withContext(variable: object, options: object): string

Sub-context creation for a specific variable.

public

withDefinition(property: object, definitionMap: object, options: object): string

Process the primary block if the specified property has a schema/$ref linkage, and the inverse block if not.

Static Public

public arrayContainsItem(array: object, value: object, options: object): string source

Does an array contain a value?

Params:

NameTypeAttributeDescription
array object

Array to scan

value object

Value to find

options object

Handlebars options.

Return:

string

Result

public capSplitAndJoin(joiner: string, options: object): string source

Split a string by capital letters and then re-join by another.

Params:

NameTypeAttributeDescription
joiner string

String to join with

options object

Handlebars options.

Return:

string

Handlebars result

public compareValues(lvalue: object, operator: object, rvalue: object, options: object): string source

Compare two values with a predicate to determine some equivelence relation.

Params:

NameTypeAttributeDescription
lvalue object

Left operand

operator object

Comparison operators

rvalue object

Right operand

options object

Handlebars options.

Return:

string

Result

public generateTask(taskOptions: *): * source

Generate a new instance of the task with the specified options.

Params:

NameTypeAttributeDescription
taskOptions *

Task options for the plugin.

Return:

*

Streaming task for processing objects.

public lowercaseBlock(options: object): string source

Convert a block to lowercase

Params:

NameTypeAttributeDescription
options object

Handlebars options.

Return:

string

Handlebars result

public lowercaseFirstLetter(options: object): string source

Drop-case the first letter of a string

Params:

NameTypeAttributeDescription
options object

Handlebars options.

Return:

string

Original string with lowercased first letter.

public propertyValueExtract(context: object, name: string, propName: string, options: object): string source

Extract the name of a property with a handlebars-unfriendly name, such as hyphenated names. Sets the property called name into context.propName if it exists and excutes the first block with context value.

Executes inverse block otherwise.

Params:

NameTypeAttributeDescription
context object

Object to look in.

name string

Property name

propName string

New target property name.

options object

Handlebars options.

Return:

string

Handlebars result

public uppercaseBlock(options: object): string source

Convert a block to uppercase

Params:

NameTypeAttributeDescription
options object

Handlebars options.

Return:

string

Handlebars result

public uppercaseFirstLetter(options: object): string source

Capitalize the first letter of a string

Params:

NameTypeAttributeDescription
options object

Handlebars options.

Return:

string

Original string with capitalized first letter.

public withContext(variable: object, options: object): string source

Sub-context creation for a specific variable.

Params:

NameTypeAttributeDescription
variable object

New context.

options object

Handlebars options.

Return:

string

Handlebars output

public withDefinition(property: object, definitionMap: object, options: object): string source

Process the primary block if the specified property has a schema/$ref linkage, and the inverse block if not.

Params:

NameTypeAttributeDescription
property object

Property to check

definitionMap object

Definitions map

options object

Handlebars options.

Return:

string

Handlebars output