# recursive-watch

> Minimal recursive file watcher

Latest version **1.1.4** (published 2018-03-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install recursive-watch
pnpm add recursive-watch
yarn add recursive-watch
bun add recursive-watch
```

Provides the command `recursive-watch`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2018-03-28 |
| First published | 2017-01-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 83 |
| Author | Mathias Buus |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/recursive-watch
- Repository: https://github.com/mafintosh/recursive-watch
- Issues: https://github.com/mafintosh/recursive-watch/issues
- npm.io page: https://npm.io/package/recursive-watch

## Dependencies (1)

- [ttl](https://npm.io/package/ttl.md) ^1.3.0

## Recent versions

- 1.1.4 (latest) — 2018-03-28
- 1.1.3 — 2018-01-27
- 1.1.2 — 2017-05-25
- 1.1.1 — 2017-01-24
- 1.1.0 — 2017-01-23
- 1.0.0 — 2017-01-19

## README

# recursive-watch

Minimal recursive file watcher.

Uses the native recursive `fs.watch` option on macOS/Windows and basic recursive dir watching on Linux

```
npm install recursive-watch
```

## Usage

``` js
var watch = require('recursive-watch')

watch('./a-file-or-directory', function (filename) {
  console.log('something changed with', filename)
})
```

## API

#### `var unwatch = watch(path, onchange)`

Watch a directory or filename. Calls the `onchange` function if the path changed in anyway.
Call the `unwatch` function to stop watching the path.

## License

MIT

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