Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/blinker-iot/blinker-js
/ turnSwitch
Function
turnSwitch
example/example.ts:115–119 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
113
// 开关切换
114
let
switchState = false
115
function
turnSwitch() {
116
switchState = !switchState
117
device.log(
"切换设备状态为"
+ (switchState ?
'on'
:
'off'
))
118
return
switchState ?
'on'
:
'off'
119
}
Callers
1
example.ts
File · 0.70
Calls
1
log
Method · 0.80
Tested by
no test coverage detected