(data, ...arg)
| 4 | const require = createRequire(import.meta.url); |
| 5 | |
| 6 | const includes = (data, ...arg) => { |
| 7 | const isComma = typeof data.scope === 'string' && data.scope.includes(','); |
| 8 | const scope = typeof data.scope === 'string' ? data.scope.split(isComma ? ',' : ' ').filter(Boolean).map(t => t.trim()) : data.scope || []; |
| 9 | const isInclude = !![scope||[]].flat().find(elm => arg.includes(elm)); |
| 10 | return isInclude ? getForeground(data.settings.foreground) : undefined; |
| 11 | } |
| 12 | const getForeground = (str) => typeof str === 'string' ? str : null; |
| 13 | |
| 14 | function format(data = {}, dark = false) { |
no test coverage detected
searching dependent graphs…