source: frontend/node_modules/is-path-inside/index.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 290 bytes
Line 
1'use strict';
2const path = require('path');
3
4module.exports = (childPath, parentPath) => {
5 const relation = path.relative(parentPath, childPath);
6 return Boolean(
7 relation &&
8 relation !== '..' &&
9 !relation.startsWith(`..${path.sep}`) &&
10 relation !== path.resolve(childPath)
11 );
12};
Note: See TracBrowser for help on using the repository browser.