- findAncestor(currentPath, callback): Promise<string | undefined>
Parameters
- currentPath: string
- callback: ((path: string) => Promise<boolean>)
- (path): Promise<boolean>
Returns Promise<boolean>
Returns Promise<string | undefined>
- findAncestor(currentPath, callback): string | undefined
Parameters
- currentPath: string
- callback: ((path: string) => boolean)
- (path): boolean
Returns boolean
Returns string | undefined
- findAncestor(currentPath, callback): MaybePromise<string | undefined>
Parameters
- currentPath: string
- callback: ((path: string) => MaybePromise<boolean>)
Returns MaybePromise<string | undefined>
Find an ancestor file path that matches the given
callback
. If no matches are found all the way up until the system root, this returnsundefined
.Returns
undefined
if no matches are found.Package
@augment-vir/node