Update README
This commit is contained in:
@@ -16,7 +16,7 @@ pcsc.on('reader', function (reader) {
|
||||
reader.on('status', function (status) {
|
||||
console.log('Status(', this.name, '):', status);
|
||||
/* check what has changed */
|
||||
var changes = this.state ^ status.state;
|
||||
const changes = this.state ^ status.state;
|
||||
if (changes) {
|
||||
if ((changes & this.SCARD_STATE_EMPTY) && (status.state & this.SCARD_STATE_EMPTY)) {
|
||||
console.log("card removed");
|
||||
@@ -31,7 +31,7 @@ pcsc.on('reader', function (reader) {
|
||||
} else if ((changes & this.SCARD_STATE_PRESENT) && (status.state & this.SCARD_STATE_PRESENT)) {
|
||||
console.log("card inserted");
|
||||
/* card inserted */
|
||||
reader.connect({share_mode: this.SCARD_SHARE_SHARED}, function (err, protocol) {
|
||||
reader.connect({ share_mode: this.SCARD_SHARE_SHARED }, function (err, protocol) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user