(fn)
| 119 | * @param fn |
| 120 | */ |
| 121 | export function stringifyFunction(fn) { |
| 122 | let str = fn.toString() |
| 123 | // If it was defined in object method/property format, it needs to be modified |
| 124 | if (!/^function/.test(str) && /^\w+\s*\(/.test(str)) { |
| 125 | str = 'function ' + str |
| 126 | } |
| 127 | return str |
| 128 | } |
| 129 | |
| 130 | |
| 131 | function getWorker(workerId) { |
no outgoing calls
no test coverage detected