The newest count entries of a retained log, oldest first. Pure so the readback contract is testable without a renderer: a count of 0 (or negative) reads nothing, a `count past what is retained reads everything retained.
count
import { takeLastEntries } from '@datamoc/mwg/two-d/ui';console.log(takeLastEntries(['a', 'b', 'c'], 2)); // ['b', 'c'] Copy
import { takeLastEntries } from '@datamoc/mwg/two-d/ui';console.log(takeLastEntries(['a', 'b', 'c'], 2)); // ['b', 'c']
The newest
countentries of a retained log, oldest first. Pure so the readback contract is testable without a renderer: acountof 0 (or negative) reads nothing, a `count past what is retained reads everything retained.