A path escapes the package (absolute, .., a drive, a backslash) or appears twice.
..
import { checkPackagePath, PackagePathError } from '@datamoc/mwg/mwl';try { checkPackagePath('../escape.txt');} catch (error) { console.log(error instanceof PackagePathError); // true} Copy
import { checkPackagePath, PackagePathError } from '@datamoc/mwg/mwl';try { checkPackagePath('../escape.txt');} catch (error) { console.log(error instanceof PackagePathError); // true}
A path escapes the package (absolute,
.., a drive, a backslash) or appears twice.Example