Quay lại Trending
RepositoryTypeScriptFRPháp
cyrilletuzi

cyrilletuzi/angular-async-local-storage

Efficient client-side storage for Angular: simple API + performance + Observables + validation

676sao
66fork
1issue
2lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: rxjs

#1 Repository của tháng

1
TINIX TRENDING·Chủ đề: localstorage

#1 Repository của tháng

2
TINIX TRENDING·Chủ đề: indexeddb

#2 Repository của tháng

⚡ Async Local Storage cho Angular — localStorage nhẹ nhưng mạnh bản lĩnh

Thay thế localStorage đồng bộ bằng indexedDB bất đồng bộ, giữ nguyên API quen thuộc và toàn bộ là Observable RxJS.

angular-async-local-storage (package @ngx-pwa/local-storage) là thư viện lưu trữ client-side cho Angular. Nó cung cấp API tương tự localStorage và Map, nhưng lưu trữ dữ liệu thông qua indexedDB bất đồng bộ để tránh làm đóng băng giao diện. Toàn bộ các phép toán đều trả về Observable, tích hợp sẵn RxJS.

✨ Điểm nổi bật

  • API đơn giản: dùng giống localStorage/Map, dễ học và dùng ngay.
  • Hiệu năng cao: nền tảng indexedDB bất đồng bộ, không chặn luồng UI.
  • Wrapped bởi RxJS: mọi phép toán (get, set, delete, clear, watch, keys, size, has) đều là Observable.
  • Xác thực dữ liệu: hỗ trợ kiểm chứng bằng JSON Schema hoặc typebox.
  • Tự động xử lý lỗi trình duyệt: vượt qua một số lỗi tương thích trình duyệt.
  • Tài liệu đầy đủ: API được giải thích rõ rệt, kèm hướng dẫn migration.

💡 Vì sao đáng chú ý

localStorage đồng bộ dễ gây treo UI khi dùng nhiều. indexedDB bất đồng bộ nhưng phức tạp, không hỗ trợ Promise. Thư viện này kết hợp cả hai: giữ đơn giản như localStorage, nhưng lưu trữ thực sự qua indexedDB. Phù hợp cho mọi ứng dụng Angular cần lưu trữ dữ liệu cục bộ hiệu quả và an toàn.


#Angular #LocalStorage #IndexedDB #RxJS #TypeScript #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryTypeScript
angular/angular

Deliver web apps with confidence 🚀

101.7k
Dec 1, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryTypeScript
freeCodeCamp/freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

459.9k
Dec 2, 2026
RepositoryTypeScript
vuejs/vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

212.6k
Oct 10, 2024
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

290.9k
Nov 30, 2026
RepositoryJavaScript
react/react

The library for web and native user interfaces.

253.0k
Nov 30, 2026
RepositoryJavaScript
trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

196.8k
Jul 26, 2026
Repository
getify/You-Dont-Know-JS

A book series (2 published editions) on the JS language.

184.8k
Oct 31, 2026
RepositoryTypeScript
mermaid-js/mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown

91.3k
Nov 29, 2026