src/adapters/chrome-storage.js
function () {
            return !!storage && function() {
                // in mobile safari if safe browsing is enabled, window.storage
                // is defined but setItem calls throw exceptions.
                var success = true
                var value = Math.random()
                value = "" + value + "" //ensure that we are dealing with a string
                try {
                    var _set = {}
                    _set[value] = value;
                    storage.set(_set)
                } catch (e) {
                    success = false
                }
                storage.remove(value)
                return success
            }()
        }
function () {
            return !!storage && function() {
                // in mobile safari if safe browsing is enabled, window.storage
                // is defined but setItem calls throw exceptions.
                var success = true
                var value = Math.random()
                value = "" + value + "" //ensure that we are dealing with a string
                try {
                    var _set = {}
                    _set[value] = value;
                    storage.set(_set)
                } catch (e) {
                    success = false
                }
                storage.remove(value)
                return success
            }()
        }
function ( ) { return ! ! storage && function ( ) { // in mobile safari if safe browsing is enabled, window.storage // is defined but setItem calls throw exceptions. var success = true var value = Math . random ( ) value = "" + value + "" //ensure that we are dealing with a string try { var _set = { } _set [ value ] = value ; storage . set ( _set ) } catch ( e ) { success = false } storage . remove ( value ) return success } ( ) }
ensure we are in an env with chrome.storage
ensure we are in an env with chrome . storage