Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/circircir-circle/human_exist_device
/ padZero
Method
padZero
mini_program/common/Tools.js:769–775 ·
view source on GitHub ↗
(num, targetLength = 2)
Source
from the content-addressed store, hash-verified
767
768
// 补0,如1 -> 01
769
padZero(num, targetLength = 2) {
770
let
str = `${num}`
771
while
(str.length < targetLength) {
772
str = `0${str}`
773
}
774
return
str
775
}
776
777
parseTimeData(time) {
778
const
SECOND = 1000
Callers
1
parseFormat
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected