browser-index.js 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. "use strict";
  2. // Copyright (c) .NET Foundation. All rights reserved.
  3. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
  4. function __export(m) {
  5. for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
  6. }
  7. Object.defineProperty(exports, "__esModule", { value: true });
  8. // This is where we add any polyfills we'll need for the browser. It is the entry module for browser-specific builds.
  9. require("es6-promise/dist/es6-promise.auto.js");
  10. // Copy from Array.prototype into Uint8Array to polyfill on IE. It's OK because the implementations of indexOf and slice use properties
  11. // that exist on Uint8Array with the same name, and JavaScript is magic.
  12. // We make them 'writable' because the Buffer polyfill messes with it as well.
  13. if (!Uint8Array.prototype.indexOf) {
  14. Object.defineProperty(Uint8Array.prototype, "indexOf", {
  15. value: Array.prototype.indexOf,
  16. writable: true,
  17. });
  18. }
  19. if (!Uint8Array.prototype.slice) {
  20. Object.defineProperty(Uint8Array.prototype, "slice", {
  21. value: Array.prototype.slice,
  22. writable: true,
  23. });
  24. }
  25. if (!Uint8Array.prototype.forEach) {
  26. Object.defineProperty(Uint8Array.prototype, "forEach", {
  27. value: Array.prototype.forEach,
  28. writable: true,
  29. });
  30. }
  31. __export(require("./index"));
  32. //# sourceMappingURL=browser-index.js.map