Developer builds ngx-local-vault to add signals, encryption, and TTL to Angular storage
A developer has released ngx-local-vault, a lightweight Angular library under 2KB gzipped that addresses common shortcomings of the browser's native Web Storage API. The library wraps localStorage and sessionStorage into Angular WritableSignals, enabling reactive state management without manual event wiring or RxJS boilerplate. It also offers built-in AES encryption to protect sensitive data such as tokens and user profiles from plain-text exposure, along with time-to-live (TTL) support to automatically expire stored values. The library handles Server-Side Rendering safely, eliminating the need for repetitive isPlatformBrowser guards throughout a codebase. It is compatible with Angular versions 17 through 20 and requires zero additional dependencies.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in