UNPKG

@contentstack/cli-utilities

Version:

Utilities for contentstack projects

10 lines (9 loc) 340 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.pathValidator = void 0; const path_1 = require("path"); const pathValidator = (filePath) => { return (0, path_1.normalize)((0, path_1.resolve)(process.cwd(), filePath)).replace(/^(\.\.(\/|\\|$))+/, ""); ; }; exports.pathValidator = pathValidator;