MCPcopy Create free account
hub / github.com/markmap/markmap / extractAssets

Function extractAssets

packages/markmap-common/src/loader.ts:123–132  ·  view source on GitHub ↗
(assets: IAssets)

Source from the content-addressed store, hash-verified

121}
122
123export function extractAssets(assets: IAssets) {
124 return [
125 ...(assets.scripts?.map(
126 (item) => (item.type === 'script' && item.data.src) || '',
127 ) || []),
128 ...(assets.styles?.map(
129 (item) => (item.type === 'stylesheet' && item.data.href) || '',
130 ) || []),
131 ].filter(Boolean);
132}
133
134export function mergeAssets(...args: (IAssets | null | undefined)[]): IAssets {
135 return {

Callers 1

fetchAssetsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected