GladysProject/Gladys

View on GitHub
server/services/bluetooth/lib/commands/bluetooth.getStatus.js

Summary

Maintainability
A
0 mins
Test Coverage
/**
 * @description Retrieve current Bluetooth status.
 * @returns {object} Return status.
 * @example
 * bluetooth.getStatus();
 */
function getStatus() {
  const { ready, scanning, peripheralLookup, bluetooth } = this;
  const status = {
    ready: bluetooth !== undefined && ready,
    scanning,
    peripheralLookup,
  };
  return status;
}

module.exports = {
  getStatus,
};