tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Utils.js (720B)


      1 /*
      2 * Copyright (c) .NET Foundation. All rights reserved.
      3 *
      4 * This source code is licensed under the Apache License, Version 2.0,
      5 * found in the LICENSE.txt file in the root directory of the library
      6 * source tree.
      7 *
      8 * https://github.com/aspnet/AspNetCore
      9 */
     10 
     11 "use strict";
     12 
     13 Object.defineProperty(exports, "__esModule", { value: true });
     14 // Also in signalr-protocol-msgpack/Utils.ts
     15 /** @private */
     16 function isArrayBuffer(val) {
     17  return (
     18    val &&
     19    typeof ArrayBuffer !== "undefined" &&
     20    (val instanceof ArrayBuffer ||
     21      // Sometimes we get an ArrayBuffer that doesn't satisfy instanceof
     22      (val.constructor && val.constructor.name === "ArrayBuffer"))
     23  );
     24 }
     25 exports.isArrayBuffer = isArrayBuffer;