UNPKG

@micro-os-plus/hello-world-qemu-template

Version:

A source xPack / npm package with a template to generate semihosted Hello World projects running on QEMU

13 lines (10 loc) 292 B
import path from 'node:path'; export default function isPathInside(childPath, parentPath) { const relation = path.relative(parentPath, childPath); return Boolean( relation && relation !== '..' && !relation.startsWith(`..${path.sep}`) && relation !== path.resolve(childPath) ); }