@2501-ai/cli
Version:
[](https://www.npmjs.com/package/@2501-ai/cli) [](https://www.2501.ai/research/full-humaneval-benchmark) [![Lic
22 lines (21 loc) • 761 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.sanitizeWindowsOutput = sanitizeWindowsOutput;
exports.isCommandNotFound = isCommandNotFound;
function sanitizeWindowsOutput(output) {
return output
.replace(/\r\n/g, '\n')
.replace(/\r/g, '\n')
.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u009F]/g, '');
}
function isCommandNotFound(output) {
const lowerOutput = output.toLowerCase();
const notFoundIndicators = [
'not recognized as an internal or external command',
'is not recognized',
'command not found',
'was not found',
'could not find',
];
return notFoundIndicators.some((indicator) => lowerOutput.includes(indicator));
}