astro-ghostcms/.pnpm-store/v3/files/95/4a53ae57cff4124cedaecd15e49...

13 lines
290 B
Plaintext

'use strict';
const path = require('path');
module.exports = (childPath, parentPath) => {
const relation = path.relative(parentPath, childPath);
return Boolean(
relation &&
relation !== '..' &&
!relation.startsWith(`..${path.sep}`) &&
relation !== path.resolve(childPath)
);
};