# win-watcher

> Get killed, started, running, on top processes on Windows

Latest version **1.0.5** (published 2017-04-08) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install win-watcher
pnpm add win-watcher
yarn add win-watcher
bun add win-watcher
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2017-04-08 |
| First published | 2017-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 0 |
| Author | Francesco Cannizzaro |
| Maintainers | fcannizzaro |
| Keywords | process, processes, windows |

## Links

- npm: https://www.npmjs.com/package/win-watcher
- Repository: https://github.com/fcannizzaro/win-watcher
- Homepage: https://github.com/fcannizzaro/win-watcher#readme
- Issues: https://github.com/fcannizzaro/win-watcher/issues
- npm.io page: https://npm.io/package/win-watcher

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2017-04-08
- 1.0.4 — 2017-01-17
- 1.0.3 — 2017-01-15
- 1.0.2 — 2017-01-15
- 1.0.1 — 2017-01-15
- 1.0.0 — 2017-01-15

## README

# win-watcher
Get killed, started, running, top processes on Windows

[![npm](https://img.shields.io/npm/v/win-watcher.svg)](https://www.npmjs.com/package/win-watcher)
[![npm](https://img.shields.io/npm/dm/win-watcher.svg)](https://www.npmjs.com/package/win-watcher)

# Install

```sh
npm i --save win-watcher
```

### Requirements
[node-gyp](https://github.com/nodejs/node-gyp#installation) to build **src/win.cc**

# Usage

```javascript
var windows = require('win-watcher')
var win = windows(500,250)

win.on('focus', p => {
  console.log('  >> Top Process: %s <<', p)
})

win.on('kill', p => {
  console.log('  >> Killed Process: %s <<', p)
})

win.on('start', p => {
  console.log('  >> Started Process: %s <<', p)
})
```

# Functions

### module(runningInterval, focusInterval)

- `Number` runningInterval: milliseconds for check new/killed processes. (**Default** 500)

- `Number` focusInterval: milliseconds of interval for check top process. (**Default** 200)

### isRunning(process)
- `String` process: name of process.
**Return** if process is running.

### getTopProcess()
**Return** focused process.

# Events

### kill
Called when a process is killed.

### start
Called when a process is started.

### focus
Called when the top process is changed.

# Author
Francesco Cannizzaro

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