Lazy list transformation
npm install @xtia/live-arrayliveArray()Lazy list transformation.
A live array behaves similarly to a normal array, exposing a length property, number-indexed values and various methods such as map, includes and reduce. The difference is that those indexed values are opaquely virtualised through user-provided get, set and getLength functions.
This is useful, for example, when an array-like interface is needed but the potential size of calculated values makes it unfeasible to store them all in a standard mapped array, or if the mapping process is wastefully expensive while only some elements will ever be accessed.
```
$ npm i @xtia/live-array
`ts
import { liveArray } from "@xtia/live-array";
const ids = ["main", "my-form", "my-submit-button"];
const elements = liveArray(ids, id => document.getElementById(id));
// or
const elements2 = liveArray({
getLength: () => ids.length,
get: idx => document.getElementById(ids[idx]),
});
console.log(elements[1]); //