atcheck/lsscanner/new_ubuntu/node_modules/smartcard/demo/device-deactivated-promise.js

14 lines
339 B
JavaScript
Raw Normal View History

2019-12-16 18:42:21 +01:00
'use strict';
const smartcard = require('../lib/index');
const Devices = smartcard.Devices;
const devices = new Devices();
devices.onDeactivated().then(event => {
console.log(`Device '${event.device}' deactivated`);
event.devices.map((device, index) => {
console.log(`Device #${index + 1}: ${device.name}`);
});
});