@badeball/cypress-cucumber-preprocessor
Version:
[](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml) [ • 1.01 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.toPosix = void 0;
exports.ensureIsAbsolute = ensureIsAbsolute;
exports.ensureIsRelative = ensureIsRelative;
const node_path_1 = __importDefault(require("node:path"));
function ensureIsAbsolute(root, maybeRelativePath) {
if (node_path_1.default.isAbsolute(maybeRelativePath)) {
return maybeRelativePath;
}
else {
return node_path_1.default.join(root, maybeRelativePath);
}
}
function ensureIsRelative(root, maybeRelativePath) {
if (node_path_1.default.isAbsolute(maybeRelativePath)) {
return node_path_1.default.relative(root, maybeRelativePath);
}
else {
return maybeRelativePath;
}
}
const toPosix = (location) => node_path_1.default.sep === "\\" ? location.replaceAll("\\", "/") : location;
exports.toPosix = toPosix;