This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
ndef with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
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.payload); // prints 'hello, world'
See the phonegap-nfc documentation for additional info.