MCPcopy
hub / github.com/docsifyjs/docsify / getFileName

Function getFileName

src/core/router/history/base.js:24–30  ·  view source on GitHub ↗
(path, ext)

Source from the content-addressed store, hash-verified

22}
23
24function getFileName(path, ext) {
25 return new RegExp(`\\.(${ext.replace(/^\./, '')}|html)$`, 'g').test(path)
26 ? path
27 : /\/$/g.test(path)
28 ? `${path}README${ext}`
29 : `${path}${ext}`;
30}
31
32export class History {
33 constructor(config) {

Callers 1

getFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…