aswi2020vldc-gitlab/templetes/node_modules/is-path-inside/index.js @ 80b3a14c
1 |
'use strict'; |
---|---|
2 |
const path = require('path'); |
3 |
const pathIsInside = require('path-is-inside'); |
4 |
|
5 |
module.exports = (childPath, parentPath) => { |
6 |
childPath = path.resolve(childPath); |
7 |
parentPath = path.resolve(parentPath); |
8 |
|
9 |
if (childPath === parentPath) { |
10 |
return false; |
11 |
}
|
12 |
|
13 |
return pathIsInside(childPath, parentPath); |
14 |
};
|