File tree Expand file tree Collapse file tree 3 files changed +180
-180
lines changed Expand file tree Collapse file tree 3 files changed +180
-180
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ export * from './dedupeHead.js'
22export * from './ensureLeadingSlash.js'
33export * from './ensureEndingSlash.js'
44export * from './formatDateString.js'
5+ export * from './inferRoutePath.js'
56export * from './isLinkExternal.js'
67export * from './isLinkHttp.js'
78export * from './isLinkWithProtocol.js'
89export * from './isPlainObject.js'
9- export * from './inferRoutePath.js'
1010export * from './normalizeRoutePath.js'
1111export * from './omit.js'
1212export * from './removeEndingSlash.js'
Original file line number Diff line number Diff line change 1+ /**
2+ * Infer route path according to the given (markdown file) path
3+ */
14export const inferRoutePath = ( path : string ) : string => {
25 // if the pathname is empty or ends with `/`, return as is
36 if ( ! path || path . endsWith ( '/' ) ) return path
You can’t perform that action at this time.
0 commit comments