forked from jchomaz/Vulture
Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
27
VApp/node_modules/@videojs/vhs-utils/cjs/decode-b64-to-uint8-array.js
generated
vendored
Normal file
27
VApp/node_modules/@videojs/vhs-utils/cjs/decode-b64-to-uint8-array.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = decodeB64ToUint8Array;
|
||||
|
||||
var _window = _interopRequireDefault(require("global/window"));
|
||||
|
||||
var atob = function atob(s) {
|
||||
return _window.default.atob ? _window.default.atob(s) : Buffer.from(s, 'base64').toString('binary');
|
||||
};
|
||||
|
||||
function decodeB64ToUint8Array(b64Text) {
|
||||
var decodedString = atob(b64Text);
|
||||
var array = new Uint8Array(decodedString.length);
|
||||
|
||||
for (var i = 0; i < decodedString.length; i++) {
|
||||
array[i] = decodedString.charCodeAt(i);
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
Reference in New Issue
Block a user