# adb-devices-emitter

> a tool to track devices

Latest version **0.1.9** (published 2020-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install adb-devices-emitter
pnpm add adb-devices-emitter
yarn add adb-devices-emitter
bun add adb-devices-emitter
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.9 |
| Published | 2020-05-27 |
| First published | 2018-10-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | panwen85@gmail.com |
| Maintainers | susanpan |

## Links

- npm: https://www.npmjs.com/package/adb-devices-emitter
- npm.io page: https://npm.io/package/adb-devices-emitter

## Dependencies (1)

- [adb-commander](https://npm.io/package/adb-commander.md) ^0.1.9

## Recent versions

- 0.1.9 (latest) — 2020-05-27
- 0.1.8 — 2019-02-25
- 0.1.7 — 2019-02-20
- 0.1.6 — 2019-02-20
- 0.1.5 — 2019-02-20
- 0.1.4 — 2019-02-20
- 0.1.3 — 2019-02-20
- 0.1.2 — 2019-02-19
- 0.1.1 — 2019-02-19
- 0.1.0 — 2019-02-19
- 0.0.9 — 2019-01-22
- 0.0.8 — 2019-01-22
- 0.0.7 — 2019-01-15
- 0.0.6 — 2019-01-15
- 0.0.5 — 2019-01-09
- … 4 more at https://npm.io/package/adb-devices-emitter/versions

## README

# adb-devices-emitter

[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

Track insertion device status

## Examples

### add event listener `deviceAdded` `deviceRemoved`

```javascript
const devicesEmitter = require('adb-devices-emitter')

devicesEmitter.on('deviceAdded', ({ sn }) => {
  console.log('deviceAdded sn:', sn)
})

devicesEmitter.on('deviceRemoved', ({ sn }) => {
  console.log('deviceRemoved sn:', sn)
})

devicesEmitter.start()
```

### stop

```javascript
const devicesEmitter = require('adb-devices-emitter')

devicesEmitter.on('deviceAdded', ({ sn }) => {
  console.log('deviceAdded sn:', sn)
})

devicesEmitter.on('deviceRemoved', ({ sn }) => {
  console.log('deviceRemoved sn:', sn)
})

devicesEmitter.start()

setTimeout(() => {
  console.log('stop')
  devicesEmitter.stop()
}, 100000)
```

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