{"ScriptPreparationCode":"var parentIds = (new Array(500_000)).map(i =\u003E \u0060http://parent/${i}\u0060);\r\nvar activeParentIds = parentIds.filter((_, i) =\u003E i % 2 === 0);\r\nvar pendingChildren = parentIds.reduce((acc, parentId) =\u003E ({\r\n ...acc,\r\n [parentId \u002B \u0027|A\u0027]: true,\r\n [parentId \u002B \u0027|B\u0027]: false,\r\n [parentId \u002B \u0027|C\u0027]: true,\r\n}), {})","TestCases":[{"Name":"Recursive Iteration","Code":"Object.entries(pendingChildren).some(([childKey, isPending]) =\u003E isPending \u0026\u0026 activeParentIds.some(parentId =\u003E childKey.startsWith(parentId \u002B \u0027|\u0027)))","IsDeferred":false},{"Name":"Dynamic RegExp","Code":"var regex = new RegExp(\u0027/^\u0027 \u002B activeParentIds.join(\u0027|\u0027) \u002B \u0027\\|\u0027)\r\nObject.entries(pendingChildren).some(([childKey, isPending]) =\u003E isPending \u0026\u0026 regex.test(childKey))","IsDeferred":false}]}