The array to observe.
Optional
options: { Options
A function that compares two values to determine if they are equal.
The name of Collection object.
The observed array
const items = collection([1, 2, 3]);
items.subscribe(() => {
console.log(items.value);
});
items.value.push(4);
// output: [1, 2, 3, 4]
Creates a new Collection instance. A Collection is a reactive primitive that holds an array of values. Same as
collection
but returns a new Collection instance.