@virtuous/conductor-helpers

1.0.0 • Public • Published

conductor-helpers

Useful helpers functions for Conductor.

Installation

Using npm:

npm i @virtuous/conductor-helpers -S

Usage:

import { getCurrentRoute } from '@virtuous/conductor-helpers';

const route = getCurrentRoute();

API

Function Returns
getCurrentAction() string The most recent history action.
getCurrentRoute() Object|null Returns the current route.
getPreviousRoute() Object|null Returns the previous route.
getRouteById(string id) Object|null Returns a route with the given id.
getRouteStack() Array Returns the complete history stack.
isRouteOpen(string pattern) boolean Returns true if a matching route is found in the history stack.

Dependents (0)

Package Sidebar

Install

npm i @virtuous/conductor-helpers

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

13 kB

Total Files

15

Last publish

Collaborators

  • flomueller
  • richardgorman