@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 CHANGED
@@ -61,5 +61,15 @@ declare function serializeHeader(h: Element): string;
61
61
  */
62
62
  declare function getHeaders(options?: GetHeadersOptions): MenuItem[];
63
63
 
64
- export { addToParent, buildTree, getHeaders, resolveHeaders, resolvedHeaders, serializeHeader };
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
- export { addToParent, buildTree, getHeaders, resolveHeaders, resolvedHeaders, serializeHeader };
82
+ function normalizeRepositoryUrl(url) {
83
+ return url.replace(/^git\+/, "");
84
+ }
85
+
86
+ export { addToParent, buildTree, getHeaders, normalizeRepositoryUrl, resolveHeaders, resolvedHeaders, serializeHeader };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@valaxyjs/utils",
3
3
  "type": "module",
4
- "version": "0.26.10",
4
+ "version": "0.26.13",
5
5
  "description": "A utility library for Valaxy",
6
6
  "author": {
7
7
  "name": "Valaxy",