UNPKG

1.16 kBJavaScriptView Raw
1"use strict";
2var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3 if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4 if (ar || !(i in from)) {
5 if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6 ar[i] = from[i];
7 }
8 }
9 return to.concat(ar || Array.prototype.slice.call(from));
10};
11Object.defineProperty(exports, "__esModule", { value: true });
12exports.bufferFrom = exports.bufferAllocUnsafe = exports.Buffer = void 0;
13var buffer_1 = require("buffer");
14Object.defineProperty(exports, "Buffer", { enumerable: true, get: function () { return buffer_1.Buffer; } });
15function bufferV0P12Ponyfill(arg0) {
16 var args = [];
17 for (var _i = 1; _i < arguments.length; _i++) {
18 args[_i - 1] = arguments[_i];
19 }
20 return new (buffer_1.Buffer.bind.apply(buffer_1.Buffer, __spreadArray([void 0, arg0], args, false)))();
21}
22var bufferAllocUnsafe = buffer_1.Buffer.allocUnsafe || bufferV0P12Ponyfill;
23exports.bufferAllocUnsafe = bufferAllocUnsafe;
24var bufferFrom = buffer_1.Buffer.from || bufferV0P12Ponyfill;
25exports.bufferFrom = bufferFrom;