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

Method initPlugin

src/core/Docsify.js:34–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 }
33
34 initPlugin() {
35 [].concat(this.config.plugins).forEach(fn => {
36 try {
37 isFn(fn) && fn(this._lifecycle, this);
38 } catch (err) {
39 if (this.config.catchPluginErrors) {
40 const errTitle = 'Docsify plugin error';
41 console.error(errTitle, err);
42 } else {
43 throw err;
44 }
45 }
46 });
47 }
48}
49
50/**

Callers 1

constructorMethod · 0.95

Calls 1

isFnFunction · 0.90

Tested by

no test coverage detected