Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

123456789101112131415161718192021222324252627
  1. /**
  2. Check if a path is inside another path.
  3. Note that relative paths are resolved against `process.cwd()` to make them absolute.
  4. _Important:_ This package is meant for use with path manipulation. It does not check if the paths exist nor does it resolve symlinks. You should not use this as a security mechanism to guard against access to certain places on the file system.
  5. @example
  6. ```
  7. import isPathInside = require('is-path-inside');
  8. isPathInside('a/b/c', 'a/b');
  9. //=> true
  10. isPathInside('a/b/c', 'x/y');
  11. //=> false
  12. isPathInside('a/b/c', 'a/b/c');
  13. //=> false
  14. isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus');
  15. //=> true
  16. ```
  17. */
  18. declare function isPathInside(childPath: string, parentPath: string): boolean;
  19. export = isPathInside;