Function: parsePath()¶
parsePath(
path):ParsedPath
Defined in: core/src/utils/path.ts:35
Parse a PromptScript path reference.
Parameters¶
path¶
string
Path string to parse
Returns¶
ParsedPath
Parsed path components
Throws¶
If path format is invalid
Example¶
parsePath('@core/guards/[email protected]')
// { namespace: 'core', segments: ['guards', 'compliance'], version: '1.0.0', isRelative: false }
parsePath('./local/file')
// { namespace: undefined, segments: ['local', 'file'], version: undefined, isRelative: true }