# @types/find-root

> TypeScript definitions for find-root

Latest version **1.1.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/find-root
pnpm add @types/find-root
yarn add @types/find-root
bun add @types/find-root
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2023-11-07 |
| First published | 2018-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/find-root
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/find-root
- npm.io page: https://npm.io/package/@types/find-root

## Recent versions

- 1.1.4 (latest) — 2023-11-07
- 1.1.2 (ts3.1) — 2020-08-23
- 1.1.1 (ts2.2) — 2018-03-23
- 1.1.3 — 2023-10-18
- 1.1.0 — 2018-01-17

## README

# Installation
> `npm install --save @types/find-root`

# Summary
This package contains type definitions for find-root (https://github.com/js-n/find-root).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/find-root.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/find-root/index.d.ts)
````ts
type FindRootCheckFn = (dir: string) => boolean;

/**
 * Returns the path for the nearest directory to startingPath containing a package.json file. If a check function is
 * provided, then this will return the nearest directory for which the function returns true.
 * @param startingPath The path to start searching from, e.g. __dirname
 * @param check The check predicate
 * @throws {Error} if package.json cannot be found or if the function never returns true
 */
declare function findRoot(startingPath: string, check?: FindRootCheckFn): string;

export = findRoot;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [Arturas Molcanovas](https://github.com/Alorel).

---
_Source: https://npm.io/package/@types/find-root · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
