🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@ng-web-apis/storage

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ng-web-apis/storage

A library to use Web Storage API with Observables

4.12.0
latest
Source
npm
Version published
Weekly downloads
770
-14.35%
Maintainers
4
Weekly downloads
 
Created
Source

ng-web-apis logo Web Storage API for Angular

npm version npm bundle size codecov

This is a library to use Web Storage API with Angular.

Install

If you do not have @ng-web-apis/common:

npm i @ng-web-apis/common

Now install the package:

npm i @ng-web-apis/storage

How to use

Web Storage API consists of storage synthesis and storage recognition.

  • Use STORAGE_EVENT token to inject an Observable of StorageEvent.
  • Use filterByKey and toValue utility operators to work with this Observable.
  • Native StorageEvent only fires when changes are made from another tab. To capture events from the same tab use StorageService to work with localStorage

See demo for concrete usage example.

See also

Other Web APIs for Angular by @ng-web-apis

Keywords

angular

FAQs

Package last updated on 31 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts