@ngokevin The one downside to `indexOf` is that we'd need to do it between 1 and 4 times per key, whereas we're guaranteed to do it only once for the regex. The replacement function would look something like this:

    function quotaEstimate(keys) {
        /*
        Estimate, based on the contents of the KEYS_KEY cache item, the size (in KB) of the
        localforage database.
        */
        function keyHasPrefix(key, prefix) {
            var lf_prefix = localforage._config.name + '/';
            return key.substr(lf_prefix.length).indexOf(prefix) === 0;
        }
        return _.reduce(keys, function(memo, key){
            if (keyHasPrefix(key, 'app')) {
                return memo + 3;
            } else if (keyHasPrefix(key, 'app')) {
                return memo + 100;
            } else if (keyHasPrefix(key, 'app')) {
                return memo + 20
            } else {
                return memo;
            }                
        }, 0);
    }