harperdb
Version:
HarperDB is a distributed database, caching service, streaming broker, and application development platform focused on performance and ease of use.
16 lines (15 loc) • 740 B
TypeScript
export declare class InvalidBaseURLPathError extends Error {
constructor(urlPath: string);
}
/**
* Resolve the base URL path based on the component name and `urlPath` configuration option.
*
* For example, resolving the component config `urlPath` value for component `test-component`:
* - `undefined`, `''`, `'/'` -> `'/'`
* - `'static'`, `'/static/'`, `'/static'`, `'static/'` -> `'/static/'`
* - `'v1/static'`, `'/v1/static/'`, `'/v1/static'`, `'v1/static/'` -> `'/v1/static/'`
* - `'./static'`, `'./static/'` -> `'/test-component/static/'`
* - `'.'`, `'./'` -> `'/test-component/'`
* - `'..'`, `'../'`, `'../static'`, `'./..'` -> Error
*/
export declare function resolveBaseURLPath(name: string, urlPath?: string): string;