(dir: string, count: number)
| 144 | |
| 145 | /** `count` files under `dir`'s lib/ (`lib/f1.php`, …), each defining a function. */ |
| 146 | const libFiles = (dir: string, count: number): Files => |
| 147 | Object.fromEntries(Array.from({ length: count }, (_, i) => [`${dir ? `${dir}/` : ''}lib/f${i + 1}.php`, fn(`f${i + 1}`)])); |
| 148 | /** A page's includes of `/lib/f1.php` … `/lib/f<count>.php` from the web root. */ |
| 149 | const includesOf = (count: number): string => |
| 150 | Array.from({ length: count }, (_, i) => `require_once $_SERVER['DOCUMENT_ROOT'] . '/lib/f${i + 1}.php';`).join('\n'); |
no test coverage detected