We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce0f061 commit 5089f4eCopy full SHA for 5089f4e
src/App.ts
@@ -7,7 +7,13 @@ import GenerateVideo from "./commands/GenerateVideo";
7
import { IEvent } from "./IEvent";
8
import GenerateHtml from "./commands/GenerateHtml";
9
10
-const asNumber = (n) => typeof n === "number" ? n : parseInt(n, 10);
+const asNumber = (n) => {
11
+ if (n === void 0 || n === null || n === "null") {
12
+ return void 0;
13
+ }
14
+ n = typeof n === "number" ? n : parseInt(n, 10);
15
+ return isNaN(n) ? void 0: n;
16
+}
17
18
const asBoolean = (n) => typeof n === "boolean" ? n : (typeof n === "string" ? /true|yes/i.test(n) : false);
19
0 commit comments