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

Method getCurrentPath

src/core/router/history/html5.js:12–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 }
11
12 getCurrentPath() {
13 const base = this.getBasePath();
14 let path = window.location.pathname;
15
16 if (base && path.indexOf(base) === 0) {
17 path = path.slice(base.length);
18 }
19
20 return (path || '/') + window.location.search + window.location.hash;
21 }
22
23 onchange(cb = noop) {
24 on('click', e => {

Callers

nothing calls this directly

Calls 1

getBasePathMethod · 0.45

Tested by

no test coverage detected