source: trip-planner-front/node_modules/is-path-inside/index.js@ ceaed42

Last change on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 319 bytes
Line 
1'use strict';
2const path = require('path');
3const pathIsInside = require('path-is-inside');
4
5module.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};
Note: See TracBrowser for help on using the repository browser.