summaryrefslogtreecommitdiffstats
path: root/devtools/client/netmonitor/src/components/messages/parsers/signalr/Utils.js
blob: 77b00daf45d4eb0b8baaab7d4ae4797b3f73516f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright (c) .NET Foundation. All rights reserved.
 *
 * This source code is licensed under the Apache License, Version 2.0,
 * found in the LICENSE.txt file in the root directory of the library
 * source tree.
 *
 * https://github.com/aspnet/AspNetCore
 */

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
// Also in signalr-protocol-msgpack/Utils.ts
/** @private */
function isArrayBuffer(val) {
  return (
    val &&
    typeof ArrayBuffer !== "undefined" &&
    (val instanceof ArrayBuffer ||
      // Sometimes we get an ArrayBuffer that doesn't satisfy instanceof
      (val.constructor && val.constructor.name === "ArrayBuffer"))
  );
}
exports.isArrayBuffer = isArrayBuffer;