1(function(){"use strict";self.onmessage=function(e){const{code,testCases}=e.data;let capturedLogs=[];try{const originalLog=console.log;if(console.log=(...s)=>{capturedLogs.push(s.map(t=>String(t)).join(" ")),originalLog.apply(console,s)},!testCases||testCases.length===0){eval(code),self.postMessage({type:"success",logs:capturedLogs.join(` 2`)});return}let runnerCode=` 3 ${code}; 4 5 const __results = []; 6 const __testCases = ${JSON.stringify(testCases)}; 7 8 for (let i = 0; i < __testCases.length; i++) { 9 try { 10 let result = eval(__testCases[i]); 11 __results.push({ testId: i, passed: true, actualOutput: result }); 12 } catch (err) { 13 __results.push({ testId: i, passed: false, error: err.toString() }); 14 } 15 } 16 __results; 17 `;const results=eval(runnerCode);self.postMessage({type:"success",results,logs:capturedLogs.join(` 18`)})}catch(s){self.postMessage({type:"error",error:s.toString(),logs:capturedLogs.join(` 19`)})}}})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.