472
473
store(key: string, value: StorageValue, scope: StorageScope, target: StorageTarget, external = false): void {
475
>
// We remove the key for undefined/null values
476
>
if (isUndefinedOrNull(value)) {
477
this.remove(key, scope, external);
478
return;
479
}
481
>
// Update our datastructures but send events only after
482
>
this.withPausedEmitters(() => {
483
>
484
>
// Update key-target map
485
>
this.updateKeyTarget(key, scope, target);
486
>
487
>
// Store actual value
488
>
this.getStorage(scope)?.set(key, value, external);
489
>
});
490
>
}
491
492
remove(key: string, scope: StorageScope, external = false): void {