code: function (mb, me, cf, sr, il, tnf) {
  
          var value = tnf;
  
          if (mb) {
              value = value | 0x80;
          }
  
          if (me) {
              value = value | 0x40;
          }
  
          // note if cf: me, mb, li must be false and tnf must be 0x6
          if (cf) {
              value = value | 0x20;
          }
  
          if (sr) {
              value = value | 0x10;
          }
  
          if (il) {
              value = value | 0x8;
          }
  
          return value;
      }
docs: Encode NDEF bit flags into a TNF Byte.
  
  @returns tnf byte
  
  See NFC Data Exchange Format (NDEF) Specification Section 3.2 RecordLayout