(library: string | Record<string, unknown>)
| 12 | } |
| 13 | |
| 14 | export function accessLibrary(library: string | Record<string, unknown>) { |
| 15 | if (typeof library !== 'string') { |
| 16 | return library; |
| 17 | } |
| 18 | |
| 19 | return (window as any)[library] || generateHtmlComp(library); |
| 20 | } |
| 21 | |
| 22 | export function generateHtmlComp(library: string) { |
| 23 | if (['a', 'img', 'div', 'span', 'svg'].includes(library)) { |
no test coverage detected
searching dependent graphs…