MCPcopy Index your code
hub / github.com/omkarcloud/botasaurus / isErrorsInstance

Function isErrorsInstance

js/botasaurus-js/src/utils.ts:17–25  ·  view source on GitHub ↗
(instances: any[], error: any)

Source from the content-addressed store, hash-verified

15}
16
17function isErrorsInstance(instances: any[], error: any): [boolean, number] {
18 for (let i = 0; i < instances.length; i++) {
19 const ins = instances[i];
20 if (error instanceof ins) {
21 return [true, i];
22 }
23 }
24 return [false, -1];
25}
26
27function removeNones<A>(list: (A | null)[]): A[] {
28 return list.filter((element): element is A => element !== null);

Callers 2

runTaskFunction · 0.90
runPlaywrightFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected