Function isBufferAligned

  • Checks if the given buffer is memory aligned. If alignment is not specified, the default alignment of 32 is used.

    Parameters

    • buffer:
          | undefined
          | null
          | ArrayBuffer
          | SharedArrayBuffer
          | Buffer
          | TypedArray

      The buffer to check.

    • Optionalalignment: number

      The alignment to check.

    Returns boolean