mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-15 08:22:37 +02:00
Framework Rewrite
This commit is contained in:
@@ -17,6 +17,10 @@ module.exports = class Util {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
static escapeRegex(str) {
|
||||
return str.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
|
||||
}
|
||||
|
||||
static shuffle(array) {
|
||||
const arr = array.slice(0);
|
||||
for (let i = arr.length - 1; i >= 0; i--) {
|
||||
|
||||
Reference in New Issue
Block a user