signal-desktop/ts/util/isByteBufferEmpty.ts
Scott Nonnenberg e6bab06510 Receive support for Sender Key
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
2021-05-20 17:37:08 -07:00

10 lines
299 B
TypeScript

// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { isNumber } from 'lodash';
import { ByteBufferClass } from '../window.d';
export function isByteBufferEmpty(data?: ByteBufferClass): boolean {
return !data || !isNumber(data.limit) || data.limit === 0;
}