main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
290 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | const path = require('path');
|
---|
3 |
|
---|
4 | module.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.