ndef-lib/ndef-text.js
function encode(text, lang, encoding) {

    // ISO/IANA language code, but we're not enforcing
    if (!lang) { lang = 'en'; }

    var encoded = util.stringToBytes(lang + text);
    encoded.unshift(lang.length);

    return encoded;
}
function encode(text, lang, encoding) {

    // ISO/IANA language code, but we're not enforcing
    if (!lang) { lang = 'en'; }

    var encoded = util.stringToBytes(lang + text);
    encoded.unshift(lang.length);

    return encoded;
}
function encode ( text , lang , encoding ) { // ISO/IANA language code, but we're not enforcing if ( ! lang ) { lang = 'en' ; } var encoded = util . stringToBytes ( lang + text ) ; encoded . unshift ( lang . length ) ; return encoded ; }
encode text payload @returns an array of bytes
encode text payload