Data lifetime across pages
- Dominant language
- JavaScript
- Stars
- 4
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Control the lifetime of the class. Whatever it should persist across page or reset on every page navigation.
### mass control
```html
```
### granular control
```ts
import { vary, keep, persist } from "https://esm.run/wiles/decorator" // ignore data-persist attribute
export default class {
@vary accessor start = 0 // swap databank with new array
@keep accessor end = 10 // keep databank on every navigation or append if page/component/scope not yet cached
@persist accessor total: number // stored in IndexDB on each eventful write
accessor count = 1 // behavior depend on data-persist attribute
}
```
or without decorator (not sure if I gonna support this 🤔)
```html
```
Requirement:
- Snapshot
- #40
- #15
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.