<commit_before>function onFormSubmit() {
  'use strict';

  let filterService = document.getElementById('service').value;
  if (filterService.startsWith('0x')) {
    filterService = parseInt(filterService, 16);
  }

  log('Requesting Bluetooth Device...');
  navigator.bluetooth.requestDevice({filters:[{services:[ filterService ]}]})
  .then(device => {
    log('> Device Name:   ' + device.name);
    log('> Device Id:     ' + device.id);
    log('> Device Paired: ' + device.paired);
    log('> Device Class:  ' + device.deviceClass);
    log('> Device UUIDs:  ' + device.uuids.join('\n' + ' '.repeat(17)));
  })
  .catch(error => {
    log('Argh! ' + error);
  });
}
<commit_msg>Added TXPower and RSSI to bluetooth sample<commit_after>function onFormSubmit() {
  'use strict';

  let filterService = document.getElementById('service').value;
  if (filterService.startsWith('0x')) {
    filterService = parseInt(filterService, 16);
  }

  log('Requesting Bluetooth Device...');
  navigator.bluetooth.requestDevice({filters:[{services:[ filterService ]}]})
  .then(device => {
    log('> Device Name:   ' + device.name);
    log('> Device Id:     ' + device.id);
    log('> Device Paired: ' + device.paired);
    log('> Device Class:  ' + device.deviceClass);
    log('> Device UUIDs:  ' + device.uuids.join('\n' + ' '.repeat(17)));
    if (device.adData) {
      log('> Tx Power:      ' + device.adData.txPower + ' dBm');
      log('> RSSI:          ' + device.adData.rssi + ' dBm');
    }
  })
  .catch(error => {
    log('Argh! ' + error);
  });
}

{'fraction_non_alphanumeric': 0.1912427559562138, 'fraction_numerical': 0.00643915003219575, 'mean_word_length': 3.3529411764705883, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7194009', 'n_tokens_mistral': 532, 'n_tokens_neox': 515, 'n_words': 101}