Show:
Module: parch

Builds a consistent route path from a set of path segments

Table of Contents

Constructor

Route
(
  • segment
)
Object

Defined in src/route.js:5

Parameters:

Returns:

Object:

path object

Example:

new Route("foo", "/bar", "baz/");
/**
 * {
 *   path: "/foo/bar/baz"
 *   segments: [
 *     RouteSegment,
 *     RouteSegment,
 *     RouteSegment
 *   ]
 * }
 *

Properties

path

String

Defined in src/route.js:33

The path is the fully built path from segments e.g. /foo/bar/baz

segments

Array

Defined in src/route.js:41

All segments that make up this route. Consists of an array of RouteSegments