Files
ThreatHunt/frontend/node_modules/is-path-inside/index.js
mblanke 3c7e9b9eee CLAUDE branch
i made have screwed the pooch with this
2025-06-17 07:43:33 -04:00

13 lines
290 B
JavaScript

'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)
);
};