source: imaps-frontend/node_modules/is-path-inside/index.d.ts

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 758 bytes
RevLine 
[d565449]1/**
2Check if a path is inside another path.
3
4Note that relative paths are resolved against `process.cwd()` to make them absolute.
5
6_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.
7
8@example
9```
10import isPathInside = require('is-path-inside');
11
12isPathInside('a/b/c', 'a/b');
13//=> true
14
15isPathInside('a/b/c', 'x/y');
16//=> false
17
18isPathInside('a/b/c', 'a/b/c');
19//=> false
20
21isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus');
22//=> true
23```
24*/
25declare function isPathInside(childPath: string, parentPath: string): boolean;
26
27export = isPathInside;
Note: See TracBrowser for help on using the repository browser.