code: function (regularExpression) {
  
        regularExpression = regularExpression || "";
        //accounting for the '.' in the prefix when creating a regex
        var tempPrefix = prefix.slice(0, -1);
        var testRegex = new RegExp(tempPrefix + '.' + regularExpression);
  
        if (!browserSupportsLocalStorage || self.storageType === 'cookie') {
          if (!browserSupportsLocalStorage) {
            $rootScope.$broadcast('LocalStorageModule.notification.warning', 'LOCAL_STORAGE_NOT_SUPPORTED');
          }
  
          return clearAllFromCookies();
        }
  
        var prefixLength = prefix.length;
  
        for (var key in webStorage) {
          // Only remove items that are for this app and match the regular expression
          if (testRegex.test(key)) {
            try {
              removeFromLocalStorage(key.substr(prefixLength));
            } catch (e) {
              $rootScope.$broadcast('LocalStorageModule.notification.error',e.message);
              return clearAllFromCookies();
            }
          }
        }
        return true;
      }
docs: Remove all data for this app from local storage Also optionally takes a regular expression string and removes the matching key-value pairs Example use: localStorageService.clearAll(); Should be used mostly for development purposes