Home Reference Source Test Repository
import Paths from 'trek/src/Paths.js'
public class | source

Paths

Constructor Summary

Public Constructor
public

constructor(root: String, formats: String)

Member Summary

Public Members
public
public

formats: *

public

root: *

Method Summary

Public Methods
public

get(key: String, absolute: Boolean): String

Get the path with the key path from paths
public
Get the path pattern with the `key` path from paths
public

set(key: String, value: Object | String): Paths

Set the `value` with the `key` path onto paths

Public Constructors

public constructor(root: String, formats: String) source

Params:

NameTypeAttributeDescription
root String

The root path

formats String
  • optional
  • default: 'toml|json|js|yml'

The formats can parse and render

Public Members

public blueprint: * source

public formats: * source

public root: * source

Public Methods

public get(key: String, absolute: Boolean): String source

Get the path with the key path from paths

Params:

NameTypeAttributeDescription
key String

The key path

absolute Boolean
  • optional
  • default: false

Relative or absolute path

Return:

String

path

public getPattern(key: String): String source

Get the path pattern with the key path from paths

Params:

NameTypeAttributeDescription
key String

The key path

Return:

String

The file path

public set(key: String, value: Object | String): Paths source

Set the value with the key path onto paths

Params:

NameTypeAttributeDescription
key String

The key path

value Object | String

[value=key]

Return:

Paths