utils.js 434 B

1234567891011
  1. "use strict";
  2. var __importDefault = (this && this.__importDefault) || function (mod) {
  3. return (mod && mod.__esModule) ? mod : { "default": mod };
  4. };
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. exports.isSubPath = void 0;
  7. const path_1 = __importDefault(require("path"));
  8. const isSubPath = (parent, child) => {
  9. return !path_1.default.relative(parent, child).startsWith('.');
  10. };
  11. exports.isSubPath = isSubPath;