summaryrefslogtreecommitdiff
path: root/ext/bg/js/util.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2019-09-23 17:35:36 -0700
committerAlex Yatskov <alex@foosoft.net>2019-09-23 17:35:36 -0700
commitf4b6527ed6ed1f0f4f5a63b94766b20f3b90e6ec (patch)
tree0d2f733c13597dd4067d3dc01e6da27f96bfe81b /ext/bg/js/util.js
parentcfc6363a01ee00e89866c54709006d6f55d093de (diff)
parentf5afe590ad0730a695614b32032b7ea70b46c7b0 (diff)
Merge branch 'master' into testing
Diffstat (limited to 'ext/bg/js/util.js')
-rw-r--r--ext/bg/js/util.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index 3dc7c900..73a8396f 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -26,6 +26,11 @@ function utilIsolate(data) {
return JSON.parse(JSON.stringify(data));
}
+function utilBackgroundIsolate(data) {
+ const backgroundPage = chrome.extension.getBackgroundPage();
+ return backgroundPage.utilIsolate(data);
+}
+
function utilSetEqual(setA, setB) {
if (setA.size !== setB.size) {
return false;
@@ -104,3 +109,7 @@ function utilReadFile(file) {
reader.readAsBinaryString(file);
});
}
+
+function utilIsObject(value) {
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
+}