/opt/canhelp/node_modules/next/dist/esm/shared/lib/page-path
NameSizeModeActions
absolute-path-to-page.js14640644editdlrm
absolute-path-to-page.js.map24140644editdlrm
denormalize-app-path.js2070644editdlrm
denormalize-app-path.js.map4470644editdlrm
denormalize-page-path.js6470644editdlrm
denormalize-page-path.js.map11080644editdlrm
ensure-leading-slash.js3060644editdlrm
ensure-leading-slash.js.map5570644editdlrm
get-page-paths.js12830644editdlrm
get-page-paths.js.map20150644editdlrm
normalize-data-path.js4810644editdlrm
normalize-data-path.js.map8940644editdlrm
normalize-page-path.js11240644editdlrm
normalize-page-path.js.map19350644editdlrm
normalize-path-sep.js2910644editdlrm
normalize-path-sep.js.map5340644editdlrm
remove-page-path-tail.js9090644editdlrm
remove-page-path-tail.js.map15140644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/shared/lib/page-path/remove-page-path-tail.js (909B)
import { normalizePathSep } from './normalize-path-sep'; /** * Removes the file extension for a page and the trailing `index` if it exists * making sure to not return an empty string. The page head is not touched * and returned as it is passed. Examples: * - `/foo/bar/baz/index.js` -> `/foo/bar/baz` * - `/foo/bar/baz.js` -> `/foo/bar/baz` * * @param pagePath A page to a page file (absolute or relative) * @param options.extensions Extensions allowed for the page. * @param options.keepIndex When true the trailing `index` is _not_ removed. */ export function removePagePathTail(pagePath, options) { pagePath = normalizePathSep(pagePath).replace(new RegExp("\\.+(?:" + options.extensions.join('|') + ")$"), ''); if (options.keepIndex !== true) { pagePath = pagePath.replace(/\/index$/, '') || '/'; } return pagePath; } //# sourceMappingURL=remove-page-path-tail.js.map