UNPKG

@next-boilerplate/cli-helpers

Version:
13 lines (11 loc) 599 B
/** * Checks if the provided file path is within the current directory scope. * @param filePath The file path to check. * @returns true if the path is within the current directory, false otherwise. * @example * isPathInCurrentScope('./myFile.txt') // true if myFile.txt is in the current directory * isPathInCurrentScope('../myFile.txt') // false if myFile.txt is outside the current directory * isPathInCurrentScope('/myFile.txt') // false if myFile.txt is outside the current directory */ declare function isPathInCurrentScope(filePath: string): boolean; export { isPathInCurrentScope };