Upgraded from 2.x to 4.x, missing `length`
Hey friends,
I've just upgraded from 2.x to 4.x and now my buffers are missing length property... is that expected? What's the alternative I should be using?
length was a bit misleading and this property has been renamed to limit with 3.X.
Thanks for pointing that out. Curious if they can be used interchangeably? It doesn't feel like the same thing at first glance.
On Fri, Aug 7, 2015, 17:36 Daniel Wirtz [email protected] wrote:
This property has been renamed to limit with 3.X.
— Reply to this email directly or view it on GitHub https://github.com/dcodeIO/ByteBuffer.js/issues/57#issuecomment-128870569 .
length implies the underlying buffer is of that length, which it isn't necessarily. limit is more accurate as it is the largest index at which the ByteBuffer will read to.