feat: format scripts
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export function compareVersion(ver1: string, ver2: string) {
|
||||
export function compareVersion(ver1: string, ver2: string): 0 | 1 | -1 {
|
||||
if (ver1 === ver2) return 0;
|
||||
const ver1Parts = ver1.split(".");
|
||||
const ver2Parts = ver2.split(".");
|
||||
@@ -17,12 +17,12 @@ export function compareVersion(ver1: string, ver2: string) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
export function isOn(val: string) {
|
||||
export function isOn(val: string): boolean {
|
||||
const lowerVal = (val == null) ? val : val.toLowerCase();
|
||||
return lowerVal === "on" || lowerVal === "yes" || lowerVal === "1" ||
|
||||
lowerVal === "true";
|
||||
}
|
||||
|
||||
export function isEnvOn(envKey: string) {
|
||||
export function isEnvOn(envKey: string): string | undefined {
|
||||
return Deno.env.get(envKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user