Neverending Package Mountain
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    ndefpublic

    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.

    Keywords

    install

    npm i ndef

    Downloadsweekly downloads

    131

    version

    0.1.3

    license

    BSD-3-Clause

    repository

    github.com

    last publish

    collaborators

    • avatar