Class: module:services/route-builder

module:services/route-builder(attrs)

new module:services/route-builder(attrs)

Creates a RouteBuilder object.

Parameters:
Name Type Description
attrs object

Refer to individual attributes

Properties
Name Type Description
base string

Base URL, defaults to ''

Source:

Members

format

Get the format components separated by '/'

Source:

Methods

push(format, capture) → {object}

Saves the format and capture values in the RouteBuilder instance.

Parameters:
Name Type Description
format string

Pattern based on path-to-regex, for example: (?:(.+)\.)?${serviceBaseUrl}

capture string

Value to capture

Source:
Returns:

RouteBuilder instance for chaining

Type
object

toObject() → {object}

Returns a new object based on RouteBuilder instance containing its base, format and capture properties.

Source:
Returns:

Object containing base, format and capture properties of the RouteBuilder instance

Type
object