sindresorhus / find-up Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stopAt option
#54
Add stopAt option
#54
Conversation
readme.md
Outdated
| Type: `string`\ | ||
| Default: `path.parse(cwd).root` | ||
|
|
||
| The absolute path to the directory to stop the search before reaching root if there were no matches before the `stopAt` directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it have to be an absolute path? I think you can just path.resolve(cwd, stopAt) the input path you get from the user.
|
Thanks for working on this. You need to add types to index.d.ts too. |
|
Thanks for the feedback. Fixed both issues in: Could you please have a look? |
index.d.ts
Outdated
| @@ -8,6 +8,8 @@ export const findUpStop: unique symbol; | |||
|
|
|||
| export type Match = string | typeof findUpStop | undefined; | |||
|
|
|||
| export type Options = LocatePathOptions & {stopAt?: string}; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stopAt option needs docs: https://github.com/sindresorhus/typescript-definition-style-guide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added docs:
c2134ed

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Fixes #49.