public static function dump(
        iterable $row,
        string $delimiter = ',',
        string $enclosure = '"',
        string $escape = '\\'
    ): string {
        $row = Arr::from($row);

        $res = fopen('php://temp', 'r+');

        try {
            $written = Thrower::call('fputcsv', $res, $row, $delimiter, $enclosure, $escape);
            $out = stream_get_contents($res, -1, 0);
        } catch (\Throwable $e) {
            throw new \RuntimeException('Failed to write CSV row.', 0, $e);
        } finally {
            fclose($res);
            unset($res);
        }

        if ($written === 0 || $written === false) {
            throw new \RuntimeException('Failed to write CSV row.');
        }

        return $out;
    }