summaryrefslogtreecommitdiff
path: root/www/lib/localforage/src/utils/isIndexedDBValid.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2017-09-27 12:42:48 -0400
committerPliable Pixels <pliablepixels@gmail.com>2017-09-27 12:42:48 -0400
commit210e8feae2fb4842bfb2de38666e6c41671fef3c (patch)
treecbdafa34b1a6260bb20236d7e9de9eb1b690a1c5 /www/lib/localforage/src/utils/isIndexedDBValid.js
parente7e7baeaad90229ccb3e0f45f4ebd77be7d79b14 (diff)
removed lib
Diffstat (limited to 'www/lib/localforage/src/utils/isIndexedDBValid.js')
-rw-r--r--www/lib/localforage/src/utils/isIndexedDBValid.js34
1 files changed, 0 insertions, 34 deletions
diff --git a/www/lib/localforage/src/utils/isIndexedDBValid.js b/www/lib/localforage/src/utils/isIndexedDBValid.js
deleted file mode 100644
index f8150875..00000000
--- a/www/lib/localforage/src/utils/isIndexedDBValid.js
+++ /dev/null
@@ -1,34 +0,0 @@
-import idb from './idb';
-
-function isIndexedDBValid() {
- try {
- // Initialize IndexedDB; fall back to vendor-prefixed versions
- // if needed.
- if (!idb) {
- return false;
- }
- // We mimic PouchDB here;
- //
- // We test for openDatabase because IE Mobile identifies itself
- // as Safari. Oh the lulz...
- var isSafari = typeof openDatabase !== 'undefined' &&
- /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) &&
- !/Chrome/.test(navigator.userAgent) &&
- !/BlackBerry/.test(navigator.platform);
-
- var hasFetch = typeof fetch === 'function' &&
- fetch.toString().indexOf('[native code') !== -1;
-
- // Safari <10.1 does not meet our requirements for IDB support (#5572)
- // since Safari 10.1 shipped with fetch, we can use that to detect it
- return (!isSafari || hasFetch) &&
- typeof indexedDB !== 'undefined' &&
- // some outdated implementations of IDB that appear on Samsung
- // and HTC Android devices <4.4 are missing IDBKeyRange
- typeof IDBKeyRange !== 'undefined';
- } catch (e) {
- return false;
- }
-}
-
-export default isIndexedDBValid;