UNPKG

@badeball/cypress-cucumber-preprocessor

Version:

[![Build status](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml/badge.svg)](https://github.com/badeball/cypress-cucumber-preprocessor/actions/workflows/build.yml) [![Npm package weekly downloads](https://badgen.net/n

28 lines (27 loc) 1.01 kB
"use strict"; 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;