Function isBuffer

  • Checks if value is a buffer.

    Parameters

    • value: any

      The value to check.

    Returns value is Buffer<ArrayBufferLike>

    Returns true if value is a buffer, else false.

    5.4.0

    isBuffer(new Buffer(2))
    // => true

    isBuffer(new Uint8Array(2))
    // => false