function isWin(patch) {
    if (!Array.isArray(patch)) {
        patch = [patch];
    }
    return patch.some(function (index) {
        return index.hunks.some(function (hunk) {
        return hunk.lines.some(function (line) {
            return line.endsWith('\r');
        });
        });
    }) && patch.every(function (index) {
        return index.hunks.every(function (hunk) {
        return hunk.lines.every(function (line, i) {
            var _hunk$lines2;
            return line.startsWith('\\') || line.endsWith('\r') || ((_hunk$lines2 = hunk.lines[i + 1]) === null || _hunk$lines2 === void 0 ? void 0 : _hunk$lines2.startsWith('\\'));
        });
        });
    });
    }
Returns true if the patch uses Windows line endings and only Windows line endings.