Find a file or directory by walking up parent directories โ Zero dependencies
by sindresorhusJavaScript
Last 12 weeks ยท 0 commits
4 of 6 standards met
Adds a option to both and functions, allowing users to limit the maximum number of parent directories to traverse. This is useful for scenarios where you want to restrict searches to a specific depth. Defaults to to maintain backward compatibility Works with both file and directory searches Respects option when both are specified closes #6
Repository: sindresorhus/find-up-simple. Description: Find a file or directory by walking up parent directories โ Zero dependencies Stars: 84, Forks: 4. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Latest release: v1.0.1 (1y ago). Open PRs: 0, open issues: 0. Last activity: 9mo ago. Community health: 85%. Top contributors: sindresorhus, privatenumber.
Nice library! I have a use case where I need to limit the number of parent directories to traverse before stopping the search. Would be useful to add a option to control the maximum search depth.
Hi, I'm encountering an issue with when using it in combination with Lefthook and cspell under Node.js v20.6.1. The error message is as follows: Reproduction Steps 1. Setup Lefthook: Create a configuration with the following hook: 2. Install Dependencies: Ensure you have , , and installed as dependencies. 3. Run Lefthook: Make a commit that triggers the hook. Issue Details The above setup leads to the following error due to the use of optional chaining () in : It seems like this might be a compatibility issue with the latest Node.js version. Could you please investigate and advise on how to resolve this? Thank you!