From 64aed2021450a78dd413dfe86730fa74fcb5e4b0 Mon Sep 17 00:00:00 2001 From: srgooglo Date: Tue, 11 Oct 2022 23:47:47 +0200 Subject: [PATCH] added `toBoolean` string prototype --- packages/app/src/App.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/app/src/App.jsx b/packages/app/src/App.jsx index ecb60553..352db103 100644 --- a/packages/app/src/App.jsx +++ b/packages/app/src/App.jsx @@ -19,6 +19,10 @@ String.prototype.toTitleCase = function () { }) } +String.prototype.toBoolean = function () { + return this === "true" +} + Promise.tasked = function (promises) { return new Promise(async (resolve, reject) => { let rejected = false @@ -76,6 +80,8 @@ class App extends React.Component { static async initialize() { window.app.version = config.package.version + window.app.message = antd.message + // check if electron library is available if (typeof window.electron !== "undefined") { window.isElectron = true