MCPcopy Index your code
hub / github.com/markmap/markmap / addClass

Function addClass

packages/markmap-common/src/util.ts:27–33  ·  view source on GitHub ↗
(className: string, ...rest: string[])

Source from the content-addressed store, hash-verified

25}
26
27export function addClass(className: string, ...rest: string[]): string {
28 const classList = (className || '').split(' ').filter(Boolean);
29 rest.forEach((item) => {
30 if (item && classList.indexOf(item) < 0) classList.push(item);
31 });
32 return classList.join(' ');
33}
34
35export function wrapFunction<T extends unknown[], U>(
36 fn: (...args: T) => U,

Callers 1

updateStyleMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected