FreeKill/Fk/util.js
notify 2acec5f20a
Qmldir (#155)
重组qml文件,使用qmldir文件实现模块化
2023-05-19 10:08:36 +08:00

24 lines
472 B
JavaScript

// SPDX-License-Identifier: GPL-3.0-or-later
.pragma library
function convertNumber(number) {
if (number === 1)
return "A";
if (number >= 2 && number <= 10)
return number;
if (number >= 11 && number <= 13) {
const strs = ["J", "Q", "K"];
return strs[number - 11];
}
return "";
}
Array.prototype.contains = function(element) {
return this.indexOf(element) != -1;
}
Array.prototype.prepend = function() {
this.splice(0, 0, ...arguments);
}