Library to create and parse NDEF messages
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples
lib
test
.gitignore
.npmignore
CHANGES.txt
LICENSE.txt
README.md
index.js
package.json

README.md

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.