# 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) ```