(ctx, recurseTimes, entries, state)
| 2433 | } |
| 2434 | |
| 2435 | function formatSetIterInner(ctx, recurseTimes, entries, state) { |
| 2436 | const maxArrayLength = MathMax(ctx.maxArrayLength, 0); |
| 2437 | const maxLength = MathMin(maxArrayLength, entries.length); |
| 2438 | const output = new Array(maxLength); |
| 2439 | ctx.indentationLvl += 2; |
| 2440 | for (let i = 0; i < maxLength; i++) { |
| 2441 | output[i] = formatValue(ctx, entries[i], recurseTimes); |
| 2442 | } |
| 2443 | ctx.indentationLvl -= 2; |
| 2444 | if (state === kWeak && !ctx.sorted) { |
| 2445 | // Sort all entries to have a halfway reliable output (if more entries than |
| 2446 | // retrieved ones exist, we can not reliably return the same output) if the |
| 2447 | // output is not sorted anyway. |
| 2448 | ArrayPrototypeSort(output); |
| 2449 | } |
| 2450 | const remaining = entries.length - maxLength; |
| 2451 | if (remaining > 0) { |
| 2452 | ArrayPrototypePush(output, remainingText(remaining)); |
| 2453 | } |
| 2454 | return output; |
| 2455 | } |
| 2456 | |
| 2457 | function formatMapIterInner(ctx, recurseTimes, entries, state) { |
| 2458 | const maxArrayLength = MathMax(ctx.maxArrayLength, 0); |
no test coverage detected
searching dependent graphs…