{ } qjs-modules

extendArrayBuffer

Source: lib/extendArrayBuffer.js (pure JS) — default export: extendArrayBuffer

Installs extra (non-enumerable) methods onto ArrayBuffer.prototype.

Exports

ExportArgsKindDescription
extendArrayBuffer(proto=ArrayBuffer.prototype, ctor)0–2functionDefines the extension methods. (default export)
ArrayBufferExtensions—constThe bag of methods that get installed.

Added ArrayBuffer.prototype methods

MethodDescription
search(needle)Finds a byte pattern within the buffer.
view(...)Returns a typed-array/DataView view over the buffer.