added toBoolean string prototype

This commit is contained in:
srgooglo 2022-10-11 23:47:47 +02:00
parent a7abc3df22
commit b8a4916f8a

View File

@ -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