summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-22 22:59:07 -0400
committerGitHub <noreply@github.com>2020-09-22 22:59:07 -0400
commitc8b738ddf7a6d92d84a1d599e4d59889f6195ce5 (patch)
tree9fe901872772ba5a2cfe0185bf14ac91478ad46b
parent7d78e8737f2bb9cd75313c61e3cbf31be5db72f9 (diff)
Remove unused toIterable function (#857)
-rw-r--r--.eslintrc.json1
-rw-r--r--ext/mixed/js/core.js16
2 files changed, 0 insertions, 17 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index 9363318b..2f8306f7 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -101,7 +101,6 @@
"jsonToError": "readonly",
"isObject": "readonly",
"hasOwn": "readonly",
- "toIterable": "readonly",
"stringReverse": "readonly",
"promiseTimeout": "readonly",
"parseUrl": "readonly",
diff --git a/ext/mixed/js/core.js b/ext/mixed/js/core.js
index 7eb21659..81330893 100644
--- a/ext/mixed/js/core.js
+++ b/ext/mixed/js/core.js
@@ -67,22 +67,6 @@ function escapeRegExp(string) {
return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&');
}
-// toIterable is required on Edge for cross-window origin objects.
-function toIterable(value) {
- if (typeof Symbol !== 'undefined' && typeof value[Symbol.iterator] !== 'undefined') {
- return value;
- }
-
- if (value !== null && typeof value === 'object') {
- const length = value.length;
- if (typeof length === 'number' && Number.isFinite(length)) {
- return Array.from(value);
- }
- }
-
- throw new Error('Could not convert to iterable');
-}
-
function stringReverse(string) {
return string.split('').reverse().join('').replace(/([\uDC00-\uDFFF])([\uD800-\uDBFF])/g, '$2$1');
}