index.d.ts 427 B

1234567891011121314151617181920212223
  1. /**
  2. Check if a path is inside another path.
  3. @example
  4. ```
  5. import isPathInside = require('is-path-inside');
  6. isPathInside('a/b/c', 'a/b');
  7. //=> true
  8. isPathInside('a/b/c', 'x/y');
  9. //=> false
  10. isPathInside('a/b/c', 'a/b/c');
  11. //=> false
  12. isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus');
  13. //=> true
  14. ```
  15. */
  16. declare function isPathInside(childPath: string, parentPath: string): boolean;
  17. export = isPathInside;