Members
:object
extrasReturn all registered paths that aren't 'system' one, or in other words, any path registered after the app initilization.
Methods
(p_path) → {string}
FULLExpand a path, replacing the %SHORTCUT% variables with their full value.
Opposite of SHORT
.
Parameters:
Name | Type | Description |
---|---|---|
p_path |
string |
Examples:
PATH.FULL('%STYLE%/main.css'); == './style/default/main.css'
(p_path) → {string}
SHORTShrink a path, replacing expanded environment path with their %SHORTCUT%
Opposite of FULL
.
Parameters:
Name | Type | Description |
---|---|---|
p_path |
string |
Examples:
PATH.FULL('./style/default/main.css') == '%STYLE%/main.css'
(p_envShortcut, p_path)
SETRegisters a shortcut/path pair to PATH.
Parameters:
Name | Type | Description |
---|---|---|
p_envShortcut |
string | %MY_SHORTCUT% |
p_path |
string | path/to/foo |
(p_envShortcut)
UNSETRemoves a shortcut from PATH.
Parameters:
Name | Type | Description |
---|---|---|
p_envShortcut |
string |
(p_path) → {string}
dirGet the parent directory path
Parameters:
Name | Type | Description |
---|---|---|
p_path |
string |
(p_path) → {string}
extAttempts to isolate and return the extension from a given path
Parameters:
Name | Type | Description |
---|---|---|
p_path |
string |
Examples:
PATH.name('./style/default/main.css') === '.css'
PATH.name('./style/default/main.css?value=none') === '.css'
(p_path) → {string}
nameAttempt to isolate the last name inside a path.
Parameters:
Name | Type | Description |
---|---|---|
p_path |
string |
Examples:
PATH.name('./style/default/main.css') === 'main'
PATH.name('./style/default/main') === 'main'
PATH.name('./style/default/main/') === 'main'
(p_string) → {string}
SanitizeReplaces \
with /
Parameters:
Name | Type | Description |
---|---|---|
p_string |
string | The string to sanitize |
(p_path) → {string}
stripExtRemove the extension of a filename string.
Parameters:
Name | Type | Description |
---|---|---|
p_path |
string |
Examples:
stripExt('file.ext') === 'file'