Skip to content

buffer: Added Buffer#includes() to keep parity with TypedArray.

Simply adds Buffer.prototype.includes by wrapping an indexOf and performing a strict equals check to -1.

The includes method takes the search value, byteOffset, and encoding as arguments.

The test is a modified version of the indexOf test.

Addresses #3552 (closed).

Merge request reports

Loading