Socket
Socket
Sign inDemoInstall

nfc-poll-wrapper

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nfc-poll-wrapper

Are you tired of trying to just read your NFC data from Node.JS? All other modules are outdated, not working or not installing while `nfc-poll` works just fine?


Version published
Weekly downloads
47
decreased by-16.07%
Maintainers
1
Install size
330 kB
Created
Weekly downloads
 

Changelog

Source

[1.1.1] - 2022-04-15

Fixed

  • not working at all due to typo in stdbuf command

Readme

Source

nfc-poll-wrapper

Are you tired of trying to just read your NFC data from Node.JS? All other modules are outdated, not working or not installing while nfc-poll works just fine?

Yeah, me too.

Requirements

This requires stdbuf to be available on your system (aside from nfc-poll).

Usage:

import { poll } from `nfc-poll-wrapper`;

const instance = poll();

instance.on("device", ({ raw, UID, NFCIDversion }: DeviceInfo) => {
    console.info("Device ID:", UID, "v", NFCIDversion);
});

Only UID is extracted currently, feel free to change and/or open a PR or a request. Use raw if you need to extract data ASAP without forking this repo.

Events:

  • device - emitted when device info is detected
  • state - (usually not needed) - emitted when lifecycle state is changed, ie: process starting, process reported it is polling for device, waiting for releasing the device, etc, see exported State for available states
  • process-exit - (usually not needed) - just an info that underlying process exited
  • process-error - (usually not needed) - stdbuf is probably not installed, read first argument (an Error) to verify details

Docs?

Proper docs will come someday (or not).

License

MIT.

Keywords

FAQs

Last updated on 15 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc