We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
isTruthy
1 parent 898d46e commit efe64e0Copy full SHA for efe64e0
1 file changed
pr-checks/sync.ts
@@ -112,6 +112,13 @@ function writeYaml(filePath: string, data: any): void {
112
fs.writeFileSync(filePath, stripTrailingWhitespace(header + yamlStr), "utf8");
113
}
114
115
+function isTruthy(value: string | boolean | undefined): boolean {
116
+ if (typeof value === "string") {
117
+ return value.toLowerCase() === "true";
118
+ }
119
+ return Boolean(value);
120
+}
121
+
122
/**
123
* Strip trailing whitespace from each line.
124
*/
0 commit comments