DrSensor / DrSensor/nusa

reactive/bindable **Iterable** data structure

Open
#65 2 comments 0 reactions 0 assignees View on GitHub
data binding optimization
Dominant language
JavaScript
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

This replace/shim JS Array, Map, and Set with `nusa/std` Vector, Map, Set.

```ts
import { Vector as Vec, Map, Set } from "//esm.run/nusa/std/collections"

export default {
coins = new Vec()
makets = new Map()
symbols = new Set()

shuffleLastCoin() {
console.debug("previous last coin", this.coins.at(-1))
this.coins.setAt(-1, dice([100, 300], [10, 50]))
}
}
```

Yes, indexing operator (i.e `arr[i]`) is not reactive and there is no way to override/overload it in JS. That's why the name is Vector, not Array.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.