MCPcopy Create free account
hub / github.com/chunshand/qdev / isVersion

Function isVersion

admin/src/utils/validate.ts:36–39  ·  view source on GitHub ↗
(version: string)

Source from the content-addressed store, hash-verified

34
35/** 判断版本号格式是否为 X.Y.Z */
36export const isVersion = (version: string) => {
37 const reg = /^\d+(?:\.\d+){2}$/
38 return reg.test(version)
39}
40
41/** 判断时间格式是否为 24 小时制(HH:mm:ss) */
42export const is24H = (time: string) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected