How to use the typedarray.ArrayBuffer function in typedarray

To help you get started, we’ve selected a few typedarray examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github improbable-eng / grpc-web / test / ts / src / grpc.spec.ts View on Github external
// Polyfills
import {debug} from "../../../ts/src/debug";

const global = Function('return this')();

if (typeof Uint8Array === "undefined") {
  (global as any).Uint8Array = require("typedarray").Uint8Array;
}
if (typeof ArrayBuffer === "undefined") {
  (global as any).ArrayBuffer = require("typedarray").ArrayBuffer;
}
if (typeof DataView === "undefined") {
  (global as any).DataView = require("typedarray").DataView;
}

// Test Config
import {assert} from "chai";
import {
  testHost,
  corsHost
} from "../../hosts-config";
type TestConfig = {
  testHostUrl: string,
  corsHostUrl: string,
  unavailableHost: string,
  emptyHost: string,

typedarray

TypedArray polyfill for old browsers

MIT
Latest version published 2 years ago

Package Health Score

71 / 100
Full package analysis