Last change
on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
427 bytes
|
Line | |
---|
1 | /**
|
---|
2 | Check if a path is inside another path.
|
---|
3 |
|
---|
4 | @example
|
---|
5 | ```
|
---|
6 | import isPathInside = require('is-path-inside');
|
---|
7 |
|
---|
8 | isPathInside('a/b/c', 'a/b');
|
---|
9 | //=> true
|
---|
10 |
|
---|
11 | isPathInside('a/b/c', 'x/y');
|
---|
12 | //=> false
|
---|
13 |
|
---|
14 | isPathInside('a/b/c', 'a/b/c');
|
---|
15 | //=> false
|
---|
16 |
|
---|
17 | isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus');
|
---|
18 | //=> true
|
---|
19 | ```
|
---|
20 | */
|
---|
21 | declare function isPathInside(childPath: string, parentPath: string): boolean;
|
---|
22 |
|
---|
23 | export = isPathInside;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.