Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PathTree<T>

PathTree - represents a path as a tree structure

Type parameters

  • T

Hierarchy

  • PathTree

Index

Methods

add

  • add(path: string, value: T): void
  • Adds a path

    Parameters

    • path: string
    • value: T

    Returns void

clear

  • clear(): void

Private createNode

  • createNode(key: string, lastIndex: number, index: number, value: T, parentNode: IPathNode<T>): IPathNode<T>

get

  • get(path: string): T
  • Gets a value by path

    Parameters

    • path: string

    Returns T

Private removeExtraSlashes

  • removeExtraSlashes(path: string): string

Object literals

Private rootNode

rootNode: object

children

children: object

Type declaration

Generated using TypeDoc