_.isBuffer(value)

sourcenpm package

Checks if value is a buffer.

Since

4.3.0

Arguments

  • value (*): The value to check.

Returns

(boolean): Returns true if value is a buffer, else false.

Example

  1. _.isBuffer(new Buffer(2));
    // => true
    _.isBuffer(new Uint8Array(2));
    // => false