npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nfc-reader-nodejs

v0.2.0

Published

A native Node.js addon for interacting with PC/SC smart card readers (NFC/contact). Provides low-level access via APDU commands.

Readme

Node.js PC/SC Smart Card Addon (nfc-reader-nodejs)

NPM version Build Status License

A native Node.js addon for interacting with PC/SC (Personal Computer/Smart Card) compatible smart card readers on Windows, Linux, and macOS.

Features

  • List Readers: Enumerate all connected PC/SC compliant smart card readers.
  • Card Event Listener: Listen for card insertion/removal events on a specific reader.
  • Automatic UID Reading: Automatically attempts to read the card's UID (using the standard FF CA 00 00 00 APDU) upon insertion when listening.
  • Transmit APDUs: Send custom raw APDU (Application Protocol Data Unit) commands to the card and receive the raw response.
  • Asynchronous Operations: Core I/O operations (transmit, background listening) are performed asynchronously to avoid blocking the Node.js event loop.

Prerequisites

This is a native addon, meaning it requires compilation on the target machine. Ensure you have the necessary build tools and PC/SC dependencies installed.

1. Node.js and npm

  • Node.js (LTS version recommended)
  • npm (usually comes with Node.js)

2. Build Tools (node-gyp)

  • node-gyp requires Python (v3.x recommended) and a C++ compiler.
  • Windows:
    • Install the current version of Python from python.org.
    • Install Visual Studio Build Tools (or a full Visual Studio version with C++ workload). You can install the necessary components by running this in an administrator PowerShell or CMD:
      npm install --global --production windows-build-tools
      (This installs Python and VS Build Tools components if needed).
  • Linux:
    • Install Python, make, and a C++ compiler suite (like g++):
      # Debian/Ubuntu
      sudo apt update
      sudo apt install -y python3 make g++ build-essential
      
      # Fedora/CentOS/RHEL
      sudo dnf update
      sudo dnf install -y python3 make gcc-c++
      # or using yum: sudo yum install -y python3 make gcc-c++
  • macOS:
    • Install Python from python.org or via Homebrew (brew install python).
    • Install Xcode Command Line Tools:
      xcode-select --install

3. PC/SC Library and Daemon

  • Windows: The necessary Winscard library is part of the operating system. No extra steps are usually needed.
  • Linux:
    • Install the PCSC-lite library and development headers:
      # Debian/Ubuntu
      sudo apt install -y libpcsclite1 libpcsclite-dev pcscd
      
      # Fedora/CentOS/RHEL
      sudo dnf install -y pcsc-lite pcsc-lite-devel pcsc-tools
      # or using yum
    • Ensure the pcscd daemon is running:
      sudo systemctl start pcscd
      sudo systemctl enable pcscd # Optional: start on boot
      # Verify status: systemctl status pcscd
  • macOS:
    • Install PCSC-lite, usually via Homebrew:
      brew install pcsc-lite
    • Ensure the pcscd daemon is running. It should typically start automatically after installation or on demand. You can check using launchctl list | grep pcscd or ps aux | grep pcscd. If not running, you might need to start it (though this is less common on macOS): sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.ifdreader.plist (path might vary slightly).

Installation

Examples

  • API: const pcsc = require('nfc-reader-nodejs');
npm install nfc-reader-nodejs