【文件属性】:
文件名称:osx-bluetooth:在OS X系统上获取或设置蓝牙状态
文件大小:8KB
文件格式:ZIP
更新时间:2021-05-01 06:09:58
JavaScript
osx蓝牙
在OS X系统上获取或设置蓝牙状态
安装
$ npm install --save osx-bluetooth
用法
const osxBluetooth = require ( 'osx-bluetooth' ) ;
osxBluetooth . isOn ( ) . then ( state => {
console . log ( state ) ;
//=> false
} ) ;
osxBluetooth . on ( ) . then ( ( ) => {
console . log ( 'Bluetooth state changed to on' ) ;
} ) ;
osxBluetooth . off ( ) . then ( ( ) => {
console . log ( 'Bluetooth state changed to off' ) ;
【文件预览】:
osx-bluetooth-master
----.travis.yml(98B)
----bluetooth.m(1KB)
----index.js(1KB)
----test.js(340B)
----package.json(807B)
----readme.md(1KB)
----license(1KB)
----bluetooth(33KB)
----.gitignore(13B)
----.editorconfig(231B)
----.gitattributes(12B)