isBuffer es-toolkit
Checks if a value is a Buffer instance.
Usage
isBuffer(value)
Use isBuffer when you want to check if a value is a Buffer object in Node.js environments. Useful for file processing, network communication, and binary data manipulation. It acts as a type guard in TypeScript, narrowing the value's type to Buffer.
Particularly useful when used as a type guard in TypeScript.
Frequently used in file processing and network communication.
Parameters
valueunknownrequired
The value to check if it's a Buffer instance.
Returns
Returns true if the value is a Buffer instance, false otherwise.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.