ndef

0.2.0 • Public • Published

Library to create and parse NDEF messages.

ndef = require('ndef');

message = [
    ndef.textRecord("hello, world")
];

bytes = ndef.encodeMessage(message);

// do something useful with bytes: write to a tag or send to a peer
  
records = ndef.decodeMessage(bytes);

ndef.text.decodePayload(records[0].payload);

// prints 'hello, world'

See the examples directory and the mifare classic examples for more information on creating and decoding messages.

See the phonegap-nfc documentation for additional info.

/ndef/

    Package Sidebar

    Install

    npm i ndef

    Weekly Downloads

    178

    Version

    0.2.0

    License

    BSD-3-Clause

    Unpacked Size

    48.5 kB

    Total Files

    14

    Last publish

    Collaborators

    • don