1export default function CaptureShot(classDef) { 2 return function(opts) { 3 classDef.call(this, opts); 4 this.resolver = () => {}; 5 6 this.answer = async (...values) => { 7 // answer just resolves the promise returned by show 8 this.resolver(values); 9 }; 10 11 this.capture = async (comp, opts) => { 12 const result = await Promise.all([ 13 (async () => { 14 if (comp) await this.show(comp, opts); 15 })(), 16 new Promise(resolve => { 17 this.resolver = resolve; 18 }) 19 ]); 20 return result[1]; 21 } 22 }; 23}
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.