Skip to content

doc: deprecate `buffer.slice`

Opening a PR to have the discussion about this particular idea (doc-deprecating buffer.slice).

References: https://github.com/nodejs/node/issues/41588

For the why - buffer.slice() returns a mutable slice whereas typedArray.slice() and array.slice() return a copy. This is confusing behavior and is the result of buffers predating Uint8Array availability.

cc @addaleax @jasnell @sindresorhus @nodejs/buffer

Also ccing some people who are usually helpful at giving useful comments when I make PRs that touch docs: @trott @aduh95 @VoltrexMaster

Merge request reports

Loading