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
const myRange = range(12);setLength(myRange, 12);getLength(myRange); // returns 12. Copy
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
.