You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These have been deprecated since Apr 27, 2013, and the plan was to remove them in "node v0.13", according to the comments.
buffer.get(index) is superseded by buffer[index].
buffer.set(index, value) is superseded by buffer[index] = value.
I haven't seen these used in real code, ever. They also have never been documented at any point in node's history, according to the git commit history for doc/api/buffer.markdown.
Can be removed whenever. It never gets in the way of anything, so I keep forgetting about them. Wouldn't even say it's a major change. Not documented and have been fully deprecated going on 3 years (as @feross mentioned).
Activity
feross commentedon Jan 8, 2016
Another advantage of removing these is that they'll stop shadowing the underlying
TypedArray.prototype.setfunction.jasnell commentedon Jan 8, 2016
@trevnorris
[-]Deprecate `buffer.get` and `buffer.set`[/-][+]Remove `buffer.get` and `buffer.set`[/+]trevnorris commentedon Jan 8, 2016
Can be removed whenever. It never gets in the way of anything, so I keep forgetting about them. Wouldn't even say it's a major change. Not documented and have been fully deprecated going on 3 years (as @feross mentioned).
feross commentedon Jan 8, 2016
@trevnorris Okay, PR sent: #4594
buffer: remove deprecated buffer.get/.set methods
Use array index instead of Buffer.get
buffer: remove deprecated buffer.get/.set methods