Skip to content

Simple PC/SC lib for Node.js as wrapper around node-pcsclite

Notifications You must be signed in to change notification settings

thinhtn/simple-pcsc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-pcsc

A simple wrapper around santigimeno/node-pcsclite

Usage

'use strict';

const PCSC = require('simple-pcsc'); 
const nfc = new PCSC();
 
nfc.on('reader', reader => {
 
	console.log(`NFC (${reader.reader.name}): device attached`);
 
	reader.on('card', card => {
		console.log(`NFC (${reader.reader.name}): card detected`, card.uid); 
	});
 
	reader.on('error', err => { 
		console.log(`NFC (${reader.reader.name}): an error occurred`, err); 
	});
 
	reader.on('end', () => { 
		console.log(`NFC (${reader.reader.name}): device removed`); 
	}); 
});
 
nfc.on('error', err => { 
	console.log('NFC: an error occurred', err); 
});

About

Simple PC/SC lib for Node.js as wrapper around node-pcsclite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%