What is is-path-cwd?
The `is-path-cwd` npm package is a simple utility that allows you to check if a given path is the current working directory (CWD). This can be particularly useful in applications where the working directory's state or location is relevant to the application's behavior or output. For example, it can be used to prevent certain operations from being performed in the CWD or to validate paths in CLI tools.
Check if a path is the current working directory
This feature allows you to check if a specific path is the current working directory. The function returns `true` if the given path is the CWD, and `false` otherwise. This can be useful for ensuring that certain operations are not performed in the CWD or for validating paths in applications.
const isPathCwd = require('is-path-cwd');
console.log(isPathCwd('.')); // true if the current directory is the CWD
console.log(isPathCwd('/some/other/path')); // false