(type: 'log' | 'warn' | 'error', str: string, onlyOnce?: boolean)
| 28 | && console.warn && console.log; |
| 29 | |
| 30 | function outputLog(type: 'log' | 'warn' | 'error', str: string, onlyOnce?: boolean) { |
| 31 | if (hasConsole) { |
| 32 | if (onlyOnce) { |
| 33 | if (storedLogs[str]) { |
| 34 | return; |
| 35 | } |
| 36 | storedLogs[str] = true; |
| 37 | } |
| 38 | // eslint-disable-next-line |
| 39 | console[type](ECHARTS_PREFIX + str); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | export function log(str: string, onlyOnce?: boolean) { |
| 44 | outputLog('log', str, onlyOnce); |
no outgoing calls
no test coverage detected
searching dependent graphs…