Remove an item from local storage Example use: localStorageService.remove('library'); // removes the key/value pair of library='angular'
490807
function (key) {
      if (!browserSupportsLocalStorage || self.storageType === 'cookie') {
        if (!browserSupportsLocalStorage) {
          $rootScope.$broadcast('LocalStorageModule.notification.warning', 'LOCAL_STORAGE_NOT_SUPPORTED');
        }

        if (notify.removeItem) {
          $rootScope.$broadcast('LocalStorageModule.notification.removeitem', {key: key, storageType: 'cookie'});
        }
        return removeFromCookies(key);
      }

      try {
        webStorage.removeItem(deriveQualifiedKey(key));
        if (notify.removeItem) {
          $rootScope.$broadcast('LocalStorageModule.notification.removeitem', {key: key, storageType: self.storageType});
        }
      } catch (e) {
        $rootScope.$broadcast('LocalStorageModule.notification.error', e.message);
        return removeFromCookies(key);
      }
      return true;
    }
955824
def delete_library(self, library):
        
        lib = ArcticLibraryBinding(self, library)
        colname = lib.get_top_level_collection().name
        if not [c for c in lib._db.list_collection_names(False) if re.match(r"^{}([\.].*)?$".format(colname), c)]:
            logger.info('Nothing to delete. Arctic library %s does not exist.' % colname)
        logger.info('Dropping collection: %s' % colname)
        lib._db.drop_collection(colname)
        for coll in lib._db.list_collection_names():
            if coll.startswith(colname + '.'):
                logger.info('Dropping collection: %s' % coll)
                lib._db.drop_collection(coll)
        if library in self._library_cache:
            del self._library_cache[library]
            del self._library_cache[lib.get_name()]

        self._cache.delete_item_from_key('list_libraries', self._sanitize_lib_name(library))
943587
function remove (key) {
  if (typeof key !== 'string') {
    throw new Error('Invalid key provided for remove')
  }

  const keys = [`${prefix}${key}`, `${expire}${key}`]
  return storage.remove(keys)
}
774456
function LocalStorageHandle(success, error, intent, operation, args) {
    var reference = args[0];
    var variable = args[1];

    if (operation.startsWith('put') || operation.startsWith('set')) {
        try {
            var varAsString = JSON.stringify(variable);
            if (reference === null) {
                error(NativeStorageError.NULL_REFERENCE);
                return;
            }
            localStorage.setItem(reference, varAsString);
            success(variable);
        } catch (err) {
            error(NativeStorageError.JSON_ERROR);
        }
    } else if (operation.startsWith('get')) {
        var item = {};
        item = localStorage.getItem(reference);
        if (item === null) {
            error(NativeStorageError.ITEM_NOT_FOUND);
            return;
        }
        try {
            var obj = JSON.parse(item);
            //console.log("LocalStorage Reading: "+obj);
            success(obj);
        } catch (err) {
            error(NativeStorageError.JSON_ERROR);
        }
    } else if (operation === 'keys') {
      var keys = [];
      for(var i = 0; i < localStorage.length; i++){
         keys.push(localStorage.key(i));
      }
      success(keys);
    }
}
468420
function removeAppFolderItem(itemPath) {
  const resolvedFolderPath = path.join(path.resolve(tmp), 'src', 'app', itemPath);
  return fs.remove(resolvedFolderPath);
}
1068318
function(key, defaultValue) {
        var value = window.localStorage.getItem(key);
        return value ? JSON.parse(value) : defaultValue;
    }
32632
def remove(self, item):
        
        if item not in self:
            raise ValueError('objectlist.remove(item) failed, item not in list')
        item_path = self._view_path_for(item)
        giter = self._iter_for(item)
        del self[giter]
        self.emit('item-removed', item, item_path)
915585
def _remove_non_serializable_store_entries(store: dict):
    
    removed_key_list = []
    for key, value in store.items():
        if not (_is_serializable(key) and _is_serializable(value)):
            _logger.info("Remove non-serializable item from the global script store. Key: '{}', Value: '{}'. "
                         "This item cannot be saved and therefore will be lost.".format(key, value))
            removed_key_list.append(key)
    for key in removed_key_list:
        del store[key]
