summaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/core.js15
1 files changed, 0 insertions, 15 deletions
diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js
index 0e22b9ac..0d50e915 100644
--- a/ext/mixed/js/core.js
+++ b/ext/mixed/js/core.js
@@ -175,21 +175,6 @@ function promiseTimeout(delay, resolveValue) {
return promise;
}
-function stringReplaceAsync(str, regex, replacer) {
- let match;
- let index = 0;
- const parts = [];
- while ((match = regex.exec(str)) !== null) {
- parts.push(str.substring(index, match.index), replacer(...match, match.index, str));
- index = regex.lastIndex;
- }
- if (parts.length === 0) {
- return Promise.resolve(str);
- }
- parts.push(str.substring(index));
- return Promise.all(parts).then((v) => v.join(''));
-}
-
/*
* Common events