isArrayBuffer
Checks if a value is an ArrayBuffer instance.
Useful for filtering or type-narrowing in a functional pipeline:
values.filter(isArrayBuffer)
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is ArrayBuffer — True if value is an ArrayBuffer
Examples
Section titled “Examples”Detect an ArrayBuffer
Section titled “Detect an ArrayBuffer”Returns true only for ArrayBuffer instances, not TypedArray views.
Filter ArrayBuffers from a mixed array
Section titled “Filter ArrayBuffers from a mixed array”Use as a predicate in .filter() to extract ArrayBuffer values.
