MCPcopy Create free account
hub / github.com/AntmJS/temptaro / getVersion

Function getVersion

config/index.js:11–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9process.env.API_ENV = process.env.API_ENV ?? 'real'
10
11function getVersion() {
12 function fillZero(value) {
13 return value < 10 ? `0${value}` : `${value}`
14 }
15 const date = new Date()
16
17 return `${date.getFullYear()}${fillZero(date.getMonth() + 1)}${fillZero(
18 date.getDate(),
19 )}${fillZero(date.getHours())}${fillZero(date.getMinutes())}${fillZero(
20 date.getSeconds(),
21 )}`
22}
23
24const version = process.env.VERSION || getVersion()
25console.log('TaroEnv: ', process.env.TARO_ENV)

Callers 1

index.jsFile · 0.85

Calls 1

fillZeroFunction · 0.85

Tested by

no test coverage detected