Svelte Persistent Store

screenshot of Svelte Persistent Store
svelte

A Svelte store that keep its value through pages and reloads

Overview:

The Svelte Persistent store is a Svelte store that allows data to persist through page changes and reloads. It provides multiple built-in storage options and supports working with any Svelte store, classes, objects, and primitives. This library offers an easy way to store and retrieve data across different instances of a Svelte application.

Features:

  • Multiple storages: Allows users to choose the most suitable storage option based on their use case.
  • Work with any Svelte store: Compatible with any Svelte store, providing flexibility in managing data.
  • Work with classes, objects, primitives: Supports storing and retrieving various data types, including classes, objects, and primitives.
  • Built-in storages: Six built-in storage options are available, including localStorage, sessionStorage, cookie storage, indexedDB storage, chrome storage, and encrypted storage.
  • Documentation generation: Documentation and examples can be easily generated using the provided npm scripts.

Summary:

The Svelte Persistent store is a powerful library that extends the functionality of Svelte stores by providing persistence across pages and reloads. With support for multiple storages and compatibility with different data types, it offers a flexible solution for managing and retrieving data in Svelte applications. The library also includes built-in storage options and the ability to generate documentation and examples for easy integration. Contributions are welcome, and the library is licensed under the MIT License.

svelte
Svelte

Svelte is a modern front-end framework that compiles your code at build time, resulting in smaller and faster applications. It uses a reactive approach to update the DOM, allowing for high performance and a smoother user experience.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

rollup
Rollup

RollupJS is a popular and efficient JavaScript module bundler that takes the code from multiple modules and packages them into a single optimized file, minimizing the overall size of the application and improving its performance.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.