14 lines
343 B
JavaScript
14 lines
343 B
JavaScript
'use strict';
|
|
|
|
const smartcard = require('../lib/index');
|
|
const Devices = smartcard.Devices;
|
|
const devices = new Devices();
|
|
|
|
|
|
devices.on('device-deactivated', event => {
|
|
console.log(`Device '${event.device}' deactivated`);
|
|
event.devices.map((device, index) => {
|
|
console.log(`Device #${index + 1}: ${device.name}`);
|
|
});
|
|
});
|