618736
function destroy(callback) {
            var model = this;
            var request = {
                action : 'remove',
                model : model.constructor,
                data : this
            };
            this.dispatch('beforeDestroy');

            this.constructor.storage.remove(request, function destroyCallback() {
                model.setProperty('id', null);
                model.dispatch('afterDestroy');
                if (callback) {
                    callback(model);
                }
            });
        }
201173
function(api, id, key) {
  // get storage object
  var obj = _getStorageObject(api, id);
  if(obj !== null && key in obj) {
    // remove key
    delete obj[key];

    // see if entry has no keys remaining
    var empty = true;
    for(var prop in obj) {
      empty = false;
      break;
    }
    if(empty) {
      // remove entry entirely if no keys are left
      obj = null;
    }

    // set storage object
    _setStorageObject(api, id, obj);
  }
}
663129
function LRUOp(remove, key, value) {
  this.remove = remove;
  this.key = key;
  this.value = value;
}
1368309
function (key, value) {

      // If this browser does not support local storage use cookies
      if (!browserSupportsLocalStorage || self.storageType === 'cookie') {
        if (!browserSupportsLocalStorage) {
            $rootScope.$broadcast('LocalStorageModule.notification.warning', 'LOCAL_STORAGE_NOT_SUPPORTED');
        }

        if (notify.setItem) {
          $rootScope.$broadcast('LocalStorageModule.notification.setitem', {key: key, newvalue: value, storageType: 'cookie'});
        }
        return addToCookies(key, value);
      }

      // Let's convert undefined values to null to get the value consistent
      if (typeof value === "undefined") {
        value = null;
      }

      try {
        if (angular.isObject(value) || angular.isArray(value)) {
          value = angular.toJson(value);
        }
        if (webStorage) {webStorage.setItem(deriveQualifiedKey(key), value)};
        if (notify.setItem) {
          $rootScope.$broadcast('LocalStorageModule.notification.setitem', {key: key, newvalue: value, storageType: self.storageType});
        }
      } catch (e) {
        $rootScope.$broadcast('LocalStorageModule.notification.error', e.message);
        return addToCookies(key, value);
      }
      return true;
    }
483173
function (items, options) {
            var removed = [];

            if (!_.isArray(items)) {
                items = [items];
            }
            var item;
            for (var i = 0; i < items.length; i++) {
                item = this.removeAt(this.indexOf(items[i]), options);
                item && removed.push(item);
            }
            return removed;
        }
488446
def remove_storage(self, storage):
        
        if not hasattr(storage, 'address'):
            raise Exception(
                ('Storage does not have an address. '
                 'Access the Storage via Server.storage_devices '
                 'so they include an address. '
                 '(This is due how the API handles Storages)')
            )

        self.cloud_manager.detach_storage(server=self.uuid, address=storage.address)
        self.storage_devices.remove(storage)
347733
function (key) {
                storage.removeAttribute(getMappedKey(key));
                setMappedKey(null, key);
                storage.save("JSONPersist");
            }
1140823
function removeItem$2(key, callback) {
    var self = this;

    key = normalizeKey(key);

    var promise = self.ready().then(function () {
        var dbInfo = self._dbInfo;
        localStorage.removeItem(dbInfo.keyPrefix + key);
    });

    executeCallback(promise, callback);
    return promise;
}
1319413
function ExpiredStorage(storage) {

        // set default storage to localStorage
        storage = storage || (typeof localStorage !== "undefined" ? localStorage : null);

        // sanity check1: make sure we have a valid storage class to use.
        if (!storage) {
            throw new Error("ExpiredStorage: No storage base class provided and 'localStorage' is undefined! Please provide a valid base storage class.");
        }

        // sanity check2: make sure the storage class provide the required API.
        if (!(storage.setItem && storage.getItem && storage.removeItem && storage.clear)) {
            throw new Error("ExpiredStorage: Storage class  don't support one or more of the required API functions: getItem, setItem, removeItem or clear.");
        }

        // set storage class
        this._storage = storage;
    }