• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / use-local-storage / 18979844385
92%

Build:
DEFAULT BRANCH: main
Ran 31 Oct 2025 05:10PM UTC
Jobs 1
Files 1
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Oct 2025 05:09PM UTC coverage: 90.123% (-1.1%) from 91.176%
18979844385

push

github

web-flow
feat: Support custom and async local storage serializers - fixes #3 (#30)

* feat: Support custom and async local storage serializers

Introduces the `Serializer` interface and allows passing a custom
serializer via hook options. This enables users to define custom
logic for transforming data before storage and after retrieval.

The primary use case is encrypting data or handling non-JSON
compatible objects. The implementation supports both synchronous
and asynchronous serialization/deserialization methods.

The default JSON serialization is now handled by the internal
`JsonSerializer`.

Includes documentation updates and refactors tests to handle
asynchronous serialization.

* Update src/useLocalStorageSerializer.spec.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Restore deleted tests

* Restore deleted tests

* Restore more deleted test cases

* Restore more deleted test cases

* Restore more deleted test cases

* Fix tests

* refactor: Reuse logic for reading storage value

Extracted the asynchronous read logic into a dedicated function,
`readValueFromStorage`.

This removes duplicated read and error handling logic between
the initial mount of the hook and the debounced storage change
listener.

Also applied minor formatting changes to `setValue`.

* Urgh..

* Ooof

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

21 of 26 branches covered (80.77%)

Branch coverage included in aggregate %.

19 of 20 new or added lines in 1 file covered. (95.0%)

52 of 55 relevant lines covered (94.55%)

43.09 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
90.12
-1.05% src/useLocalStorage.ts
Jobs
ID Job ID Ran Files Coverage
1 18979844385.1 31 Oct 2025 05:10PM UTC 1
90.12
GitHub Action Run
Source Files on build 18979844385
  • Tree
  • List 1
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #18979844385
  • 0eb8fa8e on github
  • Prev Build on main (#18974305168)
  • Next Build on main (#18981841665)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc