@valaxyjs/utils 0.26.10 → 0.26.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +11 -1
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -61,5 +61,15 @@ declare function serializeHeader(h: Element): string;
|
|
|
61
61
|
*/
|
|
62
62
|
declare function getHeaders(options?: GetHeadersOptions): MenuItem[];
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Remove git+ prefix from repository URL
|
|
66
|
+
* @param url - Repository URL that may contain git+ prefix
|
|
67
|
+
* @returns Normalized URL without git+ prefix
|
|
68
|
+
* @example
|
|
69
|
+
* normalizeRepositoryUrl('git+https://github.com/user/repo.git')
|
|
70
|
+
* // => 'https://github.com/user/repo.git'
|
|
71
|
+
*/
|
|
72
|
+
declare function normalizeRepositoryUrl(url: string): string;
|
|
73
|
+
|
|
74
|
+
export { addToParent, buildTree, getHeaders, normalizeRepositoryUrl, resolveHeaders, resolvedHeaders, serializeHeader };
|
|
65
75
|
export type { GetHeadersOptions, Header, MenuItem };
|
package/dist/index.mjs
CHANGED
|
@@ -79,4 +79,8 @@ function getHeaders(options = {
|
|
|
79
79
|
return resolveHeaders(headers, options.range);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
function normalizeRepositoryUrl(url) {
|
|
83
|
+
return url.replace(/^git\+/, "");
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { addToParent, buildTree, getHeaders, normalizeRepositoryUrl, resolveHeaders, resolvedHeaders, serializeHeader };
|