Attaches a 'fake' length to an object (likely iterable or iterator) which does not have a length property, so that it can work well with functions that use getLength.
getLength
import { getLength, setLength } from 'deleight/generational';const myRange = range(12);setLength(myRange, 12);getLength(myRange); // returns 12. Copy
import { getLength, setLength } from 'deleight/generational';const myRange = range(12);setLength(myRange, 12);getLength(myRange); // returns 12.
Attaches a 'fake' length to an object (likely iterable or iterator) which does not have a length property, so that it can work well with functions that use
getLength
.